Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4372193pxf; Tue, 16 Mar 2021 11:46:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWTe7jOTc6S9iWmQCJ04AQfOiJPywwHnK5u+IH7gvyVV4RzHWdTX/FF2263EYY5Pi6zRhb X-Received: by 2002:a17:906:af91:: with SMTP id mj17mr30165579ejb.230.1615920367107; Tue, 16 Mar 2021 11:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615920367; cv=none; d=google.com; s=arc-20160816; b=bQw56uIRkU9XfsvFpNsdwjcDDvLxYeEC9pGkT5VsrycTQ5Kb/AbpSYJSfu0UxJdtZt INW2ZIQ3Fkqo2Gn3jTpqpi32VjPBPdsI6lbosEZGfEJ1bTJYPnNjS/Uvwzn9C5VKRh7d JUXqzeT7fq/EU8bMMep1D3Q2uCWY575p3QW8/qkeNNKz4wM2eER5HJ/ZUCROeCrElc+v +NnZ4gfjj5Apnwz/XWnD/9K5NaaDUYC5BLjgp+NzQ4Om4YIRz7bErmEanCKSgkZhFePN dzAgMXg5/dwxhy63qtjxJWN8Yk05Lu9ufj5MmoJEz/N9jARqvyi5FdlmZBZ1l+KMZJRr RBWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=V0GH8ePipD3z/QBLkG4vYFB6vJ53/VjETOkyADISWf0=; b=TzPcxFmU+RBO30VdPc2dCzcrfGsLPi9WI/na/rW0uRy86CxGuNiEfb9bZREjEMs6H8 leFq+PATGeeHj70v7A4YUriAWhrsCnAGFAtFpENmtBKQvywbDF3Qm3HHz1ybvz319T4W IyKzoSAT/agy03DbRX3wP7ESEBVGsWPmMGuSumpINvvljdEvlDNNJgjAvNbgYYEeg5QX HNqqdhYQNH+g92cmrWurTLbh1/EBWLGt8iFWgDctB1jBn4SxPSY5j61KMICbp4i0Vxlp qaRn3dxBSKxHZJckQbsleQ3R66DIKSbohPHDBqBUQMdbAFHcQESQJdxQRHigRRBDqhEV 9eUw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si13333262edz.99.2021.03.16.11.45.44; Tue, 16 Mar 2021 11:46:07 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231737AbhCPLjn (ORCPT + 99 others); Tue, 16 Mar 2021 07:39:43 -0400 Received: from mga05.intel.com ([192.55.52.43]:60586 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237378AbhCPLjQ (ORCPT ); Tue, 16 Mar 2021 07:39:16 -0400 IronPort-SDR: efRc5xOzUO1aTnzdFLwvLotVSiB9C+rZwpRzjOKISAR8Kc3jbMYGZTqhQPHY0wEZfPDelgqS18 qz2jayj9ryUg== X-IronPort-AV: E=McAfee;i="6000,8403,9924"; a="274285882" X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="274285882" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 04:39:14 -0700 IronPort-SDR: Uu2NYVQV19jKW3IGxrZ2iulFHr94qoOPZaU73rbJrxGCF6Y+mgSxp+07W1GwSt8HuBhreBQCs8 ChLlPdnlWyYQ== X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="440062397" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 04:39:10 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lM82U-00CwLD-Dt; Tue, 16 Mar 2021 13:39:06 +0200 Date: Tue, 16 Mar 2021 13:39:06 +0200 From: Andy Shevchenko To: Rasmus Villemoes Cc: Yury Norov , linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-arch@vger.kernel.org, linux-sh@vger.kernel.org, Alexey Klimov , Andrew Morton , 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 Subject: Re: [PATCH 01/13] tools: disable -Wno-type-limits Message-ID: References: <20210316015424.1999082-1-yury.norov@gmail.com> <20210316015424.1999082-2-yury.norov@gmail.com> <2ec71f83-f903-2775-bf04-7f0a83c9f4cb@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ec71f83-f903-2775-bf04-7f0a83c9f4cb@rasmusvillemoes.dk> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 09:17:24AM +0100, Rasmus Villemoes wrote: > 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). ... > 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, in the kernel the same was fixed as per 355a3587d4ca. I don't know why tools should be different to that. -- With Best Regards, Andy Shevchenko