[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241101091324.2372626-1-quzicheng@huawei.com>
Date: Fri, 1 Nov 2024 09:13:24 +0000
From: Zicheng Qu <quzicheng@...wei.com>
To: <steffen.klassert@...unet.com>, <daniel.m.jordan@...cle.com>,
<linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <tanghui20@...wei.com>, <zhangqiao22@...wei.com>,
<judy.chenhui@...wei.com>, <quzicheng@...wei.com>
Subject: [PATCH] padata: Clean up in padata_do_multithreaded()
In commit 24cc57d8faaa ("padata: Honor the caller's alignment in case of
chunk_size 0"), the line 'ps.chunk_size = max(ps.chunk_size, 1ul)' was
added, making 'ps.chunk_size = 1U' redundant and never executed.
Signed-off-by: Zicheng Qu <quzicheng@...wei.com>
---
kernel/padata.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/kernel/padata.c b/kernel/padata.c
index d899f34558af..d51bbc76b227 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -521,13 +521,6 @@ void __init padata_do_multithreaded(struct padata_mt_job *job)
ps.chunk_size = max(ps.chunk_size, 1ul);
ps.chunk_size = roundup(ps.chunk_size, job->align);
- /*
- * chunk_size can be 0 if the caller sets min_chunk to 0. So force it
- * to at least 1 to prevent divide-by-0 panic in padata_mt_helper().`
- */
- if (!ps.chunk_size)
- ps.chunk_size = 1U;
-
list_for_each_entry(pw, &works, pw_list)
if (job->numa_aware) {
int old_node = atomic_read(&last_used_nid);
--
2.34.1
Powered by blists - more mailing lists