Skip to content

Commit aedad3e

Browse files
pccwilldeacon
authored andcommitted
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 433c38f ("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. Link: https://linux-review.googlesource.com/id/I07a72310db30227a5b7d789d0b817d78b657c639 Signed-off-by: Peter Collingbourne <pcc@google.com> Link: https://lore.kernel.org/r/20211105230829.2254790-1-pcc@google.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 34688c7 commit aedad3e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/uapi/linux/prctl.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ struct prctl_mm_map {
235235
#define PR_GET_TAGGED_ADDR_CTRL 56
236236
# define PR_TAGGED_ADDR_ENABLE (1UL << 0)
237237
/* MTE tag check fault modes */
238-
# define PR_MTE_TCF_NONE 0
238+
# define PR_MTE_TCF_NONE 0UL
239239
# define PR_MTE_TCF_SYNC (1UL << 1)
240240
# define PR_MTE_TCF_ASYNC (1UL << 2)
241241
# define PR_MTE_TCF_MASK (PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC)

‎tools/include/uapi/linux/prctl.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ struct prctl_mm_map {
235235
#define PR_GET_TAGGED_ADDR_CTRL 56
236236
# define PR_TAGGED_ADDR_ENABLE (1UL << 0)
237237
/* MTE tag check fault modes */
238-
# define PR_MTE_TCF_NONE 0
238+
# define PR_MTE_TCF_NONE 0UL
239239
# define PR_MTE_TCF_SYNC (1UL << 1)
240240
# define PR_MTE_TCF_ASYNC (1UL << 2)
241241
# define PR_MTE_TCF_MASK (PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC)

0 commit comments

Comments
 (0)