From: Abel Vesa <abel.vesa@linaro.org>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>, Stephen Boyd <sboyd@kernel.org>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
shawnguo@kernel.org, s.hauer@pengutronix.de, abelvesa@kernel.org,
mturquette@baylibre.com, sboyd@kernel.org, kernel@pengutronix.de,
festevam@gmail.com, linux-imx@nxp.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
Peng Fan <peng.fan@nxp.com>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH V2 2/8] clk: imx93: guard imx93_clk_of_match with CONFIG_OF
Date: Mon, 15 Aug 2022 11:16:00 +0300 [thread overview]
Message-ID: <YvoAwL9qhmE03kgi@linaro.org> (raw)
In-Reply-To: <20220815013039.474970-3-peng.fan@oss.nxp.com>
On 22-08-15 09:30:33, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> There is build warning when CONFIG_OF is not selected.
> >> drivers/clk/imx/clk-imx93.c:324:34: warning: 'imx93_clk_of_match'
> >> defined but not used [-Wunused-const-variable=]
> 324 | static const struct of_device_id imx93_clk_of_match[] = {
> | ^~~~~~~~~~~~~~~~~~
>
> Use CONFIG_OF to guard imx93_clk_of_match to avoid build warning.
>
> Fixes: 24defbe194b6 ("clk: imx: add i.MX93 clk")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/clk/imx/clk-imx93.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/imx/clk-imx93.c b/drivers/clk/imx/clk-imx93.c
> index f5c9fa40491c..5099048b7916 100644
> --- a/drivers/clk/imx/clk-imx93.c
> +++ b/drivers/clk/imx/clk-imx93.c
> @@ -321,11 +321,13 @@ static int imx93_clocks_probe(struct platform_device *pdev)
> return ret;
> }
>
> +#ifdef CONFIG_OF
Hmm, I'm not sure if we should do this or rather should we make this driver
depend somehow on CONFIG_OF in Kconfig.
Looking at the other i.MX clock drivers, it would seem we need this for
all them too.
I fairly OK with this, but maybe Stephen suggests something different.
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
> static const struct of_device_id imx93_clk_of_match[] = {
> { .compatible = "fsl,imx93-ccm" },
> { /* Sentinel */ },
> };
> MODULE_DEVICE_TABLE(of, imx93_clk_of_match);
> +#endif
>
> static struct platform_driver imx93_clk_driver = {
> .probe = imx93_clocks_probe,
> --
> 2.37.1
>
next prev parent reply other threads:[~2022-08-15 8:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 1:30 [PATCH V2 0/8] clk: imx93: new gate API and composite update Peng Fan (OSS)
2022-08-15 1:30 ` [PATCH V2 1/8] dt-bindings: clock: imx93-clock: add more MU/SAI clocks Peng Fan (OSS)
2022-08-15 8:40 ` Abel Vesa
2022-08-15 1:30 ` [PATCH V2 2/8] clk: imx93: guard imx93_clk_of_match with CONFIG_OF Peng Fan (OSS)
2022-08-15 8:16 ` Abel Vesa [this message]
2022-08-15 8:19 ` Peng Fan
2022-08-15 8:23 ` Abel Vesa
2022-08-15 1:30 ` [PATCH V2 3/8] clk: imx: clk-composite-93: check slice busy Peng Fan (OSS)
2022-08-15 8:54 ` Abel Vesa
2022-08-15 1:30 ` [PATCH V2 4/8] clk: imx: clk-composite-93: check white_list Peng Fan (OSS)
2022-08-15 8:56 ` Abel Vesa
2022-08-15 1:30 ` [PATCH V2 5/8] clk: imx: add i.MX93 clk gate Peng Fan (OSS)
2022-08-15 9:07 ` Abel Vesa
2022-08-15 9:21 ` Peng Fan
2022-08-15 1:30 ` [PATCH V2 6/8] clk: imx93: switch to use new clk gate API Peng Fan (OSS)
2022-08-15 1:30 ` [PATCH V2 7/8] clk: imx93: add MU1/2 clock Peng Fan (OSS)
2022-08-15 9:09 ` Abel Vesa
2022-08-15 1:30 ` [PATCH V2 8/8] clk: imx93: add SAI IPG clk Peng Fan (OSS)
2022-08-15 9:12 ` Abel Vesa
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=YvoAwL9qhmE03kgi@linaro.org \
--to=abel.vesa@linaro.org \
--cc=abelvesa@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).