Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3976626pxf; Tue, 16 Mar 2021 02:34:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBcd7+uxXAkMlEO6V9F8GUMb/c3WPjOzLpYFTtLRHvrfr8TWmmScMX3wiQwQHXce0aNP5r X-Received: by 2002:a17:906:f9d8:: with SMTP id lj24mr28707114ejb.200.1615887265170; Tue, 16 Mar 2021 02:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615887265; cv=none; d=google.com; s=arc-20160816; b=cnXfm1Cb6aMGzzpDtp4fbENdBgpU8H2ojErBeaCHba2Ckd1Hd4fYWMLL8zR5V6Il9P f9ayf+EVB68A3+xHjOP+FMBdkf4JMLcBZgdOqWFf0RJDeVP3TkqfY/VoqaVm0808AQHh b0e0oyHJFO3u/sO3Uge78ii/+8UQHfU7H8Xej3I9/L5YZSwkjKhbqvSJkJ+tPOMSw8mV /gG/zpoeROWDscFXkfSdMAg5I0luI8oOUPJWH4flPjg0cqiTWBBGe66U6Hcm8H1u7nmx GX8+nftfLouAEOODmNolcdW1YDvtwrCxFpMckKkoac6gR04otNg7HczUmk5jqz5lq58a UXbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=p9kC/FfaYsWrKdpd44ySqOr9EeItGYJ7tqAoRplpcIw=; b=t1PWV39hMvttILOnYEQXiRu8MYSHPe6AOnEK/HJOGn8qQ6OCPq12G90feb3qJ4H0C9 6/DddGjOAuU3aGa/LvoA1Otzwtgq+WfGReakAlH4X4F6S6wHilBOMYdvD3MQgP62/WU3 jcNo/XGdKeOoXp12xMEDIq8kMPXdAvitfWmC1nZhPAGqpE3aWPQ2pVa604WMIs4kngWA i0hFwyk/cLGWV13VtUQOn7krsf/8F0yNkYn/BPlO24V3wMM/8VFUlVqnQNa0wa2Pdn7T ZWSTfLqMNYD0dBVtg4uFJSy+6aCYD8DQ5zL+JMdNttK0SaAdxw6wqNji1OHQQhB8h9xu V3HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=EFjyEtLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw11si13204806ejb.2.2021.03.16.02.34.02; Tue, 16 Mar 2021 02:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=EFjyEtLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234331AbhCPIRx (ORCPT + 99 others); Tue, 16 Mar 2021 04:17:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234333AbhCPIR2 (ORCPT ); Tue, 16 Mar 2021 04:17:28 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B35A1C06175F for ; Tue, 16 Mar 2021 01:17:27 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id jt13so70682652ejb.0 for ; Tue, 16 Mar 2021 01:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=p9kC/FfaYsWrKdpd44ySqOr9EeItGYJ7tqAoRplpcIw=; b=EFjyEtLu7bg1hNv+88oPUzWFOq+7jZJ1JjL06HqzKU/TlfkEl1+HRe4/aFCgmsHASK l4L9IRJYPnHUI5TnHzB51mEyaEH2wA1K+JGeag2qgdeECYLIpkSEFh70xoCt/tTGodcd 8ACpxYRZgaf4XJHaxUUuyAvrWxr92vlxsRsFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=p9kC/FfaYsWrKdpd44ySqOr9EeItGYJ7tqAoRplpcIw=; b=hUf+myK1x/eLRxz+XvhWIUQsUl9MjiYFWybj1+dK6P8DfSOKuzdrtc2Jzl/nmeeo+t CYrJM1Fl5CWy5o0YCL6nFGQnT3wv/j3DUU2iHuJco2OuRilm8OFL3R+Xwq6JoZxd6qiF bCi2xks2i2KyrwAoPBjZ1iaaVsHF2O0W2tFfhaNLYU5LXf9k1Li56ASp4F2g8PAgGw12 sqS2l3mvADj6YGYXSrdmjWgSQ9JOStsJKmLJiTcuSuEEhxDOyotuJ483eH3v+paoNpaI T/S8CsO0dYONnGJ81VaWBgUNSNyJPTR3j06JjF538qT0C6dZSPt60ieNI27E7zIP8cMr eYlA== X-Gm-Message-State: AOAM533dXtWqewEygsYrEtreT9kejg+y/4Tz6/2ERZD1RJTkgskSW75/ CiFXata0jmwSIpwdLaqPG83iyw== X-Received: by 2002:a17:906:5902:: with SMTP id h2mr28099654ejq.416.1615882646474; Tue, 16 Mar 2021 01:17:26 -0700 (PDT) Received: from [192.168.1.149] ([80.208.71.248]) by smtp.gmail.com with ESMTPSA id u13sm8931351ejy.31.2021.03.16.01.17.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Mar 2021 01:17:26 -0700 (PDT) Subject: Re: [PATCH 01/13] tools: disable -Wno-type-limits To: Yury Norov , linux-kernel@vger.kernel.org Cc: linux-m68k@lists.linux-m68k.org, linux-arch@vger.kernel.org, linux-sh@vger.kernel.org, Alexey Klimov , Andrew Morton , Andy Shevchenko , Arnd Bergmann , David Sterba , Dennis Zhou , Geert Uytterhoeven , Jianpeng Ma , Joe Perches , John Paul Adrian Glaubitz , Josh Poimboeuf , Rich Felker , Stefano Brivio , Wei Yang , Wolfram Sang , Yoshinori Sato References: <20210316015424.1999082-1-yury.norov@gmail.com> <20210316015424.1999082-2-yury.norov@gmail.com> From: Rasmus Villemoes Message-ID: <2ec71f83-f903-2775-bf04-7f0a83c9f4cb@rasmusvillemoes.dk> Date: Tue, 16 Mar 2021 09:17:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210316015424.1999082-2-yury.norov@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/03/2021 02.54, Yury Norov wrote: > GENMASK(h, l) may be passed with unsigned types. In such case, type-limits > warning is generated for example in case of GENMASK(h, 0). > > Signed-off-by: Yury Norov > --- > tools/scripts/Makefile.include | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include > index 84dbf61a7eca..15e99905cb7d 100644 > --- a/tools/scripts/Makefile.include > +++ b/tools/scripts/Makefile.include > @@ -38,6 +38,7 @@ EXTRA_WARNINGS += -Wswitch-enum > EXTRA_WARNINGS += -Wundef > EXTRA_WARNINGS += -Wwrite-strings > EXTRA_WARNINGS += -Wformat > +EXTRA_WARNINGS += -Wno-type-limits > I don't like that kind of collateral damage. I seem to recall another instance where a macro was instead rewritten to avoid triggering the type-limits warning (with a comment explaining the uglyness). Something like foo > bar is the same as !(foo <= bar) which is the same as !(foo == bar || foo < bar) Dunno if that would work here, but if it did, it would have the bonus that when somebody builds the kernel proper with Wtype-limits enabled (maybe W=1 or W=2) there would be no false positives from GENMASK to wade through. Alternatively, we really should consider making use of _Pragma to locally disable/re-enable certain warnings. Rasmus