[PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX

Ahmad Fatoum a.fatoum at pengutronix.de
Sun May 21 22:22:44 PDT 2023


For symmetry with other types that have their max value defined, define
INTPTR_MAX/UINTPTR_MAX as well.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/linux/limits.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/limits.h b/include/linux/limits.h
index 85bba76f4a37..17375ef5225e 100644
--- a/include/linux/limits.h
+++ b/include/linux/limits.h
@@ -19,6 +19,8 @@
 #define SIZE_MAX	(~(size_t)0)
 #define PHYS_ADDR_MAX	(~(phys_addr_t)0)
 #define SSIZE_MAX	((ssize_t)(SIZE_MAX >> 1))
+#define INTPTR_MAX	LONG_MAX
+#define UINTPTR_MAX	ULONG_MAX
 
 #define U8_MAX		((u8)~0U)
 #define S8_MAX		((s8)(U8_MAX >> 1))
-- 
2.39.2




More information about the barebox mailing list