[linux-next:master 3550/3551] arch/sparc/kernel/module.c:62:15: warning: variable 'strtab' set but not used

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   48bbaf8b793e0770798519f8ee1ea2908ff0943a
commit: 233d97f67e6525aff8a621735926a8acbd980ca1 [3550/3551] sparc: turn off Werror for now
config: sparc-sparc64_defconfig (https://download.01.org/0day-ci/archive/20231127/202311271426.FJQQCgZw-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231127/202311271426.FJQQCgZw-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311271426.FJQQCgZw-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   arch/sparc/kernel/module.c: In function 'module_frob_arch_sections':
>> arch/sparc/kernel/module.c:62:15: warning: variable 'strtab' set but not used [-Wunused-but-set-variable]
      62 |         char *strtab;
         |               ^~~~~~
--
   arch/sparc/mm/init_64.c: In function 'arch_hugetlb_valid_size':
>> arch/sparc/mm/init_64.c:361:24: warning: variable 'hv_pgsz_idx' set but not used [-Wunused-but-set-variable]
     361 |         unsigned short hv_pgsz_idx;
         |                        ^~~~~~~~~~~
   arch/sparc/mm/init_64.c: At top level:
   arch/sparc/mm/init_64.c:2644:6: warning: no previous prototype for 'vmemmap_free' [-Wmissing-prototypes]
    2644 | void vmemmap_free(unsigned long start, unsigned long end,
         |      ^~~~~~~~~~~~


vim +/strtab +62 arch/sparc/kernel/module.c

^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  53  
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  54  /* Make generic code ignore STT_REGISTER dummy undefined symbols.  */
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  55  int module_frob_arch_sections(Elf_Ehdr *hdr,
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  56  			      Elf_Shdr *sechdrs,
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  57  			      char *secstrings,
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  58  			      struct module *mod)
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  59  {
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  60  	unsigned int symidx;
c45d1c209f7420 arch/sparc/kernel/module_64.c Sam Ravnborg    2008-12-26  61  	Elf_Sym *sym;
627bf2f678ba73 arch/sparc/kernel/module_64.c Sam Ravnborg    2008-12-26 @62  	char *strtab;
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  63  	int i;
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  64  
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  65  	for (symidx = 0; sechdrs[symidx].sh_type != SHT_SYMTAB; symidx++) {
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  66  		if (symidx == hdr->e_shnum-1) {
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  67  			printk("%s: no symtab found.\n", mod->name);
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  68  			return -ENOEXEC;
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  69  		}
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  70  	}
c45d1c209f7420 arch/sparc/kernel/module_64.c Sam Ravnborg    2008-12-26  71  	sym = (Elf_Sym *)sechdrs[symidx].sh_addr;
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  72  	strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr;
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  73  
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  74  	for (i = 1; i < sechdrs[symidx].sh_size / sizeof(Elf_Sym); i++) {
627bf2f678ba73 arch/sparc/kernel/module_64.c Sam Ravnborg    2008-12-26  75  		if (sym[i].st_shndx == SHN_UNDEF) {
1b35a57b1c1781 arch/sparc/kernel/module.c    David S. Miller 2012-05-15  76  			if (ELF_ST_TYPE(sym[i].st_info) == STT_REGISTER)
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  77  				sym[i].st_shndx = SHN_ABS;
627bf2f678ba73 arch/sparc/kernel/module_64.c Sam Ravnborg    2008-12-26  78  		}
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  79  	}
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  80  	return 0;
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  81  }
^1da177e4c3f41 arch/sparc64/kernel/module.c  Linus Torvalds  2005-04-16  82  

:::::: The code at line 62 was first introduced by commit
:::::: 627bf2f678ba7325461922af137ff5f20b6523eb sparc64: prepare module_64.c for unification

:::::: TO: Sam Ravnborg <sam@xxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux