Re: [PATCH v4 3/5] string: add strends() helper to check if a string ends with a suffix

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

 



Hi Christian,

kernel test robot noticed the following build errors:

[auto build test ERROR on axboe-block/for-next]
[also build test ERROR on kees/for-next/hardening robh/for-next lwn/docs-next linus/master v6.12-rc1 next-20241001]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Christian-Marangi/block-add-support-for-defining-read-only-partitions/20240930-193609
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/20240930113045.28616-4-ansuelsmth%40gmail.com
patch subject: [PATCH v4 3/5] string: add strends() helper to check if a string ends with a suffix
config: s390-randconfig-r061-20241001 (https://download.01.org/0day-ci/archive/20241002/202410020546.DL6BnsOs-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410020546.DL6BnsOs-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/202410020546.DL6BnsOs-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from arch/s390/purgatory/string.c:3:
   In file included from arch/s390/purgatory/../lib/string.c:16:
>> include/linux/string.h:366:20: error: call to undeclared function 'memcmp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     366 |         return n >= m && !memcmp(str + n - m, suffix, m);
         |                           ^
   1 error generated.


vim +/memcmp +366 include/linux/string.h

   355	
   356	/**
   357	 * strends - does @str end with @suffix?
   358	 * @str: string to examine
   359	 * @suffix: suffix to look for.
   360	 */
   361	static inline bool strends(const char *str, const char *suffix)
   362	{
   363		size_t n = strlen(str);
   364		size_t m = strlen(suffix);
   365	
 > 366		return n >= m && !memcmp(str + n - m, suffix, m);
   367	}
   368	

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux