public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* lib/hweight.c:14: warning: expecting prototype for hweightN(). Prototype was for __sw_hweight32() instead
@ 2024-12-15 11:34 kernel test robot
  2024-12-15 14:45 ` Philip Li
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-12-15 11:34 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: oe-kbuild-all, linux-kernel, linux-media, Jonathan Corbet

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412151922.P70dxEDk-lkp@intel.com/

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@miraclelinux.com>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: lib/hweight.c:14: warning: expecting prototype for hweightN(). Prototype was for __sw_hweight32() instead
  2024-12-15 11:34 lib/hweight.c:14: warning: expecting prototype for hweightN(). Prototype was for __sw_hweight32() instead kernel test robot
@ 2024-12-15 14:45 ` Philip Li
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Li @ 2024-12-15 14:45 UTC (permalink / raw)
  To: kernel test robot
  Cc: Mauro Carvalho Chehab, oe-kbuild-all, linux-kernel, linux-media,
	Jonathan Corbet

On Sun, Dec 15, 2024 at 07:34:16PM +0800, kernel test robot wrote:
> 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@intel.com/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@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202412151922.P70dxEDk-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):

Sorry, kindly ignore this report, the commit is not the actual cause of
the issue.

> 
>    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@miraclelinux.com>
> :::::: CC: Linus Torvalds <torvalds@g5.osdl.org>
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-15 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-15 11:34 lib/hweight.c:14: warning: expecting prototype for hweightN(). Prototype was for __sw_hweight32() instead kernel test robot
2024-12-15 14:45 ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox