[PW_SID:987419] selftests/mm: Add compiler flags and fix found warnings - #714
[PW_SID:987419] selftests/mm: Add compiler flags and fix found warnings#714linux-riscv-bot wants to merge 9 commits into
Conversation
Enable -Wunreachable-code flag to catch dead code and fix them.
1. Remove the dead code and write a comment instead:
hmm-tests.c:2033:3: warning: code will never be executed
[-Wunreachable-code]
perror("Should not reach this\n");
^~~~~~
2. ksft_exit_fail_msg() calls exit(). Remove the dead code.
split_huge_page_test.c:301:3: warning: code will never be executed
[-Wunreachable-code]
goto cleanup;
^~~~~~~~~~~~
3. Remove duplicate inline.
pkey_sighandler_tests.c:44:15: warning: duplicate 'inline' declaration
specifier [-Wduplicate-decl-specifier]
static inline __always_inline
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The while loop doesn't execute and following warning gets generated:
protection_keys.c:561:15: warning: code will never be executed
[-Wunreachable-code]
int rpkey = alloc_random_pkey();
Let's enable the while loop such that it gets executed nr_iterations
times. Simplify the code a bit as well.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add __unused macro instead of using the complete verbose unused compiler attribute. The raw __attribute__((__unused__)) is quite long and makes code too much verbose to the kernel developer's taste. Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add -Wunused family of flags and fix all the warnings coming because of argc and argv. Remove them if they aren't being used entirely. Use __unused compiler attribute with argc where argv is being used. Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Cleanup code and remove the unused arguments Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Mark the arguments which cannot be removed with __unused attribute. Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Mark the arguments which cannot be removed with __unused attribute. Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
There are functions which have unused arguments for different architectures. Separate the code for each architecture and move #ifdef arch outside these functions. Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 1: "[v2,1/8] selftests/mm: Add -Wunreachable-code and fix warnings" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 2: "[v2,2/8] selftests/mm: protection_keys: Fix dead code" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
|
Patch 8: "[v2,8/8] selftests/mm: Fix unused parameter warnings for different architectures" |
25d60d7 to
f9e6a09
Compare
PR for series 987419 applied to workflow
Name: selftests/mm: Add compiler flags and fix found warnings
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=987419
Version: 2