mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Cc: kbuild-all@lists.01.org, Atish Patra <Atish.Patra@wdc.com>,
	linux-kernel@vger.kernel.org
Subject: [atishp04:ox_v5.14_working 4/13] arch/riscv/mm/init.c:714:83: warning: suggest braces around empty body in an 'if' statement
Date: Fri, 5 Nov 2021 16:19:55 +0800	[thread overview]
Message-ID: <202111051651.GG52FPnU-lkp@intel.com> (raw)

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

tree:   https://github.com/atishp04/linux ox_v5.14_working
head:   9d2e326476c44eade0d6b7ee54c4eb8918d6aa94
commit: 7c0cb480378b7fc7ccc693fc867c4d62c420732d [4/13] riscv: Implement sv48 support
config: riscv-rv32_defconfig (attached as .config)
compiler: riscv32-linux-gcc (GCC) 11.2.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://github.com/atishp04/linux/commit/7c0cb480378b7fc7ccc693fc867c4d62c420732d
        git remote add atishp04 https://github.com/atishp04/linux
        git fetch --no-tags atishp04 ox_v5.14_working
        git checkout 7c0cb480378b7fc7ccc693fc867c4d62c420732d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=riscv 

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 >>):

   arch/riscv/mm/init.c: In function 'create_fdt_early_page_table':
>> arch/riscv/mm/init.c:714:83: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
     714 |                                    (uintptr_t)early_dtb_pmd, PUD_SIZE, PAGE_TABLE);
         |                                                                                   ^


vim +/if +714 arch/riscv/mm/init.c

   696	
   697	/*
   698	 * Setup a 4MB mapping that encompasses the device tree: for 64-bit kernel,
   699	 * this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR
   700	 * entry.
   701	 */
   702	static void __init create_fdt_early_page_table(pgd_t *pgdir, uintptr_t dtb_pa)
   703	{
   704	#ifndef CONFIG_BUILTIN_DTB
   705		uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
   706	
   707		create_pgd_mapping(early_pg_dir, DTB_EARLY_BASE_VA,
   708				   IS_ENABLED(CONFIG_64BIT) ? early_dtb_pgd_next : pa,
   709				   PGDIR_SIZE,
   710				   IS_ENABLED(CONFIG_64BIT) ? PAGE_TABLE : PAGE_KERNEL);
   711	
   712		if (pgtable_l4_enabled)
   713			create_pud_mapping(early_dtb_pud, DTB_EARLY_BASE_VA,
 > 714					   (uintptr_t)early_dtb_pmd, PUD_SIZE, PAGE_TABLE);
   715	
   716		if (IS_ENABLED(CONFIG_64BIT)) {
   717			create_pmd_mapping(early_dtb_pmd, DTB_EARLY_BASE_VA,
   718					   pa, PMD_SIZE, PAGE_KERNEL);
   719			create_pmd_mapping(early_dtb_pmd, DTB_EARLY_BASE_VA + PMD_SIZE,
   720					   pa + PMD_SIZE, PMD_SIZE, PAGE_KERNEL);
   721		}
   722	
   723		dtb_early_va = (void *)DTB_EARLY_BASE_VA + (dtb_pa & (PMD_SIZE - 1));
   724	#else
   725		/*
   726		 * For 64-bit kernel, __va can't be used since it would return a linear
   727		 * mapping address whereas dtb_early_va will be used before
   728		 * setup_vm_final installs the linear mapping. For 32-bit kernel, as the
   729		 * kernel is mapped in the linear mapping, that makes no difference.
   730		 */
   731		dtb_early_va = kernel_mapping_pa_to_va(XIP_FIXUP(dtb_pa));
   732	#endif
   733	
   734		dtb_early_pa = dtb_pa;
   735	}
   736	

---
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: 20833 bytes --]

             reply	other threads:[~2021-11-05  8:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05  8:19 kernel test robot [this message]
2021-11-05  8:30 ` Alexandre Ghiti

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=202111051651.GG52FPnU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Atish.Patra@wdc.com \
    --cc=alexandre.ghiti@canonical.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®