diff options
| author | Qingfang Deng <qingfang.deng@linux.dev> | 2026-04-10 13:49:50 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-12 15:20:46 -0700 |
| commit | 6bc78039a77a46d89df987813fbafe333cd81367 (patch) | |
| tree | d35239c36ca08fcbfe023bcd6fe11a34757b0fd6 /include/linux | |
| parent | 105369d627b946f6a05f25e9c399167b1674d4bc (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/if_pppox.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 636772693f9aa..594d6dc3f4c9e 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h @@ -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; |
