From: Li zeming <zeming@nfschina.com>
To: tj@kernel.org, jiangshanlai@gmail.com
Cc: linux-kernel@vger.kernel.org, Li zeming <zeming@nfschina.com>
Subject: [PATCH] kernel/workqueue: Remove unnecessary ‘0’ values from hash
Date: Wed, 30 Aug 2023 02:17:55 +0800 [thread overview]
Message-ID: <20230829181755.3204-1-zeming@nfschina.com> (raw)
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
next reply other threads:[~2023-08-28 1:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 18:17 Li zeming [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230829181755.3204-1-zeming@nfschina.com \
--to=zeming@nfschina.com \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®