
19 Jul
2018
19 Jul
'18
5:21 p.m.
Hi Masahiro,
On 19 July 2018 at 01:28, Masahiro Yamada yamada.masahiro@socionext.com wrote:
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
common/fdt_support.c | 13 +++++++------ include/fdt_support.h | 11 ++++++++--- 2 files changed, 15 insertions(+), 9 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org