Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1838287pxp; Mon, 7 Mar 2022 03:33:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpFo9CyHsj6HCBUQkKsj8ANfGeuZy+GBNkkH+YArZTP/Ej4nZtgQY6c2DBgZZgWtOr8qKX X-Received: by 2002:a17:903:11c9:b0:151:9521:d5c7 with SMTP id q9-20020a17090311c900b001519521d5c7mr11772231plh.73.1646652812794; Mon, 07 Mar 2022 03:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646652812; cv=none; d=google.com; s=arc-20160816; b=wExVARtKEeGg/MEJC/q0VDiBDI6qfc7T+/4SFJLkMftkE3Qfns2Ru9no6q3HEaKXMo DX1WPogQZe5ELB1GN/1Ge3p013eNJ+4qg9ewoei0431ODqc8NGfB8YjhURTjnVTxWjiT rJP50YMFqgUjxdlsfQo8HMjRtY9jOdv7FFJG2yJNIU4syr6Oo3wStGE/jyUVpoO1alNn I1jUSxWn6bRhf7n/4oykW9j/SuphukC779vCUvt7ybDngcvnFgZJFH2Ypv0fDIKZQbXI +rTHG4o+tn25v0M3dxfnjiZtFqMAV80vPl9Cp+0J8gL35otyxKNqCQ+YH/X5Jqos7Sbg locQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=M1rR/eY80n5vDuYqXPNSE6u83mcd2WVzC9/2TTt/Eo0=; b=BDeRFSoUlEjEPM+g5S5R0T6VV/di+RmZo1Cwx2Hqu/kteuuVn0PRfhCA7nYcyyhy6n puUP5K0hq3jRjyGW5K4ISUek0NuCu+ZZ4xkNs+QYJAzM2NXFMWwVDUz3up8IbhluxEsO 0uOy0J5Zf+mRj0slV+1G2VoHRNkrZqUQqobcqO5fRUK7ipdOaqkUixYBMooSkdkBCSzN /tPwjWT5E9SSt7fa+sncQaeJks5MsuoGAMGM5rjchXGxIRj+sMFSP6Tq4UxL8p+nZEX/ YI6Bp3qJrnzym8baG82q1M6JxSmhtKVZwuFAu7iZv5tORpNTNOvLZAdo0ZeHIqDKdl1N TaXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Gj9/fnWr"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170902d50e00b00150948d9c1esi13135751plg.109.2022.03.07.03.33.17; Mon, 07 Mar 2022 03:33:32 -0800 (PST) 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=@gmail.com header.s=20210112 header.b="Gj9/fnWr"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236312AbiCGLNQ (ORCPT + 99 others); Mon, 7 Mar 2022 06:13:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241808AbiCGLMh (ORCPT ); Mon, 7 Mar 2022 06:12:37 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75E04D996B for ; Mon, 7 Mar 2022 02:34:42 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id hw13so30751427ejc.9 for ; Mon, 07 Mar 2022 02:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M1rR/eY80n5vDuYqXPNSE6u83mcd2WVzC9/2TTt/Eo0=; b=Gj9/fnWrwc6IHetIWpmkFgWwMuti9SnpBTZQI4+fpBSdSMDh78T9YTel1Ks7RaIY3f zt5OncxwWYqxHOdhY9xn8K+MSHrrreD3qDrY/f9jhrpwKbCGBjunGgzzLDt1VLWVdZLc VRRHaUu3KNRRT/eYvRBUHb9BxA8vk/e/bVT+31IvTkAPDpn6LOk6C+RyKZRq0ydfmFQb E5RL6qF1WR/VI2wp4CZMK7TjH0h54ml3dEIiDwdC9JzDHKn5m7XO4frn1CD5GKKzfGp+ m6+cIe+wGQCr9BM1Hl3mg8089U0CYQPLnBvjkO7tnG2qferM0ANsSrtdVHqhBdUJ+Z3X N56g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M1rR/eY80n5vDuYqXPNSE6u83mcd2WVzC9/2TTt/Eo0=; b=n/nFanOL0uH0IFWjlskBRBHLdF5djvpr4zZdNWH6QPgqrPpm85S7Gc0JA6z2Jus5UT 0Jmtt8l9G2f5VfQLv3D5bIPGLvqkkVwZUvRqFRWUnBFVn6FCzQuirAinH22qf3HNS9+P AkJ403Vqq7ksfFCmI+FGELbLp20GCg0OqScFZp3tlOSaL9b8rLpA32WETpctDrTwtvYR zkgwiEnsk1x71QayUFtS1Ygkvx6fICNGkspX7pyQNhYMnNutfbDTEBWXq66Ajqi9jDe/ 097qEFBQDUIcBJZE5996Pt51rXIzkqjt+q0fMvhbP61C8qIqUW/QHw74fp+MaKg90dKO DsCA== X-Gm-Message-State: AOAM532Zf04uhuicasx4HKe9K5HgHBWIJxxKoe86DRRF5cUnQdlyU34b orhrvRvJghJIXD1rlNC3l/yZ071SmjzAI75giOqiEvEJU3c= X-Received: by 2002:a17:906:cc12:b0:6b5:ec8f:fdf2 with SMTP id ml18-20020a170906cc1200b006b5ec8ffdf2mr8297004ejb.579.1646649280273; Mon, 07 Mar 2022 02:34:40 -0800 (PST) MIME-Version: 1.0 References: <20220304124416.1181029-1-mailhol.vincent@wanadoo.fr> In-Reply-To: From: Andy Shevchenko Date: Mon, 7 Mar 2022 12:33:22 +0200 Message-ID: Subject: Re: [PATCH] linux/bits.h: fix -Wtype-limits warnings in GENMASK_INPUT_CHECK() To: Vincent MAILHOL Cc: Rikard Falkeborn , Andrew Morton , Linux Kernel Mailing List , Arnd Bergmann , Kees Cook Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Sun, Mar 6, 2022 at 7:35 AM Vincent MAILHOL wrote: > On Sun. 6 Mar 2022 at 06:33, Andy Shevchenko wrote: > > On Sat, Mar 5, 2022 at 2:43 PM Vincent MAILHOL > > wrote: > > > On Tue. 5 Mar 2022 at 03:46, Andy Shevchenko wrote: > > > > On Fri, Mar 4, 2022 at 7:36 PM Vincent Mailhol > > > > wrote: > > > > ... > > > > > > NAK. > > > > > > Are you willing to change your decision following my comments? > > > > Have you read this discussion (read the thread in full) > > https://lore.kernel.org/lkml/cover.1590017578.git.syednwaris@gmail.com/ > > Thank you, this was an instructive read. > > For what I understand, there was an effort to fix this when > -Wtype-limits was still a W=1 warning but the effort was stopped > after -Wtype-limits was moved to W=2 despite a v4 patch being very > close to the goal. My understanding of that discussion is that Wtype-limits is broken, and Linus pointed out many times that compiler warning on if ((unsigned int)foo < 0) is bogus. I.o.w. there is no issue with the code and hence nothing to fix. > Back to my patch, it successfully passes the lib/test_bits.c > build test (including the TEST_GENMASK_FAILURES) and it also > fixes the last open warning from the thread you pointed me to (on > drivers/crypto/inside-secure/safexcel.o): > https://lore.kernel.org/lkml/20200709123011.GA18734@gondor.apana.org.au/ > > So, I am still not sure to understand what issue you see with my > patch. Is it that we should just not care about fixing W=2? Or > do you still see some issues which are not being addressed (if > so, sorry for not understanding)? See above. You may Cc Linus himself to reignite the discussion. > I do agree that fixing a W=2 has small value for all the files > which are still emitting some W=1. However, I think it is > beneficial to remove this W=2 spam for all the developers who > produced W=1 clean files and would like to tackle the W=2 > warnings. -- With Best Regards, Andy Shevchenko