From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX
Date: Mon, 22 May 2023 13:32:10 +0200 [thread overview]
Message-ID: <20230522113210.GA17518@pengutronix.de> (raw)
In-Reply-To: <20230522052244.1038364-1-a.fatoum@pengutronix.de>
On Mon, May 22, 2023 at 07:22:44AM +0200, Ahmad Fatoum wrote:
> 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(+)
Applied, thanks
Sascha
>
> 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
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2023-05-22 11:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 5:22 Ahmad Fatoum
2023-05-22 11:32 ` Sascha Hauer [this message]
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=20230522113210.GA17518@pengutronix.de \
--to=sha@pengutronix.de \
--cc=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