From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] include: linux/limits: add definition for RESOURCE_SIZE_MAX
Date: Wed, 9 Apr 2025 08:56:12 +0200 [thread overview]
Message-ID: <20250409065612.1851282-1-a.fatoum@pengutronix.de> (raw)
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@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
next reply other threads:[~2025-04-09 6:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 6:56 Ahmad Fatoum [this message]
2025-04-10 7:26 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250409065612.1851282-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox