lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209301704.kAjw6hHe-lkp@intel.com>
Date:   Fri, 30 Sep 2022 17:43:37 +0800
From:   kernel test robot <lkp@...el.com>
To:     Huacai Chen <chenhuacai@...ngson.cn>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [chenhuacai-loongson:loongarch-next 10/21]
 arch/loongarch/mm/init.c:166:24: warning: variable 'new' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git loongarch-next
head:   ea6ed11fb0fe6dbff0d46e751601e43b656b12fb
commit: b57e6bb9e08e76d2895e07300441e5a42a65db6d [10/21] LoongArch: Use TLB for ioremap()
config: loongarch-allyesconfig
compiler: loongarch64-linux-gcc (GCC) 12.1.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/chenhuacai/linux-loongson.git/commit/?id=b57e6bb9e08e76d2895e07300441e5a42a65db6d
        git remote add chenhuacai-loongson https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git
        git fetch --no-tags chenhuacai-loongson loongarch-next
        git checkout b57e6bb9e08e76d2895e07300441e5a42a65db6d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash arch/loongarch/mm/ arch/loongarch/pci/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   arch/loongarch/mm/init.c: In function 'fixmap_pte':
>> arch/loongarch/mm/init.c:166:24: warning: variable 'new' set but not used [-Wunused-but-set-variable]
     166 |                 pud_t *new;
         |                        ^~~
--
>> arch/loongarch/pci/acpi.c:91:27: warning: no previous prototype for 'arch_pci_ecam_create' [-Wmissing-prototypes]
      91 | struct pci_config_window *arch_pci_ecam_create(struct device *dev,
         |                           ^~~~~~~~~~~~~~~~~~~~


vim +/new +166 arch/loongarch/mm/init.c

   154	
   155	static pte_t *fixmap_pte(unsigned long addr)
   156	{
   157		pgd_t *pgd;
   158		p4d_t *p4d;
   159		pud_t *pud;
   160		pmd_t *pmd;
   161	
   162		pgd = pgd_offset_k(addr);
   163		p4d = p4d_offset(pgd, addr);
   164	
   165		if (pgd_none(*pgd)) {
 > 166			pud_t *new;
   167	
   168			new = memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
   169			pgd_populate(&init_mm, pgd, new);
   170	#ifndef __PAGETABLE_PUD_FOLDED
   171			pud_init((unsigned long)new, (unsigned long)invalid_pmd_table);
   172	#endif
   173		}
   174	
   175		pud = pud_offset(p4d, addr);
   176		if (pud_none(*pud)) {
   177			pmd_t *new;
   178	
   179			new = memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
   180			pud_populate(&init_mm, pud, new);
   181	#ifndef __PAGETABLE_PMD_FOLDED
   182			pmd_init((unsigned long)new, (unsigned long)invalid_pte_table);
   183	#endif
   184		}
   185	
   186		pmd = pmd_offset(pud, addr);
   187		if (pmd_none(*pmd)) {
   188			pte_t *new;
   189	
   190			new = memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
   191			pmd_populate_kernel(&init_mm, pmd, new);
   192		}
   193	
   194		return pte_offset_kernel(pmd, addr);
   195	}
   196	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (323286 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ