[song-md:module_alloc_test 5/6] arch/powerpc/kernel/module.c:108:15: error: unused variable 'ptr'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Song,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git module_alloc_test
head:   7b05e9e4784401342805814b52f3dab621fdb1d1
commit: d4dbd22faf1717ce798327b60fc98cd5b7628ec8 [5/6] powerpc/module: use module_alloc_type
config: powerpc-pcm030_defconfig (https://download.01.org/0day-ci/archive/20230519/202305191501.WQ9TlGuW-lkp@xxxxxxxxx/config)
compiler: powerpc-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/song/md.git/commit/?id=d4dbd22faf1717ce798327b60fc98cd5b7628ec8
        git remote add song-md git://git.kernel.org/pub/scm/linux/kernel/git/song/md.git
        git fetch --no-tags song-md module_alloc_test
        git checkout d4dbd22faf1717ce798327b60fc98cd5b7628ec8
        # 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=powerpc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305191501.WQ9TlGuW-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   arch/powerpc/kernel/module.c: In function 'module_alloc_type_init':
>> arch/powerpc/kernel/module.c:108:15: error: unused variable 'ptr' [-Werror=unused-variable]
     108 |         void *ptr = NULL;
         |               ^~~
   cc1: all warnings being treated as errors


vim +/ptr +108 arch/powerpc/kernel/module.c

d4dbd22faf1717 Song Liu         2023-05-17   98  
d4dbd22faf1717 Song Liu         2023-05-17   99  void __init module_alloc_type_init(struct mod_allocators *allocators)
2ec13df167040c Christophe Leroy 2021-04-01  100  {
4fcc636615b1a3 Jordan Niethe    2021-06-09  101  	pgprot_t prot = strict_module_rwx_enabled() ? PAGE_KERNEL : PAGE_KERNEL_EXEC;
d4dbd22faf1717 Song Liu         2023-05-17  102  	struct mod_alloc_params *params = &powerpc_mod_type_allocator.params;
d4dbd22faf1717 Song Liu         2023-05-17  103  	struct vmalloc_params *vmp = &params->vmp[0];
d4dbd22faf1717 Song Liu         2023-05-17  104  	int i;
4fcc636615b1a3 Jordan Niethe    2021-06-09  105  
8abddd968a303d Nicholas Piggin  2021-05-03  106  #ifdef MODULES_VADDR
2ec13df167040c Christophe Leroy 2021-04-01  107  	unsigned long limit = (unsigned long)_etext - SZ_32M;
2ec13df167040c Christophe Leroy 2021-04-01 @108  	void *ptr = NULL;

:::::: The code at line 108 was first introduced by commit
:::::: 2ec13df167040cd153c25c4d96d0ffc573ac4c40 powerpc/modules: Load modules closer to kernel text

:::::: TO: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux