* [PATCH linux-next] tools:mount: Remove unnecessary conversion to bool
@ 2021-08-20 3:32 CGEL
2021-08-24 14:41 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: CGEL @ 2021-08-20 3:32 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-kselftest, linux-kernel, jing yangyang, Zeal Robot
From: jing yangyang <jing.yangyang@zte.com.cn>
Suppress following warning from coccinelle:
./tools/testing/selftests/mount/unprivileged-remount-test.c:285:54-59: WARNING conversion to bool not needed here
./tools/testing/selftests/mount/unprivileged-remount-test.c:207:54-59: WARNING conversion to bool not needed here
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
tools/testing/selftests/mount/unprivileged-remount-test.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c
index 584dc6b..bc802f6 100644
--- a/tools/testing/selftests/mount/unprivileged-remount-test.c
+++ b/tools/testing/selftests/mount/unprivileged-remount-test.c
@@ -204,7 +204,7 @@ bool test_unpriv_remount(const char *fstype, const char *mount_options,
if (!WIFEXITED(status)) {
die("child did not terminate cleanly\n");
}
- return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
+ return WEXITSTATUS(status) == EXIT_SUCCESS;
}
create_and_enter_userns();
@@ -282,7 +282,7 @@ static bool test_priv_mount_unpriv_remount(void)
if (!WIFEXITED(status)) {
die("child did not terminate cleanly\n");
}
- return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
+ return WEXITSTATUS(status) == EXIT_SUCCESS;
}
orig_mnt_flags = read_mnt_flags(orig_path);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] tools:mount: Remove unnecessary conversion to bool
2021-08-20 3:32 [PATCH linux-next] tools:mount: Remove unnecessary conversion to bool CGEL
@ 2021-08-24 14:41 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2021-08-24 14:41 UTC (permalink / raw)
To: CGEL, Shuah Khan
Cc: linux-kselftest, linux-kernel, jing yangyang, Zeal Robot, Shuah Khan
On 8/19/21 9:32 PM, CGEL wrote:
> From: jing yangyang <jing.yangyang@zte.com.cn>
>
> Suppress following warning from coccinelle:
>
> ./tools/testing/selftests/mount/unprivileged-remount-test.c:285:54-59: WARNING conversion to bool not needed here
> ./tools/testing/selftests/mount/unprivileged-remount-test.c:207:54-59: WARNING conversion to bool not needed here
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
> ---
> tools/testing/selftests/mount/unprivileged-remount-test.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c
> index 584dc6b..bc802f6 100644
> --- a/tools/testing/selftests/mount/unprivileged-remount-test.c
> +++ b/tools/testing/selftests/mount/unprivileged-remount-test.c
> @@ -204,7 +204,7 @@ bool test_unpriv_remount(const char *fstype, const char *mount_options,
> if (!WIFEXITED(status)) {
> die("child did not terminate cleanly\n");
> }
> - return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
> + return WEXITSTATUS(status) == EXIT_SUCCESS;
> }
>
> create_and_enter_userns();
> @@ -282,7 +282,7 @@ static bool test_priv_mount_unpriv_remount(void)
> if (!WIFEXITED(status)) {
> die("child did not terminate cleanly\n");
> }
> - return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
> + return WEXITSTATUS(status) == EXIT_SUCCESS;
> }
>
> orig_mnt_flags = read_mnt_flags(orig_path);
>
We can't accept this patch. The from and Signed-off-by don't match.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-24 14:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 3:32 [PATCH linux-next] tools:mount: Remove unnecessary conversion to bool CGEL
2021-08-24 14:41 ` Shuah Khan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.