mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 16:01:44 -04:00
pppox: convert pppox_sk() to use container_of()
Use container_of() macro instead of direct pointer casting to get the pppox_sock from a sock pointer. Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev> Link: https://patch.msgid.link/20260410054954.114031-2-qingfang.deng@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
105369d627
commit
6bc78039a7
@@ -54,7 +54,7 @@ struct pppox_sock {
|
||||
|
||||
static inline struct pppox_sock *pppox_sk(struct sock *sk)
|
||||
{
|
||||
return (struct pppox_sock *)sk;
|
||||
return container_of(sk, struct pppox_sock, sk);
|
||||
}
|
||||
|
||||
struct module;
|
||||
|
||||
Reference in New Issue
Block a user