linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: [nomadik:ux500-href-dts-fixups 5/5] init/initramfs.c:684:2: warning: ISO C90 forbids mixed declarations and code
Date: Mon, 10 May 2021 22:08:40 +0800	[thread overview]
Message-ID: <202105102229.teabYaqH-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5242 bytes --]

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@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@linux.vnet.ibm.com>
:::::: CC: Michal Marek <mmarek@suse.cz>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27419 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2021-05-10 14:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202105102229.teabYaqH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).