lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a3740986-cfc5-4d92-ae2d-0ce5a06ac009@nxp.com>
Date: Tue, 9 Jul 2024 10:44:13 +0000
From: Horia Geanta <horia.geanta@....com>
To: Breno Leitao <leitao@...ian.org>
CC: "kuba@...nel.org" <kuba@...nel.org>, Pankaj Gupta <pankaj.gupta@....com>,
	Gaurav Jain <gaurav.jain@....com>, "linux-crypto@...r.kernel.org"
	<linux-crypto@...r.kernel.org>, Herbert Xu <herbert@...dor.apana.org.au>,
	"David S. Miller" <davem@...emloft.net>, "horms@...nel.org"
	<horms@...nel.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, kernel test
 robot <lkp@...el.com>
Subject: Re: [PATCH net-next v3 1/4] crypto: caam: Avoid unused
 imx8m_machine_match variable

On 7/8/2024 2:29 PM, Breno Leitao wrote:
> 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.
> 
In general, I prefer avoiding preprocessor conditionals.
This seems to be suggested also here:
https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation

> 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.
> 
Nah, please don't bother.

Thanks,
Horia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ