Thread (2 messages) flat view 2 messages, 2 authors, 2021-05-07
STALE1932d

[PATCH] sysctl: Remove redundant assignment to first

From: Jiapeng Chong <hidden>
Date: 2021-05-07 10:16:26
Also in: bpf, linux-fsdevel, lkml
Subsystem: proc sysctl, the rest · Maintainers: Kees Cook, Joel Granados, Linus Torvalds

Variable first is set to '0', but this value is never read as it is
not used later on, hence it is a redundant assignment and can be
removed.

Clean up the following clang-analyzer warning:

kernel/sysctl.c:1562:4: warning: Value stored to 'first' is never read
[clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <redacted>
Signed-off-by: Jiapeng Chong <redacted>
---
 kernel/sysctl.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 14edf84..58beeba 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1559,7 +1559,6 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
 			}
 
 			bitmap_set(tmp_bitmap, val_a, val_b - val_a + 1);
-			first = 0;
 			proc_skip_char(&p, &left, '\n');
 		}
 		left += skipped;
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help