relay: remove redundant assignment to pointer buf
Subsystems (2)
PATCH 1/1 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]
--- kernel/relay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/relay.c +1 -1
@@ -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) {
Signature · 1 line
2.35.1
Quoted 8 lines · Colin Ian King
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]
Andrew, I'm assuming you'll pick this up?
Signature · 1 line
Jens Axboe