Subject: Re: [PATCH net-next v3 1/4] crypto: caam: Avoid unused imx8m_machine_match variable

From: Breno Leitao <[email-masked]>
Date: Mon, 8 Jul 2024 04:29:29 -0700

Hello Horia,

On Fri, Jul 05, 2024 at 10:11:40AM +0000, Horia Geanta wrote:
> On 7/2/2024 9:56 PM, Breno Leitao wrote:

> > 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?

That is an option as well. Not sure if it makes any difference, tho.

If you prefer __maybe_unused, I am more than happy to send a follow-up
patch to convert the #ifdef to __maybe_unused. Up to you.

Thanks!