From: Denis Cheng Date: Tue, 28 Aug 2007 22:41:11 +0000 (-0700) Subject: [NETLINK]: use container_of instead X-Git-Tag: v2.6.24-rc1~1454^2~754 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32b21e034be9954eaae0278df20e0251eb958ded;p=linux-2.6 [NETLINK]: use container_of instead This could make future redesign of struct netlink_sock easier. Signed-off-by: Denis Cheng Signed-off-by: David S. Miller --- diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 5681ce3aeb..a78d962e2c 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -88,7 +88,7 @@ struct netlink_sock { static inline struct netlink_sock *nlk_sk(struct sock *sk) { - return (struct netlink_sock *)sk; + return container_of(sk, struct netlink_sock, sk); } struct nl_pid_hash {