Skip to contentSkip to conversation

arm64: mte: style: Simplify bool comparison

PATCH In review YANG LI 2 participants 2 messages Jan 11, 2021 – Jan 20, 2021

Subsystems (2)
lore
Share & tools
lore

YANG LI

author
#0 lore raw

PATCH 1/1 arm64: mte: style: Simplify bool comparison

Fix the following coccicheck warning:
./tools/testing/selftests/arm64/mte/check_buffer_fill.c:84:12-35:
WARNING: Comparison to bool

---
 tools/testing/selftests/arm64/mte/check_buffer_fill.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/arm64/mte/check_buffer_fill.c +1 -1
index c9fa141..75fc482 100644
@@ -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;
 		}
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 3 lines · YANG LI

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,

Signature · 10 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel