Commit 6bc78039 authored by Qingfang Deng's avatar Qingfang Deng Committed by Jakub Kicinski
Browse files

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: default avatarQingfang Deng <qingfang.deng@linux.dev>
Link: https://patch.msgid.link/20260410054954.114031-2-qingfang.deng@linux.dev


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 105369d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;