linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 1/1] percpu: cleanup invalid assignment to err in pcpu_alloc
@ 2022-12-04  3:14 Wupeng Ma
  2022-12-04 12:11 ` Baoquan He
  0 siblings, 1 reply; 5+ messages in thread
From: Wupeng Ma @ 2022-12-04  3:14 UTC (permalink / raw)
  To: akpm, tj, dennis, cl; +Cc: linux-mm, linux-kernel, mawupeng1

From: Ma Wupeng <mawupeng1@huawei.com>

Assignment to err if is_atomic is true will never be used since warn
message can only be shown if is_atomic is false after label fail. So drop
it.

Signed-off-by: Ma Wupeng <mawupeng1@huawei.com>
---
 mm/percpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index acd78da0493b..df86d79325b2 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1817,10 +1817,8 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved,
 
 	spin_unlock_irqrestore(&pcpu_lock, flags);
 
-	if (is_atomic) {
-		err = "atomic alloc failed, no space left";
+	if (is_atomic)
 		goto fail;
-	}
 
 	/* No space left.  Create a new chunk. */
 	if (list_empty(&pcpu_chunk_lists[pcpu_free_slot])) {
-- 
2.25.1



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

end of thread, other threads:[~2022-12-05  2:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-04  3:14 [PATCH -next 1/1] percpu: cleanup invalid assignment to err in pcpu_alloc Wupeng Ma
2022-12-04 12:11 ` Baoquan He
2022-12-04 16:21   ` Christoph Lameter
2022-12-05  0:30   ` Dennis Zhou
2022-12-05  2:24     ` Baoquan He

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