arch/arm/boot/compressed/atags_to_fdt.c:129:5: warning: stack frame size (1336) exceeds limit (1280) in 'atags_to_fdt'

From: kernel test robot
Date: Fri May 05 2023 - 17:31:43 EST


Hi Nick,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 78b421b6a7c6dbb6a213877c742af52330f5026d
commit: 3220022038b9a3845eea762af85f1c5694b9f861 ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod
date: 6 months ago
config: arm-randconfig-r046-20230504 (https://download.01.org/0day-ci/archive/20230506/202305060558.U9RE5y1G-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project b0fb98227c90adf2536c9ad644a74d5e92961111)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3220022038b9a3845eea762af85f1c5694b9f861
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3220022038b9a3845eea762af85f1c5694b9f861
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202305060558.U9RE5y1G-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

arch/arm/boot/compressed/atags_to_fdt.c:129:5: warning: no previous prototype for function 'atags_to_fdt' [-Wmissing-prototypes]
int atags_to_fdt(void *atag_list, void *fdt, int total_space)
^
arch/arm/boot/compressed/atags_to_fdt.c:129:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int atags_to_fdt(void *atag_list, void *fdt, int total_space)
^
static
>> arch/arm/boot/compressed/atags_to_fdt.c:129:5: warning: stack frame size (1336) exceeds limit (1280) in 'atags_to_fdt' [-Wframe-larger-than]
int atags_to_fdt(void *atag_list, void *fdt, int total_space)
^
44/1336 (3.29%) spills, 1292/1336 (96.71%) variables
2 warnings generated.


vim +/atags_to_fdt +129 arch/arm/boot/compressed/atags_to_fdt.c

31d0b9f9982f8e3 Ben Dooks 2018-10-12 120
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 121 /*
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 122 * Convert and fold provided ATAGs into the provided FDT.
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 123 *
4716e2e34a22a8c Geert Uytterhoeven 2021-05-19 124 * Return values:
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 125 * = 0 -> pretend success
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 126 * = 1 -> bad ATAG (may retry with another possible ATAG pointer)
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 127 * < 0 -> error from libfdt
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 128 */
b90b9a38251e9c8 Nicolas Pitre 2011-09-13 @129 int atags_to_fdt(void *atag_list, void *fdt, int total_space)

:::::: The code at line 129 was first introduced by commit
:::::: b90b9a38251e9c89c34179eccde57411ceb5f1aa ARM: zImage: allow supplementing appended DTB with traditional ATAG data

:::::: TO: Nicolas Pitre <nicolas.pitre@xxxxxxxxxx>
:::::: CC: Nicolas Pitre <nico@xxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests