Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6130465ybh; Wed, 7 Aug 2019 17:59:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmgmtJbBaso0HSQpDtJQo2Fi6TEtN9qXDfS/l/r7uh/58d6wZID43jgJ9fehNGxA/F6ZV/ X-Received: by 2002:a17:90a:2228:: with SMTP id c37mr1223393pje.9.1565225999817; Wed, 07 Aug 2019 17:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565225999; cv=none; d=google.com; s=arc-20160816; b=bDO6KHWwqe+6rpLqX3EJ3HvhJwgvndIsJhUr6gt1n4Nsh5eb9rqB2iltn272CLlN7C XMIIzcpDN0ch5HafTOjcA9S6Lh6fRYpMmYWy1NUIeV5M3+9Yq/kpi247HfzMLCyyJSd8 rMdwFaME7u6fCY36IwIy1x/9+DzHB+0GIy3CLUwF+LNjeFyVCkMtKf3Nr8JVl2FEQWpP e3OAjcpxTB8/OtefpPScfFG0EBo8NN7M9Gw3cPEnhRAHpulWENggq5ndgqAIm7U4Np9I 0H8qeuyHYPD0hEVfs2eIG2kOfpV9fQcxLhtkW4eFLoUOGSSX2+qPCo2RfpeMxKfIZ9Mc dEOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Ws7QsD740ytKlYZBbDWe9a4bjMxNv3fcn3TYb8t49PE=; b=dlNotFUnc8KhgRtppxrHXuaUsx0X6oU7wa5rKLMmne9HWNmApTvgNURGs+AKx0sv/R EgDVXyHiVdVv+yUijdbjOsh5nwiNwpdt5woDAXeQMw1lxR7ZhBzsX1IRFCLPvFp5bfyR pfL1om0VTN8LrkVtfZAamoVzSWwukx+Rkv/SFZAzqeiAey6hN4l5c+Nof4ancZWlra0T /UUkfjfBNxDInKW0zpjU4u5rLi2mfJRxSUvcVxIHjAJiOrvabiscPajBRWWaB/5m51eh 2AxCeKuzs25sHUiwMV7mwqGjF0NMWKn2krjBsviTcUeMT1TkSNf7/X28vmET0yMnbnbJ X1fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="orjX/MK0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si11425138plm.61.2019.08.07.17.59.44; Wed, 07 Aug 2019 17:59:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="orjX/MK0"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730553AbfHHA66 (ORCPT + 99 others); Wed, 7 Aug 2019 20:58:58 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39572 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730433AbfHHA66 (ORCPT ); Wed, 7 Aug 2019 20:58:58 -0400 Received: by mail-pg1-f194.google.com with SMTP id u17so43074136pgi.6 for ; Wed, 07 Aug 2019 17:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Ws7QsD740ytKlYZBbDWe9a4bjMxNv3fcn3TYb8t49PE=; b=orjX/MK0sJHQSUrxArY/JYNEs4J52gygP3yaquH3DunYVe7+V+XNyL4/F2HFWCkK+t Qvbrt+u4gQaldpasKtHCcH+mu4Qi61kSClP48BDF3MJSWwxMX1tZRdrv8Djx0EnVxBII 5tYHr9ela4SHUJPOJH48VEV1mma8wnOwsTjL0L9OiHpFidg8I7TEKoSRndcLRXMa4Oa9 f4hkQnDP1dmE1tcRWGssj2QsqZmQEDIWDOBbO0eUbKJbZMZSImGn/Z6U3+ji53Vkpvdr oFttv4jgkQKXAYQzRkr/XtiU455dSRCByy77mivFAJ1S0H8nSYbYAjNorOIQs+3eCTXV DoAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ws7QsD740ytKlYZBbDWe9a4bjMxNv3fcn3TYb8t49PE=; b=Sh0k7Hfw3N1/htQuqbqLB2P7GINiqNQMoWnJ7kZs6Eg4kUhngQewUxqIlf+zEaXws2 +flqA6tuwEEjnJauZw51QoeSKwtKN3bNPtB2k+vMatreI1RclQHHKNuP5FJRJsV+51ik 1PwIihx/7VOpwrOCnp9/GEyn2B57ivn8stl1HhmAz5/jB9p5tB6jQGcIRnk0Jfmfuayg OnTSy8HgN9FS6aE46TqCHefmZmlYeaKoD8d/LwgniRE7PKu8WIUpssLN3Cj6UUxVTGmN Yk+OE403P/5l+39/Te482Bo00LhB2ltBeb79eda0Hefl3mj6DRxrAQRsngJhOYXf7G/a foEQ== X-Gm-Message-State: APjAAAU/cKls30pnlR61hZwILz8Xq84rcCWB8hgtoJNrk0Bt1ZXC+/Gh 9iOjz+DO4CEIg9jk5gQckRAl/mFU X-Received: by 2002:aa7:9481:: with SMTP id z1mr12455276pfk.92.1565225936855; Wed, 07 Aug 2019 17:58:56 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 65sm100858746pgf.30.2019.08.07.17.58.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 17:58:55 -0700 (PDT) Subject: Re: [PATCH v2 2/2] linux/bits.h: Add compile time sanity check of GENMASK inputs To: Joe Perches , Masahiro Yamada , Linus Torvalds Cc: Rikard Falkeborn , Andrew Morton , Johannes Berg , Linux Kernel Mailing List References: <20190731190309.19909-1-rikard.falkeborn@gmail.com> <20190801230358.4193-1-rikard.falkeborn@gmail.com> <20190801230358.4193-2-rikard.falkeborn@gmail.com> <20190807142728.GA16360@roeck-us.net> <099e07d4b4ecca9798404b95dc78c89bc3dd9f7f.camel@perches.com> From: Guenter Roeck Message-ID: Date: Wed, 7 Aug 2019 17:58:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <099e07d4b4ecca9798404b95dc78c89bc3dd9f7f.camel@perches.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/7/19 5:07 PM, Joe Perches wrote: > On Wed, 2019-08-07 at 23:55 +0900, Masahiro Yamada wrote: >> On Wed, Aug 7, 2019 at 11:27 PM Guenter Roeck wrote: > [] >>> Who is going to fix the fallout ? For example, arm64:defconfig no longer >>> compiles with this patch applied. >>> >>> It seems to me that the benefit of catching misuses of GENMASK is much >>> less than the fallout from no longer compiling kernels, since those >>> kernels won't get any test coverage at all anymore. >> >> We cannot apply this until we fix all errors. >> I do not understand why Andrew picked up this so soon. > > I think it makes complete sense to break -next (not mainline) > and force > people to fix defects. Especially these types of > defects that are > trivial to fix. > I don't think this (from next-20190807): Build results: total: 158 pass: 137 fail: 21 Qemu test results: total: 391 pass: 318 fail: 73 is very useful. The situation is bad enough for newly introduced problems. It is all but impossible to get fixes for all problems discovered (or introduced) by adding checks like this one. In some cases, no one will care. In others, no one will pick up patches. Sometimes people won't know or realize that they are expected to fix something. Making the situation worse, the failures introduced by the new checks will hide other accumulating problems. arch/sh has failed to build in mainline since 7/27 and in -next since next-20190711, due to the added "fallthrough" warning. I don't think that is too useful either. Ok, that situation may be a sign that the architecture isn't maintained as well as it should, but I don't think that this warrants breaking it on purpose in the hope to trigger some kind of reaction. I don't mind if new checks are introduced, and I agree that it is useful and makes sense. But the checks should only be introduced after a reasonable attempt was made to fix _all_ associated problems. That doesn't mean that the entire work has to be done by the person introducing the check, but I do see that person responsible for making sure (or a reasonable definition of "make sure") that all problems are fixed before actually introducing the check. Yes, I understand, this is a lot of work, but adding checks and letting all hell break loose can not be the answer. Guenter