mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-25 21:24:21 +08:00
fdt_support: add 'const' qualifier for unchanged argument
In the next commit, I will add a new function, fdt_pack_reg() which uses get_cells_len(). Beforehand, this commit adds 'const' qualifier to get_cells_len(). Otherwise, a warning message will appear: warning: passing argument 1 of 'get_cells_len' discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
972f2a8905
commit
f89d482fe5
@ -21,11 +21,11 @@
|
|||||||
* if #NNNN-cells property is 2 then len is 8
|
* if #NNNN-cells property is 2 then len is 8
|
||||||
* otherwise len is 4
|
* otherwise len is 4
|
||||||
*/
|
*/
|
||||||
static int get_cells_len(void *blob, char *nr_cells_name)
|
static int get_cells_len(const void *fdt, const char *nr_cells_name)
|
||||||
{
|
{
|
||||||
const fdt32_t *cell;
|
const fdt32_t *cell;
|
||||||
|
|
||||||
cell = fdt_getprop(blob, 0, nr_cells_name, NULL);
|
cell = fdt_getprop(fdt, 0, nr_cells_name, NULL);
|
||||||
if (cell && fdt32_to_cpu(*cell) == 2)
|
if (cell && fdt32_to_cpu(*cell) == 2)
|
||||||
return 8;
|
return 8;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user