lkml.org 
[lkml]   [2021]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfs/f2fs/super.c:3326:12: warning: stack frame size of 1064 bytes in function 'f2fs_scan_devices'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f40ddce88593482919761f74910f42f4b84c004b
commit: d540e35d4e547776ea78d51f614ec38ed2824fbe f2fs: don't check PAGE_SIZE again in sanity_check_raw_super()
date: 2 months ago
config: mips-randconfig-r024-20210219 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d540e35d4e547776ea78d51f614ec38ed2824fbe
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d540e35d4e547776ea78d51f614ec38ed2824fbe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

fs/f2fs/super.c:1516:20: warning: unused function 'f2fs_show_compress_options' [-Wunused-function]
static inline void f2fs_show_compress_options(struct seq_file *seq,
^
fs/f2fs/super.c:3472:12: warning: stack frame size of 1440 bytes in function 'f2fs_fill_super' [-Wframe-larger-than=]
static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
^
>> fs/f2fs/super.c:3326:12: warning: stack frame size of 1064 bytes in function 'f2fs_scan_devices' [-Wframe-larger-than=]
static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
^
3 warnings generated.


vim +/f2fs_scan_devices +3326 fs/f2fs/super.c

26d815ad75156a Jaegeuk Kim 2015-04-20 3325
3c62be17d4f562 Jaegeuk Kim 2016-10-06 @3326 static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3327 {
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3328 struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
7bb3a371d19915 Masato Suzuki 2017-02-27 3329 unsigned int max_devices = MAX_DEVICES;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3330 int i;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3331
7bb3a371d19915 Masato Suzuki 2017-02-27 3332 /* Initialize single device information */
7bb3a371d19915 Masato Suzuki 2017-02-27 3333 if (!RDEV(0).path[0]) {
7bb3a371d19915 Masato Suzuki 2017-02-27 3334 if (!bdev_is_zoned(sbi->sb->s_bdev))
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3335 return 0;
7bb3a371d19915 Masato Suzuki 2017-02-27 3336 max_devices = 1;
7bb3a371d19915 Masato Suzuki 2017-02-27 3337 }
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3338
7bb3a371d19915 Masato Suzuki 2017-02-27 3339 /*
7bb3a371d19915 Masato Suzuki 2017-02-27 3340 * Initialize multiple devices information, or single
7bb3a371d19915 Masato Suzuki 2017-02-27 3341 * zoned block device information.
7bb3a371d19915 Masato Suzuki 2017-02-27 3342 */
026f05079b00a5 Kees Cook 2018-06-12 3343 sbi->devs = f2fs_kzalloc(sbi,
026f05079b00a5 Kees Cook 2018-06-12 3344 array_size(max_devices,
026f05079b00a5 Kees Cook 2018-06-12 3345 sizeof(struct f2fs_dev_info)),
026f05079b00a5 Kees Cook 2018-06-12 3346 GFP_KERNEL);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3347 if (!sbi->devs)
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3348 return -ENOMEM;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3349
7bb3a371d19915 Masato Suzuki 2017-02-27 3350 for (i = 0; i < max_devices; i++) {
7bb3a371d19915 Masato Suzuki 2017-02-27 3351
7bb3a371d19915 Masato Suzuki 2017-02-27 3352 if (i > 0 && !RDEV(i).path[0])
7bb3a371d19915 Masato Suzuki 2017-02-27 3353 break;
7bb3a371d19915 Masato Suzuki 2017-02-27 3354
7bb3a371d19915 Masato Suzuki 2017-02-27 3355 if (max_devices == 1) {
7bb3a371d19915 Masato Suzuki 2017-02-27 3356 /* Single zoned block device mount */
7bb3a371d19915 Masato Suzuki 2017-02-27 3357 FDEV(0).bdev =
7bb3a371d19915 Masato Suzuki 2017-02-27 3358 blkdev_get_by_dev(sbi->sb->s_bdev->bd_dev,
7bb3a371d19915 Masato Suzuki 2017-02-27 3359 sbi->sb->s_mode, sbi->sb->s_type);
7bb3a371d19915 Masato Suzuki 2017-02-27 3360 } else {
7bb3a371d19915 Masato Suzuki 2017-02-27 3361 /* Multi-device mount */
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3362 memcpy(FDEV(i).path, RDEV(i).path, MAX_PATH_LEN);
7bb3a371d19915 Masato Suzuki 2017-02-27 3363 FDEV(i).total_segments =
7bb3a371d19915 Masato Suzuki 2017-02-27 3364 le32_to_cpu(RDEV(i).total_segments);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3365 if (i == 0) {
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3366 FDEV(i).start_blk = 0;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3367 FDEV(i).end_blk = FDEV(i).start_blk +
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3368 (FDEV(i).total_segments <<
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3369 sbi->log_blocks_per_seg) - 1 +
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3370 le32_to_cpu(raw_super->segment0_blkaddr);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3371 } else {
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3372 FDEV(i).start_blk = FDEV(i - 1).end_blk + 1;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3373 FDEV(i).end_blk = FDEV(i).start_blk +
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3374 (FDEV(i).total_segments <<
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3375 sbi->log_blocks_per_seg) - 1;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3376 }
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3377 FDEV(i).bdev = blkdev_get_by_path(FDEV(i).path,
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3378 sbi->sb->s_mode, sbi->sb->s_type);
7bb3a371d19915 Masato Suzuki 2017-02-27 3379 }
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3380 if (IS_ERR(FDEV(i).bdev))
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3381 return PTR_ERR(FDEV(i).bdev);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3382
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3383 /* to release errored devices */
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3384 sbi->s_ndevs = i + 1;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3385

:::::: The code at line 3326 was first introduced by commit
:::::: 3c62be17d4f562f43fe1d03b48194399caa35aa5 f2fs: support multiple devices

:::::: TO: Jaegeuk Kim <jaegeuk@kernel.org>
:::::: CC: Jaegeuk Kim <jaegeuk@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-02-19 13:25    [W:0.050 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site