summaryrefslogtreecommitdiff
path: root/drivers/of/unittest.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-05-13 14:31:39 +0300
committerRob Herring <robh@kernel.org>2016-05-19 17:16:35 +0300
commitdddc33e50a074152d0ba447dcaa6184b19dffab2 (patch)
tree1ec0f7d00c81ac6dd7ec87b98eee798e066c80cb /drivers/of/unittest.c
parent78c44d910d3e5f96dc6b3695fc1e4efd7c46a455 (diff)
downloadlinux-dddc33e50a074152d0ba447dcaa6184b19dffab2.tar.xz
drivers/of: Fix build warning in populate_node()
Function populate_node() is used to unflatten FDT blob to device tree. It supports maximal 64 level of device nodes. There is one array @fpsizes[64] tracking the full name length of last unflattened device node in the corresponding level (index of element in the array - 1). Build warning is seen with CONFIG_FRAME_WARN=1024 like below on ARM64 as Geert reported. The issue can be reproduced on PPC64 as well. $ make drivers/of/fdt.o drivers/of/fdt.c:443:1: warning: the frame size of 1136 bytes is \ larger than 1024 bytes [-Wframe-larger-than=] This changes the data type of @fpsizes[i] from "unsigned long" to "unsigned int" to avoid the build warning. The return value type of populate_node() and its @fpsize argument is adjusted accordingly. With this applied, 256 bytes saved from the stack frame on ARM64 and PPC64 platforms and the above warning isn't seen. Fixes: 50800082f176 ("drivers/of: Avoid recursively calling unflatten_dt_node()") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
0 files changed, 0 insertions, 0 deletions