drivers/iio/accel/sca3000.c:1244:12: warning: stack frame size of 8320 bytes in function 'sca3000_write_event_config'
From: kernel test robot
Date: Wed May 05 2021 - 23:47:05 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8404c9fbc84b741f66cff7d4934a25dd2c344452
commit: 11ba28229f8258164731e42f4c3e93762cb6578e Merge remote-tracking branch 'spi/for-5.9' into spi-next
date: 9 months ago
config: riscv-randconfig-r033-20210506 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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 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=11ba28229f8258164731e42f4c3e93762cb6578e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 11ba28229f8258164731e42f4c3e93762cb6578e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
drivers/iio/accel/sca3000.c:1453:12: warning: stack frame size of 8576 bytes in function 'sca3000_probe' [-Wframe-larger-than=]
static int sca3000_probe(struct spi_device *spi)
^
>> drivers/iio/accel/sca3000.c:1244:12: warning: stack frame size of 8320 bytes in function 'sca3000_write_event_config' [-Wframe-larger-than=]
static int sca3000_write_event_config(struct iio_dev *indio_dev,
^
2 warnings generated.
vim +/sca3000_write_event_config +1244 drivers/iio/accel/sca3000.c
574fb258d63658 drivers/staging/iio/accel/sca3000_core.c Jonathan Cameron 2009-08-18 1228
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1229 /**
2ccf61442ff142 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1230 * sca3000_write_event_config() - simple on off control for motion detector
2ccf61442ff142 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1231 * @indio_dev: IIO device instance specific structure. Data specific to this
2ccf61442ff142 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1232 * particular driver may be accessed via iio_priv(indio_dev).
2ccf61442ff142 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1233 * @chan: Description of the channel whose event we are configuring.
2ccf61442ff142 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1234 * @type: The type of event.
2ccf61442ff142 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1235 * @dir: The direction of the event.
2ccf61442ff142 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1236 * @state: Desired state of event being configured.
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1237 *
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1238 * This is a per axis control, but enabling any will result in the
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1239 * motion detector unit being enabled.
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1240 * N.B. enabling motion detector stops normal data acquisition.
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1241 * There is a complexity in knowing which mode to return to when
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1242 * this mode is disabled. Currently normal mode is assumed.
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1243 **/
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 @1244 static int sca3000_write_event_config(struct iio_dev *indio_dev,
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1245 const struct iio_chan_spec *chan,
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1246 enum iio_event_type type,
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1247 enum iio_event_direction dir,
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1248 int state)
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1249 {
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1250 struct sca3000_state *st = iio_priv(indio_dev);
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1251 int ret;
fc5d0e42545a74 drivers/staging/iio/accel/sca3000_core.c Jonathan Cameron 2010-10-08 1252
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1253 mutex_lock(&st->lock);
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1254 switch (chan->channel2) {
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1255 case IIO_MOD_X_AND_Y_AND_Z:
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1256 ret = sca3000_freefall_set_state(indio_dev, state);
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1257 break;
574fb258d63658 drivers/staging/iio/accel/sca3000_core.c Jonathan Cameron 2009-08-18 1258
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1259 case IIO_MOD_X:
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1260 case IIO_MOD_Y:
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1261 case IIO_MOD_Z:
74bdc940757608 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1262 ret = sca3000_motion_detect_set_state(indio_dev,
74bdc940757608 drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1263 chan->address,
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1264 state);
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1265 break;
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1266 default:
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1267 ret = -EINVAL;
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1268 break;
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1269 }
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1270 mutex_unlock(&st->lock);
574fb258d63658 drivers/staging/iio/accel/sca3000_core.c Jonathan Cameron 2009-08-18 1271
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1272 return ret;
45ae5561acf52e drivers/staging/iio/accel/sca3000.c Jonathan Cameron 2016-10-08 1273 }
574fb258d63658 drivers/staging/iio/accel/sca3000_core.c Jonathan Cameron 2009-08-18 1274
:::::: The code at line 1244 was first introduced by commit
:::::: 45ae5561acf52e82c838ba997dca5afc53ff1b61 staging:iio:accel:sca3000 use a 'fake' channel to handle freefall event registration.
:::::: TO: Jonathan Cameron <jic23@xxxxxxxxxx>
:::::: CC: Jonathan Cameron <jic23@xxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip