* [PATCH] netlink: use container_of instead
@ 2007-08-28 19:12 Denis Cheng
2007-08-28 22:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Denis Cheng @ 2007-08-28 19:12 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, James Morris, Patrick McHardy
Cc: netdev, linux-kernel
this could make future redesign of struct netlink_sock easier.
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
net/netlink/af_netlink.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 5681ce3..a78d962 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 {
--
1.5.3.rc5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] netlink: use container_of instead
2007-08-28 19:12 [PATCH] netlink: use container_of instead Denis Cheng
@ 2007-08-28 22:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-08-28 22:41 UTC (permalink / raw)
To: crquan; +Cc: kuznet, jmorris, kaber, netdev, linux-kernel
From: Denis Cheng <crquan@gmail.com>
Date: Wed, 29 Aug 2007 03:12:04 +0800
> this could make future redesign of struct netlink_sock easier.
>
> Signed-off-by: Denis Cheng <crquan@gmail.com>
Seems reasonable, patch applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-28 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-28 19:12 [PATCH] netlink: use container_of instead Denis Cheng
2007-08-28 22:41 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox