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:
Qingfang Deng
2026-04-10 13:49:50 +08:00
committed by Jakub Kicinski
parent 105369d627
commit 6bc78039a7

View File

@@ -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;