lkml.org 
[lkml]   [2022]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 1/1] percpu: cleanup invalid assignment to err in pcpu_alloc
Date
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
\
 
 \ /
  Last update: 2022-12-04 04:15    [W:0.042 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site