Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30398881rwd; Thu, 6 Jul 2023 05:30:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJq0qpOWSX7DRlxNtJ5+SE//UsYSXNT0BrvEUChmE6vrS2zOgZu7dXCrlbW/eKSD15+6Ps X-Received: by 2002:a05:6808:f0b:b0:3a3:ac49:77dc with SMTP id m11-20020a0568080f0b00b003a3ac4977dcmr1743236oiw.1.1688646619828; Thu, 06 Jul 2023 05:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688646619; cv=none; d=google.com; s=arc-20160816; b=ZrI7yagyWvppoiHofUppSa4hRVYGQLD82r2mutxnODNBbXfVc8JHB1g+D/CAnCne7F i3uYXZQtESqH4mzPXL6dC9+Io/POc/mUi5rzZdrG9zqQYK9Taet42er3VUkwHSq3U5B0 RbXPimQlCriHe7v9pzcou841CH6iDMw57a0yC8uMZRU7jQjBZYFIpdWWSPuDSK/dOejp Y9OENai46O00dce1+K2wrn6LvrppJ/3h5InMxdv4dK2HBxv3S1RQbMqiNw48iA/A91Zr ZeyE7O0gK8bNb649rclKNeklX+nUtEu/EAymPKiluV+sQChs1K/O93nsntEo1UlN/R8n k3Ag== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=QFf6t39H4lZDv2O/jFUU/00sY+cm9b1A/XP5rjFyugI=; fh=gEa+jXONTRUMy72sPLZS/6Tev+RvK53AuTJh7z6JgZA=; b=kdQB/KLjzeuNMX6D7pyVSxb00CAyeb6gqSMRs+g9F/7zsFMb0g1+nRCFGnILwHPQtS k5rxjOy0m4Kwme1L7U3Pw0JlPv0e86bi45C6+9fYJ2DyTHpqLRGoKf0EqL8EYdz+OsIs e5oxBeTfJbfvvz3cA2kZ+lbg5RrSJhuN6d84cC4zQnzAOn6JBjIP6q/6y7mOHEHZ8MSM GptNVSXiaFNCIaHWH98vhN3VDuidlvv6lobeswt0z0apmcDuB6Lep8C9D8x7kZ2BER07 7Je8K3DqFows8BAHeeF5b2EcndOIRxVFbL/j7IccFXdszwVID91s3ovrZZnLAHUR125C LiCA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020a6553c1000000b0055386e1eba4si1339023pgr.431.2023.07.06.05.30.07; Thu, 06 Jul 2023 05:30:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232608AbjGFLmf (ORCPT + 99 others); Thu, 6 Jul 2023 07:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbjGFLmd (ORCPT ); Thu, 6 Jul 2023 07:42:33 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87A6B1FD5 for ; Thu, 6 Jul 2023 04:42:11 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5979:7b6f:39a:b9cb]) by michel.telenet-ops.be with bizsmtp id Hni62A00145Xpxs06ni620; Thu, 06 Jul 2023 13:42:08 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qHNN3-000faq-HA; Thu, 06 Jul 2023 13:42:05 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qHNN7-000QkF-Ro; Thu, 06 Jul 2023 13:42:05 +0200 From: Geert Uytterhoeven To: Mark Brown , Greg Kroah-Hartman , "Rafael J . Wysocki" , Lee Jones , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Benjamin Gray , Christophe Leroy Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/3] regmap: Replace "default y if" by select Date: Thu, 6 Jul 2023 13:42:02 +0200 Message-Id: <525c37a568b10623ffb2d108850afd7e37f9350e.1688643442.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,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 Merely setting the default to enabled is no guarantee that a Kconfig option is actually enabled. While this works for an invisible option, the user can still disable it manually if the option is visible. Hence since the REGMAP option was made visible if KUNIT_ALL_TESTS is enabled, the user can now manually disable REGMAP, causing build failures if any of the REGMAP_* configuration options are enabled. Fix this by replacing "default y if ..." by individual "select REGMAP" statements for all users. Fixes: 70a640c0efa76674 ("regmap: REGMAP_KUNIT should not select REGMAP") Reported-by: Benjamin Gray Closes: https://lore.kernel.org/r/20230705003024.1486757-1-bgray@linux.ibm.com Reported-by: Christophe Leroy Closes: https://lore.kernel.org/r/d8437dd4-63b6-13fb-22fd-9b92c661071c@csgroup.eu Signed-off-by: Geert Uytterhoeven --- drivers/base/regmap/Kconfig | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig index 0db2021f7477f2ab..e25cc619c75de3d9 100644 --- a/drivers/base/regmap/Kconfig +++ b/drivers/base/regmap/Kconfig @@ -5,7 +5,6 @@ config REGMAP bool "Register Map support" if KUNIT_ALL_TESTS - default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO || REGMAP_FSI) select IRQ_DOMAIN if REGMAP_IRQ select MDIO_BUS if REGMAP_MDIO help @@ -25,10 +24,12 @@ config REGMAP_KUNIT config REGMAP_AC97 tristate + select REGMAP config REGMAP_I2C tristate depends on I2C + select REGMAP config REGMAP_SLIMBUS tristate @@ -37,23 +38,29 @@ config REGMAP_SLIMBUS config REGMAP_SPI tristate depends on SPI + select REGMAP config REGMAP_SPMI tristate depends on SPMI + select REGMAP config REGMAP_W1 tristate depends on W1 + select REGMAP config REGMAP_MDIO tristate + select REGMAP config REGMAP_MMIO tristate + select REGMAP config REGMAP_IRQ bool + select REGMAP config REGMAP_RAM tristate @@ -61,23 +68,29 @@ config REGMAP_RAM config REGMAP_SOUNDWIRE tristate depends on SOUNDWIRE + select REGMAP config REGMAP_SOUNDWIRE_MBQ tristate depends on SOUNDWIRE + select REGMAP config REGMAP_SCCB tristate depends on I2C + select REGMAP config REGMAP_I3C tristate depends on I3C + select REGMAP config REGMAP_SPI_AVMM tristate depends on SPI + select REGMAP config REGMAP_FSI tristate depends on FSI + select REGMAP -- 2.34.1