Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Qingfang Deng and committed by
Jakub Kicinski
6bc78039 105369d6

+1 -1
+1 -1
include/linux/if_pppox.h
··· 54 54 55 55 static inline struct pppox_sock *pppox_sk(struct sock *sk) 56 56 { 57 - return (struct pppox_sock *)sk; 57 + return container_of(sk, struct pppox_sock, sk); 58 58 } 59 59 60 60 struct module;