From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX
Date: Mon, 22 May 2023 07:22:44 +0200 [thread overview]
Message-ID: <20230522052244.1038364-1-a.fatoum@pengutronix.de> (raw)
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@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
next reply other threads:[~2023-05-22 5:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 5:22 Ahmad Fatoum [this message]
2023-05-22 11:32 ` 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=20230522052244.1038364-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