Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp388566imn; Thu, 28 Jul 2022 04:02:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vLfztgSsfQ491J4phaoAXhrh6N01QabgTw2VXs5TbvLYlafT/JQ5JV4h1/Girf8qil/9Oo X-Received: by 2002:a17:907:a05c:b0:72b:347b:4f59 with SMTP id gz28-20020a170907a05c00b0072b347b4f59mr20348009ejc.764.1659006168297; Thu, 28 Jul 2022 04:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659006168; cv=none; d=google.com; s=arc-20160816; b=Ui6X1/dA3zf5E/78j5f8Cer0QYZtyqwT+off5NSeZFpxyNXVJgbcAKEsWRaoDp9q0X E2x3kmusP+t7hjbOBsjBLnqTkp8eHOH3zGx1Hre8Mj6cKAI8sodmWIPW3nFDm8P3WAGF 9K1nWjY0ZJtdQGth9Re3HSldFELtXrqgxfAHg4t/QYTknE5o24eL5RZIM7k9lVt/MBFD wG4JAOXFKQi0iEjitd7bIKHW1g+EKGsbi9yrjEKe0ui7IZiP8cKjnvtT2eyrW8vSIrZs CkQYTw79JN53Ki5PBVGtjMqpLbm4Uns29QxUcWnRVzAdJ5jxYLOqfO5wvuya2dFBwFSG 5DNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tyX3aYDFsILjvjSe3x2SCTz64FH9Bw7z4DWRUub/3+I=; b=u3EFJo17SVIdkxtFNgYwJyk7OfFK5bsrfUNHYTNUxOtiTbQ41M6MsXDaBJZesdsyZe N3+BJNelRzFrVHkJZWdIGuYNyzrxmgPWl2Rxo1dqTYYRRezVACQC/PF4MnR/52WuhHss rE10ktD592xiCubEZQ+hWXK54ufF2Noo3+LSLe7KBT2XEia9p+Rzhdu+WckR+8chMe0M FCSbPGPWiHQMYKjt+rM1TNO8O88ofS1vpYKzdXymMpZdvJWwcnfQXECjPB6iEywrI/vO f9WSC+AnDt7Z2ju4QG684aKJdUSyOcuExlBG6Z7Vd7QJeBX98M/tsdG1LGI5fzbEgK0v ih7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=O73i4vDm; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oq19-20020a170906cc9300b0072ee427f1e6si432937ejb.934.2022.07.28.04.02.21; Thu, 28 Jul 2022 04:02:48 -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=@collabora.com header.s=mail header.b=O73i4vDm; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236260AbiG1Kvt (ORCPT + 99 others); Thu, 28 Jul 2022 06:51:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236044AbiG1Kvs (ORCPT ); Thu, 28 Jul 2022 06:51:48 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73D4122B12 for ; Thu, 28 Jul 2022 03:51:47 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id F25036601B41; Thu, 28 Jul 2022 11:51:45 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1659005506; bh=R6DrP5mpef+w1XUFgkLzJ6U/ghoD03zA8Xf+MFNAOAc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=O73i4vDmw3pkVFHoi2sCJzIHc90Z2PqAvwnwQU6y6MIDHezyqaqxaNaXEaoz7d42H PcE7/+TcEbnr59TJ7f77zNp9WnMXONANeLrzZhhEtrZM6vBLxZsDYK6pia2JSg69eB JQezS3cUHtJ+yt9bTSwn/JeqWNaEtDv+1YOu7QbB26KtowyQjzx+uuFtis0UkzI3yF FYOz4hQiCIoHTThla09KbbwvUxhR4i4uAOwZ9sdHLfBuJTSRVVGCVcTvz9kbhIuTB1 U2YFdZaXSGEp1UualKor4uQhTeiq3+p5sXdOLmteMIie+iz1jaz6xWx2Yj5LowSfdo A9Hz0795WCg7A== Message-ID: <98eccbdd-3446-f44d-9278-79a4a60c1c18@collabora.com> Date: Thu, 28 Jul 2022 12:51:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] soc: mediatek: Let PMIC Wrapper and SCPSYS depend on OF Content-Language: en-US To: Jean Delvare , linux-mediatek@lists.infradead.org, Matthias Brugger Cc: Sean Wang , LKML , Chenglin Xu References: <20220728112216.13b10689@endymion.delvare> From: AngeloGioacchino Del Regno In-Reply-To: <20220728112216.13b10689@endymion.delvare> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 Il 28/07/22 11:22, Jean Delvare ha scritto: > 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. > Hello Jean, I would prefer that you solve this warning by removing of_match_ptr() from both drivers instead. Regards, Angelo > 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 > --