From: Horia Geanta <horia.geanta@nxp.com>
To: Breno Leitao <leitao@debian.org>,
"kuba@kernel.org" <kuba@kernel.org>,
Pankaj Gupta <pankaj.gupta@nxp.com>,
Gaurav Jain <gaurav.jain@nxp.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: "horms@kernel.org" <horms@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH net-next v3 1/4] crypto: caam: Avoid unused imx8m_machine_match variable
Date: Fri, 5 Jul 2024 10:11:40 +0000 [thread overview]
Message-ID: <ffcb4e2a-22f2-4ce2-a2cd-ad05763c91f4@nxp.com> (raw)
In-Reply-To: <20240702185557.3699991-2-leitao@debian.org>
On 7/2/2024 9:56 PM, Breno Leitao wrote:
> If caam module is built without OF support, the compiler returns the
> following warning:
>
> drivers/crypto/caam/ctrl.c:83:34: warning: 'imx8m_machine_match' defined but not used [-Wunused-const-variable=]
>
> imx8m_machine_match is only referenced by of_match_node(), which is set
> to NULL if CONFIG_OF is not set, as of commit 5762c20593b6b ("dt: Add
> empty of_match_node() macro"):
>
> #define of_match_node(_matches, _node) NULL
>
> Do not create imx8m_machine_match if CONFIG_OF is not set.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202407011309.cpTuOGdg-lkp@intel.com/
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/crypto/caam/ctrl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
> index bd418dea586d..d4b39184dbdb 100644
> --- a/drivers/crypto/caam/ctrl.c
> +++ b/drivers/crypto/caam/ctrl.c
> @@ -80,6 +80,7 @@ static void build_deinstantiation_desc(u32 *desc, int handle)
> append_jump(desc, JUMP_CLASS_CLASS1 | JUMP_TYPE_HALT);
> }
>
> +#ifdef CONFIG_OF
> static const struct of_device_id imx8m_machine_match[] = {
> { .compatible = "fsl,imx8mm", },
> { .compatible = "fsl,imx8mn", },
> @@ -88,6 +89,7 @@ static const struct of_device_id imx8m_machine_match[] = {
> { .compatible = "fsl,imx8ulp", },
> { }
> };
> +#endif
>
Shouldn't using __maybe_unused instead of the ifdeffery be preferred
in this case?
I know my comment comes late (patch has been merged to net-next), sorry for this.
Still I'd like to clarify this for future.
Thanks,
Horia
next prev parent reply other threads:[~2024-07-05 10:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 18:55 [PATCH net-next v3 0/3] crypto: caam: Unembed net_dev Breno Leitao
2024-07-02 18:55 ` [PATCH net-next v3 1/4] crypto: caam: Avoid unused imx8m_machine_match variable Breno Leitao
2024-07-05 10:11 ` Horia Geanta [this message]
2024-07-08 11:29 ` Breno Leitao
2024-07-09 10:44 ` Horia Geanta
2024-07-02 18:55 ` [PATCH net-next v3 2/4] crypto: caam: Make CRYPTO_DEV_FSL_CAAM dependent of COMPILE_TEST Breno Leitao
2024-07-02 18:55 ` [PATCH net-next v3 3/4] crypto: caam: Unembed net_dev structure from qi Breno Leitao
2024-07-04 2:45 ` Jakub Kicinski
2024-07-04 16:15 ` Breno Leitao
2024-07-04 17:18 ` Jakub Kicinski
2024-07-02 18:55 ` [PATCH net-next v3 4/4] crypto: caam: Unembed net_dev structure in dpaa2 Breno Leitao
2024-07-03 5:45 ` [EXT] " Gaurav Jain
2024-07-03 11:26 ` Breno Leitao
2024-07-04 18:00 ` [PATCH net-next v3 0/3] crypto: caam: Unembed net_dev patchwork-bot+netdevbpf
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=ffcb4e2a-22f2-4ce2-a2cd-ad05763c91f4@nxp.com \
--to=horia.geanta@nxp.com \
--cc=davem@davemloft.net \
--cc=gaurav.jain@nxp.com \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pankaj.gupta@nxp.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