[PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX
Sascha Hauer
sha at pengutronix.de
Mon May 22 04:32:10 PDT 2023
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 at 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 |
More information about the barebox
mailing list