[linux-next:master 8187/8914] lib/bitmap.c:351:6: error: conflicting types for '__bitmap_set'; have 'void(long unsigned int *, unsigned int, unsigned int)'

[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:   f2528c29385819a84480cacef4886b049761e2c5
commit: aaa4ab5ec04480fd0c16c7452d28444c862b2b87 [8187/8914] lib/bitmap: Make length parameter `len` unsigned
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20220708/202207082141.4CIiKu3c-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=aaa4ab5ec04480fd0c16c7452d28444c862b2b87
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout aaa4ab5ec04480fd0c16c7452d28444c862b2b87
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the linux-next/master HEAD f2528c29385819a84480cacef4886b049761e2c5 builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

>> lib/bitmap.c:351:6: error: conflicting types for '__bitmap_set'; have 'void(long unsigned int *, unsigned int,  unsigned int)'
     351 | void __bitmap_set(unsigned long *map, unsigned int start, unsigned int len)
         |      ^~~~~~~~~~~~
   In file included from lib/bitmap.c:7:
   include/linux/bitmap.h:167:6: note: previous declaration of '__bitmap_set' with type 'void(long unsigned int *, unsigned int,  int)'
     167 | void __bitmap_set(unsigned long *map, unsigned int start, int len);
         |      ^~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/printk.h:8,
                    from include/asm-generic/bug.h:22,
                    from arch/x86/include/asm/bug.h:87,
                    from include/linux/bug.h:5,
                    from include/linux/jump_label.h:257,
                    from arch/x86/include/asm/string_64.h:6,
                    from arch/x86/include/asm/string.h:5,
                    from include/linux/string.h:20,
                    from include/linux/bitmap.h:11,
                    from lib/bitmap.c:7:
   lib/bitmap.c:370:15: error: conflicting types for '__bitmap_set'; have 'void(long unsigned int *, unsigned int,  unsigned int)'
     370 | EXPORT_SYMBOL(__bitmap_set);
         |               ^~~~~~~~~~~~
   include/linux/export.h:87:28: note: in definition of macro '___EXPORT_SYMBOL'
      87 |         extern typeof(sym) sym;                                                 \
         |                            ^~~
   include/linux/export.h:147:41: note: in expansion of macro '__EXPORT_SYMBOL'
     147 | #define _EXPORT_SYMBOL(sym, sec)        __EXPORT_SYMBOL(sym, sec, "")
         |                                         ^~~~~~~~~~~~~~~
   include/linux/export.h:150:41: note: in expansion of macro '_EXPORT_SYMBOL'
     150 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
         |                                         ^~~~~~~~~~~~~~
   lib/bitmap.c:370:1: note: in expansion of macro 'EXPORT_SYMBOL'
     370 | EXPORT_SYMBOL(__bitmap_set);
         | ^~~~~~~~~~~~~
   In file included from lib/bitmap.c:7:
   include/linux/bitmap.h:167:6: note: previous declaration of '__bitmap_set' with type 'void(long unsigned int *, unsigned int,  int)'
     167 | void __bitmap_set(unsigned long *map, unsigned int start, int len);
         |      ^~~~~~~~~~~~


vim +351 lib/bitmap.c

   350	
 > 351	void __bitmap_set(unsigned long *map, unsigned int start, unsigned int len)
   352	{
   353		unsigned long *p = map + BIT_WORD(start);
   354		const unsigned int size = start + len;
   355		int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG);
   356		unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start);
   357	
   358		while (len >= bits_to_set) {
   359			*p |= mask_to_set;
   360			len -= bits_to_set;
   361			bits_to_set = BITS_PER_LONG;
   362			mask_to_set = ~0UL;
   363			p++;
   364		}
   365		if (len) {
   366			mask_to_set &= BITMAP_LAST_WORD_MASK(size);
   367			*p |= mask_to_set;
   368		}
   369	}
   370	EXPORT_SYMBOL(__bitmap_set);
   371	

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




[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