* [PATCH] arm64: mte: style: Simplify bool comparison
@ 2021-01-11 9:35 YANG LI
2021-01-20 13:01 ` Will Deacon
0 siblings, 1 reply; 2+ messages in thread
From: YANG LI @ 2021-01-11 9:35 UTC (permalink / raw)
To: catalin.marinas
Cc: YANG LI, will, gabor.kertesz, linux-kernel, linux-kselftest,
amit.kachhap, vincenzo.frascino, shuah, linux-arm-kernel
Fix the following coccicheck warning:
./tools/testing/selftests/arm64/mte/check_buffer_fill.c:84:12-35:
WARNING: Comparison to bool
Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
---
tools/testing/selftests/arm64/mte/check_buffer_fill.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/arm64/mte/check_buffer_fill.c b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
index c9fa141..75fc482 100644
--- a/tools/testing/selftests/arm64/mte/check_buffer_fill.c
+++ b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
@@ -81,7 +81,7 @@ static int check_buffer_underflow_by_byte(int mem_type, int mode,
last_index = 0;
/* Set some value in tagged memory and make the buffer underflow */
for (j = sizes[i] - 1; (j >= -underflow_range) &&
- (cur_mte_cxt.fault_valid == false); j--) {
+ (!cur_mte_cxt.fault_valid); j--) {
ptr[j] = '1';
last_index = j;
}
--
1.8.3.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: mte: style: Simplify bool comparison
2021-01-11 9:35 [PATCH] arm64: mte: style: Simplify bool comparison YANG LI
@ 2021-01-20 13:01 ` Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2021-01-20 13:01 UTC (permalink / raw)
To: YANG LI, catalin.marinas
Cc: shuah, kernel-team, gabor.kertesz, linux-kernel, linux-kselftest,
amit.kachhap, vincenzo.frascino, Will Deacon, linux-arm-kernel
On Mon, 11 Jan 2021 17:35:37 +0800, YANG LI wrote:
> Fix the following coccicheck warning:
> ./tools/testing/selftests/arm64/mte/check_buffer_fill.c:84:12-35:
> WARNING: Comparison to bool
Applied to arm64 (for-next/selftests), thanks!
[1/1] arm64: mte: style: Simplify bool comparison
https://git.kernel.org/arm64/c/dd313a2653d4
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-20 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-11 9:35 [PATCH] arm64: mte: style: Simplify bool comparison YANG LI
2021-01-20 13:01 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).