drivers/ata/libata-eh.c:2411:6: warning: stack frame size (2288) exceeds limit (2048) in 'ata_eh_report'

From: kernel test robot
Date: Thu Jun 08 2023 - 12:37:27 EST


Hi Hannes,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5f63595ebd82f56a2dd36ca013dd7f5ff2e2416a
commit: 742bef476ca5352b16063161fb73a56629a6d995 ata: libata: move ata_{port,link,dev}_dbg to standard pr_XXX() macros
date: 1 year, 5 months ago
config: riscv-randconfig-r012-20230608 (https://download.01.org/0day-ci/archive/20230609/202306090021.YucfHGtk-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=742bef476ca5352b16063161fb73a56629a6d995
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 742bef476ca5352b16063161fb73a56629a6d995
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=riscv olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/ata/ drivers/gpu/drm/ drivers/hid/ drivers/media/tuners/ lib/

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306090021.YucfHGtk-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/ata/libata-eh.c:2411:6: warning: stack frame size (2288) exceeds limit (2048) in 'ata_eh_report' [-Wframe-larger-than]
void ata_eh_report(struct ata_port *ap)
^
drivers/ata/libata-eh.c:3550:5: warning: stack frame size (4320) exceeds limit (2048) in 'ata_eh_recover' [-Wframe-larger-than]
int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
^
2 warnings generated.
--
>> drivers/ata/libata-pmp.c:915:12: warning: stack frame size (3296) exceeds limit (2048) in 'sata_pmp_eh_recover' [-Wframe-larger-than]
static int sata_pmp_eh_recover(struct ata_port *ap)
^
1 warning generated.


vim +/ata_eh_report +2411 drivers/ata/libata-eh.c

022bdb075b9e1f drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 2401
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2402 /**
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2403 * ata_eh_report - report error handling to user
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2404 * @ap: ATA port to report EH about
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2405 *
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2406 * Report EH to user.
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2407 *
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2408 * LOCKING:
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2409 * None.
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2410 */
fb7fd61454c868 drivers/ata/libata-eh.c Tejun Heo 2007-09-23 @2411 void ata_eh_report(struct ata_port *ap)
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2412 {
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2413 struct ata_link *link;
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2414
1eca4365be25c5 drivers/ata/libata-eh.c Tejun Heo 2008-11-03 2415 ata_for_each_link(link, ap, HOST_FIRST)
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2416 ata_eh_link_report(link);
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2417 }
9b1e2658faf3f3 drivers/ata/libata-eh.c Tejun Heo 2007-08-06 2418

:::::: The code at line 2411 was first introduced by commit
:::::: fb7fd61454c8681cd2621051a710b78a00369203 libata-pmp-prep: make a number of functions global to libata

:::::: TO: Tejun Heo <htejun@xxxxxxxxx>
:::::: CC: Jeff Garzik <jeff@xxxxxxxxxx>

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