netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 net-next] nfp: Convert to use ERR_CAST()
@ 2024-08-29  7:25 Shen Lichuan
  2024-08-30 18:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Shen Lichuan @ 2024-08-29  7:25 UTC (permalink / raw)
  To: louis.peens, davem, edumazet, pabeni
  Cc: kuba, oss-drivers, netdev, linux-kernel, opensource.kernel,
	Shen Lichuan

Use ERR_CAST() as it is designed for casting an error pointer to 
another type.

Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
---
 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
index 7136bc48530b..df0234a338a8 100644
--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
+++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
@@ -278,7 +278,7 @@ struct nfp_nsp *nfp_nsp_open(struct nfp_cpp *cpp)
 
 	res = nfp_resource_acquire(cpp, NFP_RESOURCE_NSP);
 	if (IS_ERR(res))
-		return (void *)res;
+		return ERR_CAST(res);
 
 	state = kzalloc(sizeof(*state), GFP_KERNEL);
 	if (!state) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 net-next] nfp: Convert to use ERR_CAST()
  2024-08-29  7:25 [PATCH v1 net-next] nfp: Convert to use ERR_CAST() Shen Lichuan
@ 2024-08-30 18:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-30 18:20 UTC (permalink / raw)
  To: Shen Lichuan
  Cc: louis.peens, davem, edumazet, pabeni, kuba, oss-drivers, netdev,
	linux-kernel, opensource.kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 29 Aug 2024 15:25:38 +0800 you wrote:
> Use ERR_CAST() as it is designed for casting an error pointer to
> another type.
> 
> Signed-off-by: Shen Lichuan <shenlichuan@vivo.com>
> ---
>  drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [v1,net-next] nfp: Convert to use ERR_CAST()
    https://git.kernel.org/netdev/net-next/c/f24f966feb62

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-30 18:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29  7:25 [PATCH v1 net-next] nfp: Convert to use ERR_CAST() Shen Lichuan
2024-08-30 18:20 ` patchwork-bot+netdevbpf

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).