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]
Date:   Mon, 24 Oct 2022 22:30:24 +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,
        WANG Xuerui <git@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: arch/loongarch/kernel/numa.c:76:24: warning: variable 'new' set but
 not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   247f34f7b80357943234f93f247a1ae6b6c3a740
commit: d4b6f1562a3c3284adcef81d6e4f183d7d34b8a9 LoongArch: Add Non-Uniform Memory Access (NUMA) support
date:   5 months ago
config: loongarch-randconfig-r006-20221024
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/torvalds/linux.git/commit/?id=d4b6f1562a3c3284adcef81d6e4f183d7d34b8a9
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d4b6f1562a3c3284adcef81d6e4f183d7d34b8a9
        # 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/kernel/

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/kernel/numa.c: In function 'pcpu_populate_pte':
>> arch/loongarch/kernel/numa.c:76:24: warning: variable 'new' set but not used [-Wunused-but-set-variable]
      76 |                 pud_t *new;
         |                        ^~~


vim +/new +76 arch/loongarch/kernel/numa.c

    67	
    68	void __init pcpu_populate_pte(unsigned long addr)
    69	{
    70		pgd_t *pgd = pgd_offset_k(addr);
    71		p4d_t *p4d = p4d_offset(pgd, addr);
    72		pud_t *pud;
    73		pmd_t *pmd;
    74	
    75		if (p4d_none(*p4d)) {
  > 76			pud_t *new;
    77	
    78			new = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
    79			pgd_populate(&init_mm, pgd, new);
    80	#ifndef __PAGETABLE_PUD_FOLDED
    81			pud_init((unsigned long)new, (unsigned long)invalid_pmd_table);
    82	#endif
    83		}
    84	
    85		pud = pud_offset(p4d, addr);
    86		if (pud_none(*pud)) {
    87			pmd_t *new;
    88	
    89			new = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
    90			pud_populate(&init_mm, pud, new);
    91	#ifndef __PAGETABLE_PMD_FOLDED
    92			pmd_init((unsigned long)new, (unsigned long)invalid_pte_table);
    93	#endif
    94		}
    95	
    96		pmd = pmd_offset(pud, addr);
    97		if (!pmd_present(*pmd)) {
    98			pte_t *new;
    99	
   100			new = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
   101			pmd_populate_kernel(&init_mm, pmd, new);
   102		}
   103	}
   104	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ