[nomadik:ux500-href-dts-fixups 5/5] init/initramfs.c:684:2: warning: ISO C90 forbids mixed declarations and code
kernel test robot
lkp at intel.com
Mon May 10 07:08:40 PDT 2021
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-href-dts-fixups
head: be31b268b8f93e8498b83222d469f54877f60bb8
commit: be31b268b8f93e8498b83222d469f54877f60bb8 [5/5] hacks
config: arc-randconfig-r021-20210510 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?id=be31b268b8f93e8498b83222d469f54877f60bb8
git remote add nomadik https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
git fetch --no-tags nomadik ux500-href-dts-fixups
git checkout be31b268b8f93e8498b83222d469f54877f60bb8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
init/initramfs.c: In function 'do_populate_rootfs':
>> init/initramfs.c:684:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
684 | char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size);
| ^~~~
vim +684 init/initramfs.c
7c184ecd262fe6 Christoph Hellwig 2019-05-13 676
e7cb072eb988e4 Rasmus Villemoes 2021-05-06 677 static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
^1da177e4c3f41 Linus Torvalds 2005-04-16 678 {
be31b268b8f93e Linus Walleij 2021-04-16 679 pr_info("%s enter __initramfs_start = %08x, __initramfs_size = %08x\n",
be31b268b8f93e Linus Walleij 2021-04-16 680 __func__,
be31b268b8f93e Linus Walleij 2021-04-16 681 (unsigned int)__initramfs_start,
be31b268b8f93e Linus Walleij 2021-04-16 682 (unsigned int)__initramfs_size);
17a9be31747535 Stafford Horne 2017-05-04 683 /* Load the built in initramfs */
ffe8018c342489 Hendrik Brueckner 2010-09-17 @684 char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size);
^1da177e4c3f41 Linus Torvalds 2005-04-16 685 if (err)
dd23e8098f33a5 Florian Fainelli 2021-02-25 686 panic_show_mem("%s", err); /* Failed to decompress INTERNAL initramfs */
afef7889c480ed Christoph Hellwig 2019-05-13 687
be31b268b8f93e Linus Walleij 2021-04-16 688 if (!initrd_start)
be31b268b8f93e Linus Walleij 2021-04-16 689 pr_info("no initrd_start\n");
afef7889c480ed Christoph Hellwig 2019-05-13 690 if (!initrd_start || IS_ENABLED(CONFIG_INITRAMFS_FORCE))
bb813f4c933ae9 Tejun Heo 2013-01-18 691 goto done;
54c7a8916a887f Christoph Hellwig 2019-05-13 692
afef7889c480ed Christoph Hellwig 2019-05-13 693 if (IS_ENABLED(CONFIG_BLK_DEV_RAM))
afef7889c480ed Christoph Hellwig 2019-05-13 694 printk(KERN_INFO "Trying to unpack rootfs image as initramfs...\n");
afef7889c480ed Christoph Hellwig 2019-05-13 695 else
afef7889c480ed Christoph Hellwig 2019-05-13 696 printk(KERN_INFO "Unpacking initramfs...\n");
afef7889c480ed Christoph Hellwig 2019-05-13 697
afef7889c480ed Christoph Hellwig 2019-05-13 698 err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start);
afef7889c480ed Christoph Hellwig 2019-05-13 699 if (err) {
9ab6b718491b1a Christoph Hellwig 2020-06-06 700 #ifdef CONFIG_BLK_DEV_RAM
7c184ecd262fe6 Christoph Hellwig 2019-05-13 701 populate_initrd_image(err);
9ab6b718491b1a Christoph Hellwig 2020-06-06 702 #else
9ab6b718491b1a Christoph Hellwig 2020-06-06 703 printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err);
9ab6b718491b1a Christoph Hellwig 2020-06-06 704 #endif
17a9be31747535 Stafford Horne 2017-05-04 705 }
23091e28735544 Christoph Hellwig 2019-05-13 706
afef7889c480ed Christoph Hellwig 2019-05-13 707 done:
23091e28735544 Christoph Hellwig 2019-05-13 708 /*
23091e28735544 Christoph Hellwig 2019-05-13 709 * If the initrd region is overlapped with crashkernel reserved region,
23091e28735544 Christoph Hellwig 2019-05-13 710 * free only memory that is not part of crashkernel region.
23091e28735544 Christoph Hellwig 2019-05-13 711 */
5d59aa8f9ce972 Steven Price 2019-05-17 712 if (!do_retain_initrd && initrd_start && !kexec_free_initrd())
23091e28735544 Christoph Hellwig 2019-05-13 713 free_initrd_mem(initrd_start, initrd_end);
23091e28735544 Christoph Hellwig 2019-05-13 714 initrd_start = 0;
23091e28735544 Christoph Hellwig 2019-05-13 715 initrd_end = 0;
23091e28735544 Christoph Hellwig 2019-05-13 716
08865514805d2d Lokesh Vutla 2017-02-27 717 flush_delayed_fput();
e7cb072eb988e4 Rasmus Villemoes 2021-05-06 718 }
e7cb072eb988e4 Rasmus Villemoes 2021-05-06 719
:::::: The code at line 684 was first introduced by commit
:::::: ffe8018c3424892c9590048fc36caa6c3e0c8a76 initramfs: fix initramfs size calculation
:::::: TO: Hendrik Brueckner <brueckner at linux.vnet.ibm.com>
:::::: CC: Michal Marek <mmarek at suse.cz>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 27419 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210510/165ccb58/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list