mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX
@ 2023-05-22  5:22 Ahmad Fatoum
  2023-05-22 11:32 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-05-22  5:22 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX
  2023-05-22  5:22 [PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX Ahmad Fatoum
@ 2023-05-22 11:32 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-05-22 11:32 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

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 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-22 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22  5:22 [PATCH] linux: limits: define INTPTR_MAX/UINTPTR_MAX Ahmad Fatoum
2023-05-22 11:32 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox