From: Qingfang Deng Date: Fri, 10 Apr 2026 05:49:50 +0000 (+0800) Subject: pppox: convert pppox_sk() to use container_of() X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=6bc78039a77a46d89df987813fbafe333cd81367;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20260410054954.114031-2-qingfang.deng@linux.dev Signed-off-by: Jakub Kicinski --- 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;