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: <20240906073214.GA2097826@kernel.org>
Date: Fri, 6 Sep 2024 08:32:14 +0100
From: Simon Horman <horms@...nel.org>
To: Yan Zhen <yanzhen@...o.com>
Cc: saeedm@...dia.com, tariqt@...dia.com, leon@...nel.org,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, netdev@...r.kernel.org,
	linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
	opensource.kernel@...o.com
Subject: Re: [PATCH v1 net-next] net: ethernet: mellanox: mlx5: core: Use
 ERR_CAST() to return

On Thu, Aug 29, 2024 at 04:14:04PM +0800, Yan Zhen wrote:
> Using ERR_CAST() is more reasonable and safer, When it is necessary
> to convert the type of an error pointer and return it.
> 
> Signed-off-by: Yan Zhen <yanzhen@...o.com>

Thanks,

I agree that this change is correct.
And it seems to be the only case where this change is
relevant in this file.

And, personally, I do see a value in reducing naked casts,
even if the macro is doing much the same thing. Because
using a macro is more expressive about intent.

But, OTOH, I do see that there is a cost in terms of code-churn,
something for the maintainer to weigh-up.

Reviewed-by: Simon Horman <horms@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ