Skip to content

Commit a6984aa

Browse files
herbertxPaolo Abeni
authored andcommitted
net: mctp: Remove unnecessary cast in mctp_cb
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 <[email protected]> Acked-by: Jeremy Kerr <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent d9917c7 commit a6984aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/mctp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static inline struct mctp_skb_cb *mctp_cb(struct sk_buff *skb)
212212

213213
BUILD_BUG_ON(sizeof(struct mctp_skb_cb) > sizeof(skb->cb));
214214
WARN_ON(cb->magic != 0x4d435450);
215-
return (void *)(skb->cb);
215+
return cb;
216216
}
217217

218218
/* If CONFIG_MCTP_FLOWS, we may add one of these as a SKB extension,

0 commit comments

Comments
 (0)