netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mctp: Remove unnecessary cast in mctp_cb
@ 2025-03-14  9:00 Herbert Xu
  2025-03-14 12:51 ` Jeremy Kerr
  2025-03-21 17:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Herbert Xu @ 2025-03-14  9:00 UTC (permalink / raw)
  To: Jeremy Kerr, Matt Johnston, netdev

The void * cast in mctp_cb is unnecessary as it's already been done
at the start of the function.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/include/net/mctp.h b/include/net/mctp.h
index 1ecbff7116f6..07d458990113 100644
--- a/include/net/mctp.h
+++ b/include/net/mctp.h
@@ -212,7 +212,7 @@ static inline struct mctp_skb_cb *mctp_cb(struct sk_buff *skb)
 
 	BUILD_BUG_ON(sizeof(struct mctp_skb_cb) > sizeof(skb->cb));
 	WARN_ON(cb->magic != 0x4d435450);
-	return (void *)(skb->cb);
+	return cb;
 }
 
 /* If CONFIG_MCTP_FLOWS, we may add one of these as a SKB extension,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [PATCH] net: mctp: Remove unnecessary cast in mctp_cb
  2025-03-14  9:00 [PATCH] net: mctp: Remove unnecessary cast in mctp_cb Herbert Xu
@ 2025-03-14 12:51 ` Jeremy Kerr
  2025-03-21 17:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jeremy Kerr @ 2025-03-14 12:51 UTC (permalink / raw)
  To: Herbert Xu, Matt Johnston, netdev

Hi Herbert,

> The void * cast in mctp_cb is unnecessary as it's already been done
> at the start of the function.

Thanks for the change, all looks good to me, and now we're consistent
with __mctp_cb() above.

Acked-by: Jeremy Kerr <jk@codeconstruct.com.au>

Cheers,


Jeremy

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

* Re: [PATCH] net: mctp: Remove unnecessary cast in mctp_cb
  2025-03-14  9:00 [PATCH] net: mctp: Remove unnecessary cast in mctp_cb Herbert Xu
  2025-03-14 12:51 ` Jeremy Kerr
@ 2025-03-21 17:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-21 17:30 UTC (permalink / raw)
  To: Herbert Xu; +Cc: jk, matt, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 14 Mar 2025 17:00:41 +0800 you wrote:
> The void * cast in mctp_cb is unnecessary as it's already been done
> at the start of the function.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Here is the summary with links:
  - net: mctp: Remove unnecessary cast in mctp_cb
    https://git.kernel.org/netdev/net-next/c/a6984aa806c8

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] 3+ messages in thread

end of thread, other threads:[~2025-03-21 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14  9:00 [PATCH] net: mctp: Remove unnecessary cast in mctp_cb Herbert Xu
2025-03-14 12:51 ` Jeremy Kerr
2025-03-21 17:30 ` 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).