Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5395628rwd; Mon, 12 Jun 2023 04:41:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6YwkQ19qaWlNkjisV0i9IhODF38fCEAnoYUYTNqcCOEx+fvIt+zD2LD055N88eHbWV6wgX X-Received: by 2002:a05:6a21:1109:b0:10d:3ff2:452b with SMTP id oh9-20020a056a21110900b0010d3ff2452bmr8246786pzb.18.1686570068633; Mon, 12 Jun 2023 04:41:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686570068; cv=none; d=google.com; s=arc-20160816; b=KUgRVJD5K5R1XfeWv7BcQmEjVGoPLr5lhWN9nV+OUYACFlK41s0VKJXEAGLNviCRyM qyAno+1XdZV46G6fRztxQu7y7j88ULXkC8B5JiGZuDRsiwe2nfvqOIMbI+UWlF4uyLzB QkW18RQuWLpRE2JaSVlp/kyiWpT0Ys8CscR+97aH4GsTKJPtye11NkY7CQEXyWXrl0I1 Z6237Rc/V5Kh/Ad5mwZqib3/2UlBZR/C74y6ChyhL637cQyEDKOCp4C73hLjJEFQDl7J LUlF3zLd9DkyZuBw5xykRWKP2xuR7UwvLm81xFikZye3Jc0/SpSAKIz+eAtk5SlILOEu rxDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jjm8BgZj0ma4ajm8SGXvC0yfFtyX06UIxjKVsM1/oCU=; b=WwLQaVC9yro2wYhRWptBvXBWDRBQnq6CY1DgIXZx+lgSGsr6xt1rZ5PoR6kQ/r7jDT zptg54M/6YtWCjogonpiq14xzYKqUDZwM77uV4OxY9oeKZfNWgSHkEXjQA7vGxK3z5Pu F+qpASGU83NocCvnLs2WRHMPErIF+maxhFC+pd0FtMXvVkaMCzFa8AQMLygbkpjUcYDG GjrhEaxBVJda85u5doNSD9aiMqn0zyZzUPF6FQlG68Ca/7CLTIc46/Php/AboSIXLVOd 6mFf9bhrl1YOI8YayGXFb/11mQtQhTTchgVqK//elo7um27eB5SzqvO/eglgyA2wbIVA ceNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="WbVmaT/k"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 20-20020a631854000000b0053f0cdab81esi3277078pgy.357.2023.06.12.04.40.53; Mon, 12 Jun 2023 04:41:08 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="WbVmaT/k"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235880AbjFLLiM (ORCPT + 99 others); Mon, 12 Jun 2023 07:38:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235701AbjFLLhy (ORCPT ); Mon, 12 Jun 2023 07:37:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7493D7D93; Mon, 12 Jun 2023 04:20:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0C2EA6134B; Mon, 12 Jun 2023 11:20:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 517FEC433EF; Mon, 12 Jun 2023 11:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686568803; bh=23JwlmTrqv4IR+K4vNf3mjg3Y1quit9pjndWhP+WBVQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WbVmaT/k2NJ431omJScx8rn6Tr4xCwHvNKr6toopgTYPT/LQMqMpo7FBV6vIGJ4Ih +HSkHHWJ35Kcb4B/GPixREIZZBfO6jCqVm2Oj7ei4Ar3Tq5VdX+HzY8hRcQXP/+huS OJbyhn41f3IULnSq0wd/dz2lHKMxj8853QNGxSQmcax6UBGdjg1/NwAF+VG6M3OHL2 ZzOOn7hwX4hqHpXo5AUa9bZN9l3F97lPwSQv46KeDu8M33XqdrFtdbw9tq1DG+/U0P 7qVFwPAn09GyfkCtFxQ5HZGZsXWZZPEQgoJDyew2d9LSRvZgIIxDgS8gSf/0U6hnid f8spn2rSpOb/Q== Date: Mon, 12 Jun 2023 12:19:55 +0100 From: Lee Jones To: Demi Marie Obenour Cc: Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v3 1/4] limits.h: add UCHAR_MAX, SCHAR_MAX, and SCHAR_MIN Message-ID: <20230612111955.GM3635807@google.com> References: <20230610204044.3653-1-demi@invisiblethingslab.com> <20230610204044.3653-2-demi@invisiblethingslab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230610204044.3653-2-demi@invisiblethingslab.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 On Sat, 10 Jun 2023, 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 --- Acked-by: Lee Jones > include/vdso/limits.h | 3 +++ > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h > index 0cdef4a5e8b1bed9884133f1a0b9d853d59d43a4..e29b96d8bebf14839f6dd48fdc6c0f8b029ef31d 100644 > --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h > +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h > @@ -27,7 +27,6 @@ > > #define UINT16_MAX USHRT_MAX > #define UINT32_MAX UINT_MAX > -#define UCHAR_MAX (255) > > #define CSS_ALIGN(d, a) d __attribute__((aligned(a))) > > diff --git a/include/linux/limits.h b/include/linux/limits.h > index f6bcc936901071f496e3e85bb6e1d93905b12e32..8f7fd85b41fb46e6992d9e5912da00424119227a 100644 > --- a/include/linux/limits.h > +++ b/include/linux/limits.h > @@ -8,6 +8,7 @@ > > #define SIZE_MAX (~(size_t)0) > #define SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1)) > +#define SSIZE_MIN (-SSIZE_MAX - 1) > #define PHYS_ADDR_MAX (~(phys_addr_t)0) > > #define U8_MAX ((u8)~0U) > diff --git a/include/linux/mfd/wl1273-core.h b/include/linux/mfd/wl1273-core.h > index c28cf76d5c31ee1c94a9319a2e2d318bf00283a6..b81a229135ed9f756c749122a8341816031c8311 100644 > --- a/include/linux/mfd/wl1273-core.h > +++ b/include/linux/mfd/wl1273-core.h > @@ -204,9 +204,6 @@ > WL1273_IS2_TRI_OPT | \ > WL1273_IS2_RATE_48K) > > -#define SCHAR_MIN (-128) > -#define SCHAR_MAX 127 > - > #define WL1273_FR_EVENT BIT(0) > #define WL1273_BL_EVENT BIT(1) > #define WL1273_RDS_EVENT BIT(2) > 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)) > #define USHRT_MAX ((unsigned short)~0U) > #define SHRT_MAX ((short)(USHRT_MAX >> 1)) > #define SHRT_MIN ((short)(-SHRT_MAX - 1)) > -- > Sincerely, > Demi Marie Obenour (she/her/hers) > Invisible Things Lab > -- Lee Jones [李琼斯]