From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH] drivers/of: Fix build warning in populate_node() Date: Mon, 16 May 2016 09:11:26 -0500 Message-ID: <20160516141126.GC21849@rob-hp-laptop> References: <1463139099-23363-1-git-send-email-gwshan@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1463139099-23363-1-git-send-email-gwshan@linux.vnet.ibm.com> Sender: linux-pci-owner@vger.kernel.org To: Gavin Shan Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, geert@linux-m68k.org, robherring2@gmail.com, benh@kernel.crashing.org, mpe@ellerman.id.au, aik@ozlabs.ru, bhelgaas@google.com, grant.likely@linaro.org, panto@antoniou-consulting.com, frowand.list@gmail.com List-Id: devicetree@vger.kernel.org On Fri, May 13, 2016 at 09:31:39PM +1000, Gavin Shan wrote: > 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: 9ffa9eb ("drivers/of: Avoid recursively calling unflatten_dt_node()") > Reported-by: Geert Uytterhoeven > Signed-off-by: Gavin Shan > --- > drivers/of/fdt.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) Applied, thanks. Rob