Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Jean Delvare <jdelvare@suse.de>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Sean Wang <sean.wang@mediatek.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Chenglin Xu <chenglin.xu@mediatek.com>
Subject: Re: [PATCH] soc: mediatek: Let PMIC Wrapper and SCPSYS depend on OF
Date: Thu, 28 Jul 2022 12:51:44 +0200	[thread overview]
Message-ID: <98eccbdd-3446-f44d-9278-79a4a60c1c18@collabora.com> (raw)
In-Reply-To: <20220728112216.13b10689@endymion.delvare>

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 <jdelvare@suse.de>
> Reported-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/all/202207240252.ZY5hSCNB-lkp@intel.com/
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Chenglin Xu <chenglin.xu@mediatek.com>
> ---
>   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
> 


-- 


  reply	other threads:[~2022-07-28 10:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28  9:22 [PATCH] soc: mediatek: Let PMIC Wrapper and SCPSYS depend on OF Jean Delvare
2022-07-28 10:51 ` AngeloGioacchino Del Regno [this message]
2022-07-28 11:38   ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98eccbdd-3446-f44d-9278-79a4a60c1c18@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=chenglin.xu@mediatek.com \
    --cc=jdelvare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=sean.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox