[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220508212152.58753-1-colin.i.king@gmail.com>
Date: Sun, 8 May 2022 22:21:52 +0100
From: Colin Ian King <colin.i.king@...il.com>
To: Christoph Hellwig <hch@....de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: kernel-janitors@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
Kalle Valo <kvalo@...eaurora.org>, linux-kernel@...r.kernel.org
Subject: [PATCH] relay: remove redundant assignment to pointer buf
Pointer buf is being assigned a value that is not being read, buf
is being re-assigned in the next starement. The assignment is
redundant and can be removed.
Cleans up clang scan build warning:
kernel/relay.c:443:8: warning: Although the value stored to 'buf' is
used in the enclosing expression, the value is never actually read
from 'buf' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
kernel/relay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/relay.c b/kernel/relay.c
index d1a67fbb819d..6a611e779e95 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -440,7 +440,7 @@ int relay_prepare_cpu(unsigned int cpu)
mutex_lock(&relay_channels_mutex);
list_for_each_entry(chan, &relay_channels, list) {
- if ((buf = *per_cpu_ptr(chan->buf, cpu)))
+ if (*per_cpu_ptr(chan->buf, cpu))
continue;
buf = relay_open_buf(chan, cpu);
if (!buf) {
--
2.35.1
Powered by blists - more mailing lists