From patchwork Tue Nov 22 14:41:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 24412 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2250416wrr; Tue, 22 Nov 2022 06:51:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf6lxDhXHN/o6Z3LBJxA+Ep3axOmYnTIYhgseIg5o47YQGNk7tg/7sMqkzI+t1yIL2P5Enfe X-Received: by 2002:a17:906:504:b0:7b5:2d9f:4019 with SMTP id j4-20020a170906050400b007b52d9f4019mr10752635eja.536.1669128712007; Tue, 22 Nov 2022 06:51:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669128712; cv=none; d=google.com; s=arc-20160816; b=0dyZVxKBtUT5UhsnFSYfWBErpJT+g5i1kRBGGEPl+JZ9RPtdJ8w9UR48Tkim/kVWGg FMuPNaeW137pE59hMNq4lhWIdZ7YrFyQbRgKw05DD9Q2XW+7q2h54BSr/hml1qgUC+vm EoHdtLUTSni3pvd2z5Eiv8U/TDPZ2w7Xwvt2MdEYnh/TzhQ63i/1cwaHQuP9V8euAcsI eJ7UuLr47q+83EkS3GIQEP2wLsOpENusFFuLkL1nj47HhXnJA9lfNdV5PKbcNA0DtlB1 EUDG9C09R+BID2Gw2qXzDvltiHQZx5o+KFLE37jHulh5YYIa9+OpGdOgJ9vgW1vsw6o0 4M4Q== 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:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=LmN1hwBs4+4uTRkpp4eNPSMHGUAlw5RApBOUSqclOpE=; b=VCC+HRXGSu4rVcYFrN6NJkMgSrWGuq9OQU3h1v/MfUcDzMYS1qRh2Gr9HeJbyT7bem dkWKaFIfXGJaiOshuUOY45ROsxlgvZi9dWUvBjEAttY8hTgeBc6MEnFfQKUUIJfZHusE FRoco0vDU/d1YqwAl8JxwJVcYPy3AH/R+RqAALhCj0odX/zbjLMtrXbB513yZO3mqqZv F9tpqZ0G1B2Vv5BQRJ9yiA1mH4H1j4Z269mfFNXj7woxcj3pYr3LOQnLhu6cMZ3w3S9o fIRPqO9nSlVJQvCx3fMCBjHEuKBfGIqayF2LcUZWgTCJKfySDXGzUurHMqGaUkb1jY7t leEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=cJv41sKF; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr25-20020a1709073f9900b007b4d76f5b17si7641214ejc.82.2022.11.22.06.51.27; Tue, 22 Nov 2022 06:51:51 -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=@suse.de header.s=susede2_rsa header.b=cJv41sKF; 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 S232997AbiKVOlp (ORCPT + 99 others); Tue, 22 Nov 2022 09:41:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233058AbiKVOlj (ORCPT ); Tue, 22 Nov 2022 09:41:39 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 195286B21D for ; Tue, 22 Nov 2022 06:41:37 -0800 (PST) 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-out2.suse.de (Postfix) with ESMTPS id B95F21F85D; Tue, 22 Nov 2022 14:41:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1669128095; 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; bh=LmN1hwBs4+4uTRkpp4eNPSMHGUAlw5RApBOUSqclOpE=; b=cJv41sKF6Vg9wsPD41beCiNeYxTaW11IO3hDU5UrYISuaUr42uKJqjZxNlmWnnSrdyMrhz jrpQGqM1U7GifY2v4h69cgGWfx08c4i9DfpmDe/8vicjzpAsIPdUTURgICFEIBggBPLXvm 5wD/a6iaEm4MJ5gr1jOeK0kAFWYr9cY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1669128095; 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; bh=LmN1hwBs4+4uTRkpp4eNPSMHGUAlw5RApBOUSqclOpE=; b=J5Zo1Tta+a6RkSwZizIk9ZqKU3vBjVfZkGzOmoALJBGsReW2wnfy87ABaGYhPWLKRaSwJW x9TfPawEZ+9KN3BA== 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 708B213AA1; Tue, 22 Nov 2022 14:41:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iknKGZ/ffGMFegAAMHmgww (envelope-from ); Tue, 22 Nov 2022 14:41:35 +0000 Date: Tue, 22 Nov 2022 15:41:34 +0100 From: Jean Delvare To: LKML Cc: Lee Jones , Bartosz Golaszewski , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Luca Ceresoli , "Jonathan =?utf-8?q?Neusch=C3=A4?= =?utf-8?q?fer?= " Subject: [PATCH] mfd: Drop obsolete dependencies on COMPILE_TEST Message-ID: <20221122154134.58a7a18b@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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750208308414398248?= X-GMAIL-MSGID: =?utf-8?q?1750208308414398248?= Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. It is actually better to always build such drivers with OF enabled, so that the test builds are closer to how each driver will actually be built on its intended target. Building them without OF may not test much as the compiler will optimize out potentially large parts of the code. In the worst case, this could even pop false positive warnings. Dropping COMPILE_TEST here improves the quality of our testing and avoids wasting time on non-existent issues. As a minor optimization, this also lets us drop of_match_ptr(), as we now know what it will resolve to, we might as well save cpp some work. Signed-off-by: Jean Delvare Cc: Lee Jones Cc: Bartosz Golaszewski Cc: Chanwoo Choi Cc: Krzysztof Kozlowski Cc: Bartlomiej Zolnierkiewicz Cc: Luca Ceresoli Cc: "Jonathan Neuschäfer" --- drivers/mfd/Kconfig | 16 ++++++++-------- drivers/mfd/motorola-cpcap.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) --- linux-6.0.orig/drivers/mfd/Kconfig +++ linux-6.0/drivers/mfd/Kconfig @@ -794,7 +794,7 @@ config MFD_MAX14577 config MFD_MAX77620 bool "Maxim Semiconductor MAX77620 and MAX20024 PMIC Support" depends on I2C=y - depends on OF || COMPILE_TEST + depends on OF select MFD_CORE select REGMAP_I2C select REGMAP_IRQ @@ -809,7 +809,7 @@ config MFD_MAX77620 config MFD_MAX77650 tristate "Maxim MAX77650/77651 PMIC Support" depends on I2C - depends on OF || COMPILE_TEST + depends on OF select MFD_CORE select REGMAP_I2C select REGMAP_IRQ @@ -824,7 +824,7 @@ config MFD_MAX77650 config MFD_MAX77686 tristate "Maxim Semiconductor MAX77686/802 PMIC Support" depends on I2C - depends on OF || COMPILE_TEST + depends on OF select MFD_CORE select REGMAP_I2C select REGMAP_IRQ @@ -853,7 +853,7 @@ config MFD_MAX77693 config MFD_MAX77714 tristate "Maxim Semiconductor MAX77714 PMIC Support" depends on I2C - depends on OF || COMPILE_TEST + depends on OF select MFD_CORE select REGMAP_I2C help @@ -973,7 +973,7 @@ config EZX_PCAP config MFD_CPCAP tristate "Support for Motorola CPCAP" depends on SPI - depends on OF || COMPILE_TEST + depends on OF select MFD_CORE select REGMAP_SPI select REGMAP_IRQ @@ -998,7 +998,7 @@ config MFD_VIPERBOARD config MFD_NTXEC tristate "Netronix embedded controller (EC)" - depends on OF || COMPILE_TEST + depends on OF depends on I2C select REGMAP_I2C select MFD_CORE @@ -1172,7 +1172,7 @@ config MFD_RN5T618 config MFD_SEC_CORE tristate "Samsung Electronics PMIC Series Support" depends on I2C=y - depends on OF || COMPILE_TEST + depends on OF select MFD_CORE select REGMAP_I2C select REGMAP_IRQ @@ -2018,7 +2018,7 @@ config MFD_STPMIC1 config MFD_STMFX tristate "Support for STMicroelectronics Multi-Function eXpander (STMFX)" depends on I2C - depends on OF || COMPILE_TEST + depends on OF select MFD_CORE select REGMAP_I2C help --- linux-6.0.orig/drivers/mfd/motorola-cpcap.c +++ linux-6.0/drivers/mfd/motorola-cpcap.c @@ -296,7 +296,7 @@ static int cpcap_probe(struct spi_device struct cpcap_ddata *cpcap; int ret; - match = of_match_device(of_match_ptr(cpcap_of_match), &spi->dev); + match = of_match_device(cpcap_of_match, &spi->dev); if (!match) return -ENODEV;