[PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash

From: Li zeming
Date: Sun Aug 27 2023 - 21:54:23 EST


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

Signed-off-by: Li zeming <zeming@xxxxxxxxxxxx>
---
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