From patchwork Thu Jul 28 09:22:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 12931079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F3ABC04A68 for ; Thu, 28 Jul 2022 09:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=KaNe8gfPDt7QKa5VYJW3wDvL8W+QWbWKq376KcUEzZY=; b=FYjDD3XdnfaY4Zb+ARqoXGH59b uXbKFgSKBmJBw1f3WPodEc//63Xgn2iFds2u2qZT2+Yratl2VWhLJNVQknarUYGK7sIeD4/lVeQ5s 7LgVh2BQhAMIq5g2fWjO4uCP/bZ/KNpVVxSW8a02CmDhcsLFDdnzI/Z5kWM3UvrieQLz/szBLtMMt D7zzeBDzWNB16FcZL08K0oZZhRdhbNf3ZX9ZuHv3ZrHU2w2828m9Djexjt2+s3s77HSTpCnKbkq6/ Y9nRWJE94ZmCOGCAVCDqyURvGjageoevXlWyUo9B6tkGZ1VzFv8pQ/nbNqs5Kiq6BbKYr3W0KmLc6 0V2UKbKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGziv-006OcB-B4; Thu, 28 Jul 2022 09:22:29 +0000 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGzis-006OOt-C0 for linux-mediatek@lists.infradead.org; Thu, 28 Jul 2022 09:22:27 +0000 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 373DE20FE4; Thu, 28 Jul 2022 09:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1659000140; 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=KaNe8gfPDt7QKa5VYJW3wDvL8W+QWbWKq376KcUEzZY=; b=iclC+NarXfrqAALECZsO27bElHgeJdsCms/hrJHvEBkSkmzA/qXQ6v8PuZCunIHXDVPlNc cFqhoLd7krt4NogKAc3DC1OlWGUkpN/Y/NQHWqXAf2AtpNtc8sJg6tSZa9I7jMgLyMjQyF tXel9lVrJAnSRhXjWcpA1xv122NLLKE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1659000140; 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=KaNe8gfPDt7QKa5VYJW3wDvL8W+QWbWKq376KcUEzZY=; b=TBA2lHorOFAxGy+f8DPe3tvJL1GIVeEHMUj+A4a7hinopwHx8pN530VmqjBXuI10NHMQKf 9pRc21bXEU05upAg== 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 0351513A7E; Thu, 28 Jul 2022 09:22:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id M725OktV4mIuSwAAMHmgww (envelope-from ); Thu, 28 Jul 2022 09:22:19 +0000 Date: Thu, 28 Jul 2022 11:22:16 +0200 From: Jean Delvare To: linux-mediatek@lists.infradead.org, Matthias Brugger Cc: Sean Wang , LKML , Chenglin Xu Subject: [PATCH] soc: mediatek: Let PMIC Wrapper and SCPSYS depend on OF Message-ID: <20220728112216.13b10689@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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220728_022226_584394_D2DDE7B5 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org With the following configuration options: CONFIG_OF is not set CONFIG_MTK_PMIC_WRAP=y CONFIG_MTK_SCPSYS=y we get the following build warnings: CC drivers/soc/mediatek/mtk-pmic-wrap.o drivers/soc/mediatek/mtk-pmic-wrap.c:2138:34: warning: ‘of_pwrap_match_tbl’ defined but not used [-Wunused-const-variable=] drivers/soc/mediatek/mtk-pmic-wrap.c:1953:34: warning: ‘of_slave_match_tbl’ defined but not used [-Wunused-const-variable=] CC drivers/soc/mediatek/mtk-scpsys.o drivers/soc/mediatek/mtk-scpsys.c:1084:34: warning: ‘of_scpsys_match_tbl’ defined but not used [-Wunused-const-variable=] Looking at the code, both drivers can only bind to OF-defined device nodes, so these drivers are useless without OF and should therefore depend on it. Developers or QA teams who wish to test-build the code can still do so by enabling CONFIG_OF, which is available on all architectures and has no dependencies. Signed-off-by: Jean Delvare Reported-by: kernel test robot Link: https://lore.kernel.org/all/202207240252.ZY5hSCNB-lkp@intel.com/ Cc: Matthias Brugger Cc: Chenglin Xu --- drivers/soc/mediatek/Kconfig | 2 ++ 1 file changed, 2 insertions(+) --- linux-5.18.orig/drivers/soc/mediatek/Kconfig 2022-05-22 21:52:31.000000000 +0200 +++ linux-5.18/drivers/soc/mediatek/Kconfig 2022-07-28 10:59:55.025131145 +0200 @@ -37,6 +37,7 @@ config MTK_INFRACFG config MTK_PMIC_WRAP tristate "MediaTek PMIC Wrapper Support" depends on RESET_CONTROLLER + depends on OF select REGMAP help Say yes here to add support for MediaTek PMIC Wrapper found @@ -46,6 +47,7 @@ config MTK_PMIC_WRAP config MTK_SCPSYS bool "MediaTek SCPSYS Support" default ARCH_MEDIATEK + depends on OF select REGMAP select MTK_INFRACFG select PM_GENERIC_DOMAINS if PM