summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>2026-05-21 10:58:38 +0530
committerAnup Patel <anup@brainfault.org>2026-05-22 10:31:39 +0530
commite92c8fd0836eaaea8e2e0126bd09ac16c24beee0 (patch)
treec211f6afe8870b9cfba6c4a6056238621f9492ee
parentf36acaeb80a490339923a5ec01ac3707741f6b90 (diff)
downloadopensbi-e92c8fd0836eaaea8e2e0126bd09ac16c24beee0.tar.gz
opensbi-e92c8fd0836eaaea8e2e0126bd09ac16c24beee0.zip
sbi: mpxy: define INVALID_ADDR using unsigned long width
INVALID_ADDR is used as an all-ones physical address sentinel. Using -1U only guarantees 32-bit width, so on platforms where unsigned long is wider it may not expand to all ones after assignment. Use -1UL so the conversion to unsigned long preserves an all-ones bit pattern across supported widths. Fixes: 7939bf1329eb ("lib: sbi: Add SBI Message Proxy (MPXY) framework") Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260521052838.2174588-1-himanshu.chauhan@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
-rw-r--r--lib/sbi/sbi_mpxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_mpxy.c b/lib/sbi/sbi_mpxy.c
index a83cf16c..8daeb83d 100644
--- a/lib/sbi/sbi_mpxy.c
+++ b/lib/sbi/sbi_mpxy.c
@@ -28,7 +28,7 @@ static unsigned long mpxy_shmem_size = PAGE_SIZE;
static SBI_LIST_HEAD(mpxy_channel_list);
/** Invalid Physical Address(all bits 1) */
-#define INVALID_ADDR (-1U)
+#define INVALID_ADDR (-1UL)
/** MPXY Attribute size in bytes */
#define ATTR_SIZE (4)