]> git.baikalelectronics.ru Git - uboot.git/commit
fdt_support: make fdt_fixup_mtdparts() prototype more specific
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 Jul 2018 07:28:22 +0000 (16:28 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 24 Jul 2018 23:47:52 +0000 (08:47 +0900)
commit4c2139a041f34ecb3e6a0507490d96babb3a6307
tree09d5bf449b0aab36fac2235621a0ebda632c4433
parent833658e989081aebe001ae7b98eac1dfc8ef045c
fdt_support: make fdt_fixup_mtdparts() prototype more specific

The second argument of fdt_fixup_mtdparts() is an opaque pointer,
'void *node_info', hence callers can pass any pointer.

Obviously, fdt_fixup_mtdparts() expects 'struct node_info *'
otherwise, it crashes run-time.

Change the prototype so that it is compile-time checked.

Also, add 'const' qualifier to it so that callers can constify
the struct node_info arrays.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/fdt_support.c
include/fdt_support.h