linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).