Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp48432rwd; Mon, 12 Jun 2023 09:57:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5+dFmg8YEna2NKbQx9IXrBKNTK4uipjFZTWNkU5ix/39YyrxRtvPOu/LwlyvXVDLN0Bh78 X-Received: by 2002:aca:121a:0:b0:398:5478:b7fa with SMTP id 26-20020aca121a000000b003985478b7famr4258008ois.45.1686589057643; Mon, 12 Jun 2023 09:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686589057; cv=none; d=google.com; s=arc-20160816; b=pytc0r6PdYhxc02Z7LI7S71uGmJ/LByY0TfYZMoikQYLcUu5RmqlBGD20ZqLKnvKs/ L0YoItPpXWayRMApp8shVBgAXnfBeeBK2oYBeKi47i1oeEyFLC34on5hSn5mHW+IuUva TgK3PMC6Bs3LIsD2OjAMNPUfs/0upHNtc5DowmuMwxfay614YhmAvP/tCRSZCwDbyop3 PEpAjakJXNKhfUBBjAOFSXtixWuyv33/xoMSvU2VF4oy1g/oS/z+ir5gFv1gKbWf+ezM UvVMAuJIxaX+zyBWv1gFjlI5N5Dnqy3qsh9tSzHTDL0D948ON+mKZ+jkEUehik7iqOVM gP1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=W0mLiDJsR/VFW0A3rtrxvofgxbsjnhZx4njUYdG0nxk=; b=AonAAz2S36khpMtnAZsNPjjUsucTWmWz6l45QAWDHhnXuKaOpazozRzVx0ddoCSKU7 x7B98PeNCIwZS0emj/EsHOTsx1s6EjTnxLwuUDANcoYOtzGAthB+zhXtUkdkJa4KjwRr LM1xYwLiFBDvlh7TM64lVPkw59+uVPz8bwi02Ub0H8vgSdu9uZ+y4hbSn1He0KWQwvkT EHA3mjPLU34ZKCXUT2vXWqF9gEaVjQ1mlSO8HrnDVyIvKq24pwbIpFI8EIGhZ3bMd6UH QrVDTIBLNOR+F7Gr11mD8sQlR+/gJlq9unQOmhUHgt6Cdnl918nyD8YMMQZJqesG9lPd ifKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020a6560c9000000b0054405493a4dsi7120193pgv.199.2023.06.12.09.57.24; Mon, 12 Jun 2023 09:57:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236815AbjFLQcM (ORCPT + 99 others); Mon, 12 Jun 2023 12:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236772AbjFLQcL (ORCPT ); Mon, 12 Jun 2023 12:32:11 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 491E71B3; Mon, 12 Jun 2023 09:32:09 -0700 (PDT) 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 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 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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