aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmer Al Shanawany <[email protected]>2024-06-03 12:42:20 +0000
committerAndrew Morton <[email protected]>2024-06-29 02:36:27 +0000
commit2d87af0666d0b5838e3e3e6430c6498df8bf6ad5 (patch)
treeaae7e6b662a44173c59dc270da9bc00c0e61de2b
parenttools/testing/radix-tree/idr-test: add missing MODULE_DESCRIPTION define (diff)
downloadkernel-2d87af0666d0b5838e3e3e6430c6498df8bf6ad5.tar.gz
kernel-2d87af0666d0b5838e3e3e6430c6498df8bf6ad5.zip
selftests: proc: remove unreached code and fix build warning
fix the following warning: proc-empty-vm.c:385:17: warning: ignoring return value of `write' declared with attribute `warn_unused_result' [-Wunused-result] 385 | write(1, buf, rv); | ^~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Amer Al Shanawany <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Cc: Alexey Dobriyan <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Javier Carrasco <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Swarup Laxman Kotiaklapudi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--tools/testing/selftests/proc/proc-empty-vm.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/proc/proc-empty-vm.c
index 56198d4ca2bf..b3f898aab4ab 100644
--- a/tools/testing/selftests/proc/proc-empty-vm.c
+++ b/tools/testing/selftests/proc/proc-empty-vm.c
@@ -381,9 +381,6 @@ static int test_proc_pid_statm(pid_t pid)
assert(rv >= 0);
assert(rv <= sizeof(buf));
- if (0) {
- write(1, buf, rv);
- }
const char *p = buf;
const char *const end = p + rv;