From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A379D200A7 for ; Mon, 12 Jun 2023 16:32:09 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A17621FB; Mon, 12 Jun 2023 09:32:53 -0700 (PDT) Received: from [192.168.4.21] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 61BB23F5A1; Mon, 12 Jun 2023 09:32:04 -0700 (PDT) Message-ID: <4c01e43a-0275-04a0-ad9d-ee2f2bf24e1c@arm.com> Date: Mon, 12 Jun 2023 17:31:51 +0100 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v3 1/4] limits.h: add UCHAR_MAX, SCHAR_MAX, and SCHAR_MIN To: Demi Marie Obenour , Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Lee Jones , Andy Lutomirski , Thomas Gleixner , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Cc: linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org References: <20230610204044.3653-1-demi@invisiblethingslab.com> <20230610204044.3653-2-demi@invisiblethingslab.com> Content-Language: en-US From: Vincenzo Frascino In-Reply-To: <20230610204044.3653-2-demi@invisiblethingslab.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Demi, On 6/10/23 21:40, Demi Marie Obenour wrote: > Some drivers already defined these, and they will be used by sscanf() > for overflow checks later. Also add SSIZE_MIN to limits.h, which will > also be needed later. > > Signed-off-by: Demi Marie Obenour > --- > .../media/atomisp/pci/hive_isp_css_include/platform_support.h | 1 - > include/linux/limits.h | 1 + > include/linux/mfd/wl1273-core.h | 3 --- > include/vdso/limits.h | 3 +++ > 4 files changed, 4 insertions(+), 4 deletions(-) > ... > diff --git a/include/vdso/limits.h b/include/vdso/limits.h > index 0197888ad0e00b2f853d3f25ffa764f61cca7385..0cad0a2490e5efc194d874025eb3e3b846a5c7b4 100644 > --- a/include/vdso/limits.h > +++ b/include/vdso/limits.h > @@ -2,6 +2,9 @@ > #ifndef __VDSO_LIMITS_H > #define __VDSO_LIMITS_H > > +#define UCHAR_MAX ((unsigned char)~0U) > +#define SCHAR_MAX ((signed char)(UCHAR_MAX >> 1)) > +#define SCHAR_MIN ((signed char)(-SCHAR_MAX - 1)) Are you planning to use those definitions in the vDSO library? If not can you please define them in linux/limits.h, the vdso headers contain only what is necessary for the vDSO library. Thanks! > #define USHRT_MAX ((unsigned short)~0U) > #define SHRT_MAX ((short)(USHRT_MAX >> 1)) > #define SHRT_MIN ((short)(-SHRT_MAX - 1)) -- Regards, Vincenzo