lib/hweight.c:14: warning: expecting prototype for hweightN(). Prototype was for __sw_hweight32() instead

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

 



Hi Mauro,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2d8308bf5b67dff50262d8a9260a50113b3628c6
commit: 52042e2db45290f6a512d525518488b7bf143531 scripts: kernel-doc: validate kernel-doc markup with the actual names
date:   3 years, 11 months ago
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20241215/202412151922.P70dxEDk-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241215/202412151922.P70dxEDk-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/202412151922.P70dxEDk-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   lib/hweight.c:14: warning: Function parameter or member 'w' not described in '__sw_hweight32'
>> lib/hweight.c:14: warning: expecting prototype for hweightN(). Prototype was for __sw_hweight32() instead


vim +14 lib/hweight.c

3b9ed1a5d2d121f Akinobu Mita    2006-03-26   5  
3b9ed1a5d2d121f Akinobu Mita    2006-03-26   6  /**
3b9ed1a5d2d121f Akinobu Mita    2006-03-26   7   * hweightN - returns the hamming weight of a N-bit word
3b9ed1a5d2d121f Akinobu Mita    2006-03-26   8   * @x: the word to weigh
3b9ed1a5d2d121f Akinobu Mita    2006-03-26   9   *
3b9ed1a5d2d121f Akinobu Mita    2006-03-26  10   * The Hamming Weight of a number is the total number of bits set in it.
3b9ed1a5d2d121f Akinobu Mita    2006-03-26  11   */
3b9ed1a5d2d121f Akinobu Mita    2006-03-26  12  
d61931d89be5063 Borislav Petkov 2010-03-05  13  unsigned int __sw_hweight32(unsigned int w)
3b9ed1a5d2d121f Akinobu Mita    2006-03-26 @14  {
72d931046030beb Linus Torvalds  2014-09-13  15  #ifdef CONFIG_ARCH_HAS_FAST_MULTIPLIER
39d997b514e12d5 Akinobu Mita    2009-12-21  16  	w -= (w >> 1) & 0x55555555;
39d997b514e12d5 Akinobu Mita    2009-12-21  17  	w =  (w & 0x33333333) + ((w >> 2) & 0x33333333);
39d997b514e12d5 Akinobu Mita    2009-12-21  18  	w =  (w + (w >> 4)) & 0x0f0f0f0f;
39d997b514e12d5 Akinobu Mita    2009-12-21  19  	return (w * 0x01010101) >> 24;
39d997b514e12d5 Akinobu Mita    2009-12-21  20  #else
f9b4192923fa6e3 Akinobu Mita    2006-03-26  21  	unsigned int res = w - ((w >> 1) & 0x55555555);
3b9ed1a5d2d121f Akinobu Mita    2006-03-26  22  	res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
f9b4192923fa6e3 Akinobu Mita    2006-03-26  23  	res = (res + (res >> 4)) & 0x0F0F0F0F;
f9b4192923fa6e3 Akinobu Mita    2006-03-26  24  	res = res + (res >> 8);
f9b4192923fa6e3 Akinobu Mita    2006-03-26  25  	return (res + (res >> 16)) & 0x000000FF;
39d997b514e12d5 Akinobu Mita    2009-12-21  26  #endif
3b9ed1a5d2d121f Akinobu Mita    2006-03-26  27  }
d61931d89be5063 Borislav Petkov 2010-03-05  28  EXPORT_SYMBOL(__sw_hweight32);
3b9ed1a5d2d121f Akinobu Mita    2006-03-26  29  

:::::: The code at line 14 was first introduced by commit
:::::: 3b9ed1a5d2d121f32d2cb4f2b05f1fc57c99c946 [PATCH] bitops: generic hweight{64,32,16,8}()

:::::: TO: Akinobu Mita <mita@xxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxx>

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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux