Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp520455imn; Wed, 27 Jul 2022 12:28:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sa5+/LepbX7iAe9HetanCp7zBPCvUlZXwG1wtDtbrGsMl1TXk6VKnpLwAIhm0X3m6uXBNF X-Received: by 2002:a05:6402:371a:b0:43a:ece9:ab8e with SMTP id ek26-20020a056402371a00b0043aece9ab8emr24353232edb.126.1658950111251; Wed, 27 Jul 2022 12:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658950111; cv=none; d=google.com; s=arc-20160816; b=tcqCyefqsyt851IN9VO54NsHJpDScWTsFWrfcFU8afEnSuxtPK3ydSzsxUnBX11RGv RbB8Qx9YCDTnLEzksM8m4db63k720CXL6lU8ZYXN5m76tvM7XUNtQLFjnlmHQN6dGxSV Vm9ArWJdCAEl5ZbX4nwPs72+NhJgQgbFQveYmc5qT9MwV0+qFnCN+iDFoaJnvjNfC3pl wmoqIam0kjtFtVDnJfnxlY4agqWuuHYoL9sUtTNN0jcIP+2/co/bvJ7qw+IdQJlXIk8x MEhSAc3nqgwL5MaJWUYOUx1mpSP8m1nZ8jvtu1jKyZG+Q7QCEXFsUVekSYPx91C3DoOi 7CvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature:dkim-signature; bh=17kigxGvW4oO2tVOPFkWCos9YzmgV9xkKWZ4CGN+uQ8=; b=E+6FMMgkBw7jrMpOmwwBZd/dKnkSTuZ94Ukf1Lrkm2vzvVCcApC0aNkFIAcnECn8kO rpA8fol/H6kGz04JaqhFiqqPAJvXphZuXZ8evRe1+fPqZb0BneETIHeWjfR4FuYwfv1O gyKWsu8G8Ed2/2kpTvtzQxivvn9eK28jdPayOneNXQyzPimxAA1E9tT9gwbV4b/XjmcQ SyiulF7WYMFdWmckSD8JcpH2GYE+D6OPVH8T20ZeGpSAxBLL8mEcTiOZDuW33184iCtG 5naXBic8IQfrfVqW7+ryL0yPTBm/XpHTtyoUnZdvmYJuJV/yhSXOpqxXdh9Ca0UuVKrz cWXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=SLuQle99; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di17-20020a170906731100b0072f09e7093fsi20740127ejc.141.2022.07.27.12.28.05; Wed, 27 Jul 2022 12:28:31 -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=@suse.de header.s=susede2_rsa header.b=SLuQle99; dkim=neutral (no key) header.i=@suse.de; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234306AbiG0TJe (ORCPT + 99 others); Wed, 27 Jul 2022 15:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236308AbiG0TJL (ORCPT ); Wed, 27 Jul 2022 15:09:11 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB074F37 for ; Wed, 27 Jul 2022 11:50:09 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 413E43371F; Wed, 27 Jul 2022 18:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1658947808; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=17kigxGvW4oO2tVOPFkWCos9YzmgV9xkKWZ4CGN+uQ8=; b=SLuQle99oELpYuyDPVS05yBosR0Nna4Bweo+4Gi6Mv/UYoONOi8JumrhPcY3VzENkmxmMq doy/Nrp8jeVoFGb9yZ6VCnlLWx7yjX6OIKQ0bzHbOZNORvfklce/ePSBEtBHQOc+oGpP5W 08hD7uffxz4yxpFvuf4Ts8UBtFnzQYM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1658947808; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=17kigxGvW4oO2tVOPFkWCos9YzmgV9xkKWZ4CGN+uQ8=; b=xORdcup2W6obmsRjxmakMi+W4NXFxHQuW+qMb1tpttieluQXq52lcVKjnwEAAqfw0WlIVi axgLzh3h0+tWF5Aw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id ED68013ABC; Wed, 27 Jul 2022 18:50:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id d8diON+I4WIVPAAAMHmgww (envelope-from ); Wed, 27 Jul 2022 18:50:07 +0000 Date: Wed, 27 Jul 2022 20:50:06 +0200 From: Jean Delvare To: Mark Brown Cc: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Liam Girdwood , Matthias Brugger , Chenglin Xu , Sean Wang Subject: Re: [PATCH RFC] regulator: mt6380: Fix unused array warning Message-ID: <20220727205006.0ff42274@endymion.delvare> In-Reply-To: References: <20220727132637.76d6073f@endymion.delvare> <20220727140809.0951b72d@endymion.delvare> Organization: SUSE Linux X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 Hi Mark, On Wed, 27 Jul 2022 13:24:35 +0100, Mark Brown wrote: > On Wed, Jul 27, 2022 at 02:08:09PM +0200, Jean Delvare wrote: > > On Wed, 27 Jul 2022 13:01:29 +0100, Mark Brown wrote: > > > > It's helpful to keep the build coverage high. > > > OF does not depend on the architecture, anyone can enable it. So I > > can't see any problem of coverage with making drivers depend on OF. > > It still reduces a barrier to entry. Can't see how that would be a goal. By allowing randomconfig to pick configuration option combinations which do not make sense, we are not increasing coverage. That's quite the opposite. We are limited by the overall power of the build farm, so every test build of such a useless combination is a waste of resources. We'd rather use that machine time to test a configuration option combination which real people would be using, as these are the ones we care about. > It's also that it's easier to just > prefer the conditional compilation pattern rather than either check to > see which cases is needed or have people copy an example that doesn't > use it when they should. In my experience, there's always a very easy way to silent a warning, but in most cases, that easy way is wrong because it hides the warning instead of fixing its cause. Very much to the point, the build farm pointed us to a combination of options which triggers warnings which developers had apparently never noticed before, which is a hint that maybe this combination is not something we should support in the first place. We can of course silent all such warnings with __maybe_unused, but that should not be our first choice (else we might as well stop building with -Wunused). Not only that, but in this case it might also be that we have kernel code that can be removed because it isn't needed. Not much, but that would still be a gain, methinks. I also don't think that one goal of the kernel code is to be easy to copy and paste without understanding what you are doing. Anyway, this is your subsystem, so the decision is yours. My patch removes the warning, if you are happy with it, feel free to apply it. Thanks, -- Jean Delvare SUSE L3 Support