arm64: mte: change PR_MTE_TCF_NONE back into an unsigned long
PATCH 1/1 arm64: mte: change PR_MTE_TCF_NONE back into an unsigned long
This constant was previously an unsigned long, but was changed into an int in commit 433c38f40f6a ("arm64: mte: change ASYNC and SYNC TCF settings into bitfields"). This ended up causing spurious unsigned-signed comparison warnings in expressions such as:
(x & PR_MTE_TCF_MASK) != PR_MTE_TCF_NONE
Therefore, change it back into an unsigned long to silence these warnings.
--- include/uapi/linux/prctl.h | 2 +- tools/include/uapi/linux/prctl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/prctl.h +1 -1
@@ -235,7 +235,7 @@ struct prctl_mm_map {#define PR_GET_TAGGED_ADDR_CTRL 56# define PR_TAGGED_ADDR_ENABLE (1UL << 0)/* MTE tag check fault modes */ -# define PR_MTE_TCF_NONE 0 +# define PR_MTE_TCF_NONE 0UL# define PR_MTE_TCF_SYNC (1UL << 1)# define PR_MTE_TCF_ASYNC (1UL << 2)# define PR_MTE_TCF_MASK (PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC)
tools/include/uapi/linux/prctl.h +1 -1
@@ -235,7 +235,7 @@ struct prctl_mm_map {#define PR_GET_TAGGED_ADDR_CTRL 56# define PR_TAGGED_ADDR_ENABLE (1UL << 0)/* MTE tag check fault modes */ -# define PR_MTE_TCF_NONE 0 +# define PR_MTE_TCF_NONE 0UL# define PR_MTE_TCF_SYNC (1UL << 1)# define PR_MTE_TCF_ASYNC (1UL << 2)# define PR_MTE_TCF_MASK (PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC)
Signature · 7 lines
2.34.0.rc0.344.g81b53c2807-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Will Deacon
AppliedQuoted 8 lines · Peter Collingbourne
This constant was previously an unsigned long, but was changed into an int in commit
433c38f40f6a("arm64: mte: change ASYNC and SYNC TCF settings into bitfields"). This ended up causing spurious unsigned-signed comparison warnings in expressions such as:(x &
PR_MTE_TCF_MASK) !=PR_MTE_TCF_NONE[...]
Applied to arm64 (for-next/core), thanks!
[1/1] arm64: mte: change PR_MTE_TCF_NONE back into an unsigned long
https://git.kernel.org/arm64/c/aedad3e1c6dd
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