mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
dddc33e50a
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:
|
||
---|---|---|
.. | ||
unittest-data | ||
address.c | ||
base.c | ||
device.c | ||
dynamic.c | ||
fdt_address.c | ||
fdt.c | ||
irq.c | ||
Kconfig | ||
Makefile | ||
of_mdio.c | ||
of_mtd.c | ||
of_net.c | ||
of_pci_irq.c | ||
of_pci.c | ||
of_private.h | ||
of_reserved_mem.c | ||
overlay.c | ||
pdt.c | ||
platform.c | ||
resolver.c | ||
unittest.c |