[PATCH] include: linux/limits: add definition for RESOURCE_SIZE_MAX
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Apr 8 23:56:12 PDT 2025
This is the maximum value that can be stored in a resource_size_t
and can be used as dummy invalid value if needed.
Import it with the same definition as in Linux.
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 8baf8494943e..2318e4f606d5 100644
--- a/include/linux/limits.h
+++ b/include/linux/limits.h
@@ -22,6 +22,8 @@
#define INTPTR_MAX LONG_MAX
#define UINTPTR_MAX ULONG_MAX
+#define RESOURCE_SIZE_MAX ((resource_size_t)~0)
+
#define U8_MAX ((u8)~0U)
#define S8_MAX ((s8)(U8_MAX >> 1))
#define S8_MIN ((s8)(-S8_MAX - 1))
--
2.39.5
More information about the barebox
mailing list