[modules:ppavlu-module-include 36/37] arch/s390/include/asm/module.h:49:21: error: implicit declaration of function 'strcmp'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: [email protected]
CC: [email protected]
CC: Luis Chamberlain <[email protected]>
CC: Petr Pavlu <[email protected]>
CC: Sami Tolvanen <[email protected]>
CC: Daniel Gomez <[email protected]>
CC: [email protected]
TO: Petr Pavlu <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git ppavlu-module-include
head:   fcbfd3cbe0a054838436812cc0b664f71ba1d0a4
commit: acb4d9bafad10e9712a74d71304a4f3a404eb4ec [36/37] WIP: module: Clean up includes in linux/module.h
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago
config: s390-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260819/[email protected]/config)
compiler: s390x-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260819/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

All errors (new ones prefixed by >>):

   In file included from include/linux/module.h:28,
                    from ../../../drivers/nvdimm/namespace_devs.c:6:
   arch/s390/include/asm/module.h: In function 'find_section':
>> arch/s390/include/asm/module.h:49:21: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
      49 |                 if (strcmp(name, secstrs + s->sh_name) == 0)
         |                     ^~~~~~
   arch/s390/include/asm/module.h:6:1: note: include '<string.h>' or provide a declaration of 'strcmp'
       5 | #include <asm-generic/module.h>
     +++ |+#include <string.h>
       6 | 


vim +/strcmp +49 arch/s390/include/asm/module.h

^1da177e4c3f41 include/asm-s390/module.h      Linus Torvalds 2005-04-16  40  
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  41  static inline const Elf_Shdr *find_section(const Elf_Ehdr *hdr,
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  42  					   const Elf_Shdr *sechdrs,
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  43  					   const char *name)
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  44  {
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  45  	const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  46  	const Elf_Shdr *s, *se;
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  47  
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  48  	for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++) {
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13 @49  		if (strcmp(name, secstrs + s->sh_name) == 0)
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  50  			return s;
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  51  	}
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  52  	return NULL;
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  53  }
a919390e919420 arch/s390/include/asm/module.h Heiko Carstens 2024-09-13  54  

:::::: The code at line 49 was first introduced by commit
:::::: a919390e9194209bac163ec8e19520bdb3fb738b s390/module: Provide find_section() helper

:::::: TO: Heiko Carstens <[email protected]>
:::::: CC: Jason A. Donenfeld <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.