linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
  2023-08-29 18:17 [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash Li zeming
@ 2023-08-28  4:47 ` kernel test robot
  2023-08-28  5:19 ` kernel test robot
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-08-28  4:47 UTC (permalink / raw)
  To: Li zeming, tj, jiangshanlai; +Cc: oe-kbuild-all, linux-kernel, Li zeming

Hi Li,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tj-wq/for-next]
[also build test WARNING on linus/master v6.5 next-20230825]
[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/Li-zeming/kernel-workqueue-Remove-unnecessary-0-values-from-hash/20230828-095048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link:    https://lore.kernel.org/r/20230829181755.3204-1-zeming%40nfschina.com
patch subject: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20230828/202308281239.bDfhnlkw-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308281239.bDfhnlkw-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/202308281239.bDfhnlkw-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/workqueue.c: In function 'wqattrs_hash':
>> kernel/workqueue.c:3777:16: warning: 'hash' is used uninitialized [-Wuninitialized]
    3777 |         hash = jhash_1word(attrs->nice, hash);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/workqueue.c:3775:13: note: 'hash' was declared here
    3775 |         u32 hash;
         |             ^~~~


vim +/hash +3777 kernel/workqueue.c

5de7a03cac14765 Tejun Heo           2023-08-07  3771  
6ba94429c8e7b87 Frederic Weisbecker 2015-04-02  3772  /* hash value of the content of @attr */
6ba94429c8e7b87 Frederic Weisbecker 2015-04-02  3773  static u32 wqattrs_hash(const struct workqueue_attrs *attrs)
226223ab3c4118d Tejun Heo           2013-03-12  3774  {
dd46423224bbdfa Li zeming           2023-08-30  3775  	u32 hash;
226223ab3c4118d Tejun Heo           2013-03-12  3776  
6ba94429c8e7b87 Frederic Weisbecker 2015-04-02 @3777  	hash = jhash_1word(attrs->nice, hash);
6ba94429c8e7b87 Frederic Weisbecker 2015-04-02  3778  	hash = jhash(cpumask_bits(attrs->cpumask),
6ba94429c8e7b87 Frederic Weisbecker 2015-04-02  3779  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
9546b29e4a6ad6e Tejun Heo           2023-08-07  3780  	hash = jhash(cpumask_bits(attrs->__pod_cpumask),
9546b29e4a6ad6e Tejun Heo           2023-08-07  3781  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
8639ecebc9b1796 Tejun Heo           2023-08-07  3782  	hash = jhash_1word(attrs->affn_strict, hash);
6ba94429c8e7b87 Frederic Weisbecker 2015-04-02  3783  	return hash;
d55262c4d164759 Tejun Heo           2013-04-01  3784  }
226223ab3c4118d Tejun Heo           2013-03-12  3785  

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

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

* Re: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
  2023-08-29 18:17 [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash Li zeming
  2023-08-28  4:47 ` kernel test robot
@ 2023-08-28  5:19 ` kernel test robot
  2023-10-12 14:54 ` kernel test robot
  2023-10-12 15:06 ` kernel test robot
  3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-08-28  5:19 UTC (permalink / raw)
  To: Li zeming, tj, jiangshanlai; +Cc: oe-kbuild-all, linux-kernel, Li zeming

Hi Li,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tj-wq/for-next]
[also build test WARNING on linus/master v6.5 next-20230825]
[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/Li-zeming/kernel-workqueue-Remove-unnecessary-0-values-from-hash/20230828-095048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link:    https://lore.kernel.org/r/20230829181755.3204-1-zeming%40nfschina.com
patch subject: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20230828/202308281313.YHarxg3i-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20230828/202308281313.YHarxg3i-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/202308281313.YHarxg3i-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/workqueue.c: In function 'wqattrs_hash':
>> kernel/workqueue.c:3777:7: warning: 'hash' is used uninitialized in this function [-Wuninitialized]
     hash = jhash_1word(attrs->nice, hash);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/hash +3777 kernel/workqueue.c

5de7a03cac1476 Tejun Heo           2023-08-07  3771  
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3772  /* hash value of the content of @attr */
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3773  static u32 wqattrs_hash(const struct workqueue_attrs *attrs)
226223ab3c4118 Tejun Heo           2013-03-12  3774  {
dd46423224bbdf Li zeming           2023-08-30  3775  	u32 hash;
226223ab3c4118 Tejun Heo           2013-03-12  3776  
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02 @3777  	hash = jhash_1word(attrs->nice, hash);
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3778  	hash = jhash(cpumask_bits(attrs->cpumask),
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3779  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
9546b29e4a6ad6 Tejun Heo           2023-08-07  3780  	hash = jhash(cpumask_bits(attrs->__pod_cpumask),
9546b29e4a6ad6 Tejun Heo           2023-08-07  3781  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
8639ecebc9b179 Tejun Heo           2023-08-07  3782  	hash = jhash_1word(attrs->affn_strict, hash);
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3783  	return hash;
d55262c4d16475 Tejun Heo           2013-04-01  3784  }
226223ab3c4118 Tejun Heo           2013-03-12  3785  

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

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

* [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
@ 2023-08-29 18:17 Li zeming
  2023-08-28  4:47 ` kernel test robot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Li zeming @ 2023-08-29 18:17 UTC (permalink / raw)
  To: tj, jiangshanlai; +Cc: linux-kernel, Li zeming

hash is assigned first, so it does not need to initialize the
assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 45213c74d391..c3a0d10088b4 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3736,7 +3736,7 @@ static void copy_workqueue_attrs(struct workqueue_attrs *to,
 /* hash value of the content of @attr */
 static u32 wqattrs_hash(const struct workqueue_attrs *attrs)
 {
-	u32 hash = 0;
+	u32 hash;
 
 	hash = jhash_1word(attrs->nice, hash);
 	hash = jhash(cpumask_bits(attrs->cpumask),
-- 
2.18.2


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

* Re: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
  2023-08-29 18:17 [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash Li zeming
  2023-08-28  4:47 ` kernel test robot
  2023-08-28  5:19 ` kernel test robot
@ 2023-10-12 14:54 ` kernel test robot
  2023-10-12 15:06 ` kernel test robot
  3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-10-12 14:54 UTC (permalink / raw)
  To: Li zeming, tj, jiangshanlai; +Cc: oe-kbuild-all, linux-kernel, Li zeming

Hi Li,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tj-wq/for-next]
[also build test WARNING on linus/master v6.6-rc5 next-20231012]
[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/Li-zeming/kernel-workqueue-Remove-unnecessary-0-values-from-hash/20230828-095048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link:    https://lore.kernel.org/r/20230829181755.3204-1-zeming%40nfschina.com
patch subject: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20231012/202310122250.6u2Qc26r-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231012/202310122250.6u2Qc26r-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/202310122250.6u2Qc26r-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/workqueue.c: In function 'wqattrs_hash':
>> kernel/workqueue.c:3777:7: warning: 'hash' is used uninitialized in this function [-Wuninitialized]
     hash = jhash_1word(attrs->nice, hash);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/hash +3777 kernel/workqueue.c

5de7a03cac1476 Tejun Heo           2023-08-07  3771  
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3772  /* hash value of the content of @attr */
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3773  static u32 wqattrs_hash(const struct workqueue_attrs *attrs)
226223ab3c4118 Tejun Heo           2013-03-12  3774  {
dd46423224bbdf Li zeming           2023-08-30  3775  	u32 hash;
226223ab3c4118 Tejun Heo           2013-03-12  3776  
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02 @3777  	hash = jhash_1word(attrs->nice, hash);
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3778  	hash = jhash(cpumask_bits(attrs->cpumask),
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3779  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
9546b29e4a6ad6 Tejun Heo           2023-08-07  3780  	hash = jhash(cpumask_bits(attrs->__pod_cpumask),
9546b29e4a6ad6 Tejun Heo           2023-08-07  3781  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
8639ecebc9b179 Tejun Heo           2023-08-07  3782  	hash = jhash_1word(attrs->affn_strict, hash);
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3783  	return hash;
d55262c4d16475 Tejun Heo           2013-04-01  3784  }
226223ab3c4118 Tejun Heo           2013-03-12  3785  

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

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

* Re: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
  2023-08-29 18:17 [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash Li zeming
                   ` (2 preceding siblings ...)
  2023-10-12 14:54 ` kernel test robot
@ 2023-10-12 15:06 ` kernel test robot
  3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-10-12 15:06 UTC (permalink / raw)
  To: Li zeming, tj, jiangshanlai; +Cc: oe-kbuild-all, linux-kernel, Li zeming

Hi Li,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tj-wq/for-next]
[also build test WARNING on linus/master v6.6-rc5 next-20231012]
[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/Li-zeming/kernel-workqueue-Remove-unnecessary-0-values-from-hash/20230828-095048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link:    https://lore.kernel.org/r/20230829181755.3204-1-zeming%40nfschina.com
patch subject: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20231012/202310122246.FzszMZbr-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231012/202310122246.FzszMZbr-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/202310122246.FzszMZbr-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/workqueue.c: In function 'wqattrs_hash':
>> kernel/workqueue.c:3777:16: warning: 'hash' is used uninitialized [-Wuninitialized]
    3777 |         hash = jhash_1word(attrs->nice, hash);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/workqueue.c:3775:13: note: 'hash' was declared here
    3775 |         u32 hash;
         |             ^~~~


vim +/hash +3777 kernel/workqueue.c

5de7a03cac1476 Tejun Heo           2023-08-07  3771  
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3772  /* hash value of the content of @attr */
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3773  static u32 wqattrs_hash(const struct workqueue_attrs *attrs)
226223ab3c4118 Tejun Heo           2013-03-12  3774  {
dd46423224bbdf Li zeming           2023-08-30  3775  	u32 hash;
226223ab3c4118 Tejun Heo           2013-03-12  3776  
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02 @3777  	hash = jhash_1word(attrs->nice, hash);
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3778  	hash = jhash(cpumask_bits(attrs->cpumask),
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3779  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
9546b29e4a6ad6 Tejun Heo           2023-08-07  3780  	hash = jhash(cpumask_bits(attrs->__pod_cpumask),
9546b29e4a6ad6 Tejun Heo           2023-08-07  3781  		     BITS_TO_LONGS(nr_cpumask_bits) * sizeof(long), hash);
8639ecebc9b179 Tejun Heo           2023-08-07  3782  	hash = jhash_1word(attrs->affn_strict, hash);
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  3783  	return hash;
d55262c4d16475 Tejun Heo           2013-04-01  3784  }
226223ab3c4118 Tejun Heo           2013-03-12  3785  

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

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

end of thread, other threads:[~2023-10-12 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-29 18:17 [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash Li zeming
2023-08-28  4:47 ` kernel test robot
2023-08-28  5:19 ` kernel test robot
2023-10-12 14:54 ` kernel test robot
2023-10-12 15:06 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).