* Re: [PATCH] Move "struct net" declaration inside the __KERNEL__ macro guard [not found] <AANLkTimXnjnkNgwtEVpXKYMxXgmBdye=Gtjeggd4N9UA@mail.gmail.com> @ 2010-09-17 19:38 ` Ollie Wild 2010-09-17 23:51 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: Ollie Wild @ 2010-09-17 19:38 UTC (permalink / raw) To: linux-kernel; +Cc: netdev, Andrew Morton, David Marmaros (Resending with a proper signoff.) This patch reduces namespace pollution by moving the "struct net" declaration out of the userspace-facing portion of linux/netlink.h. It has no impact on the kernel, and the declaration is not referenced anywhere outside the __KERNEL__ macro guard. (This came up because we have several C++ applications which use "net" as a namespace name.) Ollie Signed-off-by: Ollie Wild <aaw@google.com> --- include/linux/netlink.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 59d0669..1235669 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -27,8 +27,6 @@ #define MAX_LINKS 32 -struct net; - struct sockaddr_nl { sa_family_t nl_family; /* AF_NETLINK */ unsigned short nl_pad; /* zero */ @@ -151,6 +149,8 @@ struct nlattr { #include <linux/capability.h> #include <linux/skbuff.h> +struct net; + static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) { return (struct nlmsghdr *)skb->data; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Move "struct net" declaration inside the __KERNEL__ macro guard 2010-09-17 19:38 ` [PATCH] Move "struct net" declaration inside the __KERNEL__ macro guard Ollie Wild @ 2010-09-17 23:51 ` David Miller 2010-09-22 15:54 ` Ollie Wild 0 siblings, 1 reply; 4+ messages in thread From: David Miller @ 2010-09-17 23:51 UTC (permalink / raw) To: aaw; +Cc: linux-kernel, netdev, akpm, davem From: Ollie Wild <aaw@google.com> Date: Fri, 17 Sep 2010 14:38:59 -0500 > (Resending with a proper signoff.) Your patch is still unusable because your email client white-space mangled the patch, turning tabs into space characters. Please fix this up and resubmit, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Move "struct net" declaration inside the __KERNEL__ macro guard 2010-09-17 23:51 ` David Miller @ 2010-09-22 15:54 ` Ollie Wild 2010-09-22 20:21 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: Ollie Wild @ 2010-09-22 15:54 UTC (permalink / raw) To: David Miller; +Cc: linux-kernel, netdev, akpm, davem [-- Attachment #1: Type: text/plain, Size: 437 bytes --] On Fri, Sep 17, 2010 at 6:51 PM, David Miller <davem@davemloft.net> wrote: > > From: Ollie Wild <aaw@google.com> > Date: Fri, 17 Sep 2010 14:38:59 -0500 > > > (Resending with a proper signoff.) > > Your patch is still unusable because your email client white-space mangled > the patch, turning tabs into space characters. > > Please fix this up and resubmit, thanks. Third time's a charm ... Signed-off-by: Ollie Wild <aaw@google.com> [-- Attachment #2: netlink.txt --] [-- Type: text/plain, Size: 1037 bytes --] commit 27fb1ec3fe29978ca7f195aac5dbda6f301c7c24 Author: Ollie Wild <aaw@google.com> Date: Fri Aug 13 14:21:44 2010 -0500 Move "struct net" declaration inside the __KERNEL__ macro guard. This patch reduces namespace pollution by moving the "struct net" declaration out of the userspace-facing portion of linux/netlink.h. It has no impact on the kernel. (This came up because we have several C++ applications which use "net" as a namespace name.) Ollie diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 59d0669..1235669 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -27,8 +27,6 @@ #define MAX_LINKS 32 -struct net; - struct sockaddr_nl { sa_family_t nl_family; /* AF_NETLINK */ unsigned short nl_pad; /* zero */ @@ -151,6 +149,8 @@ struct nlattr { #include <linux/capability.h> #include <linux/skbuff.h> +struct net; + static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) { return (struct nlmsghdr *)skb->data; ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Move "struct net" declaration inside the __KERNEL__ macro guard 2010-09-22 15:54 ` Ollie Wild @ 2010-09-22 20:21 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2010-09-22 20:21 UTC (permalink / raw) To: aaw; +Cc: linux-kernel, netdev, akpm, davem From: Ollie Wild <aaw@google.com> Date: Wed, 22 Sep 2010 10:54:54 -0500 > On Fri, Sep 17, 2010 at 6:51 PM, David Miller <davem@davemloft.net> wrote: >> >> From: Ollie Wild <aaw@google.com> >> Date: Fri, 17 Sep 2010 14:38:59 -0500 >> >> > (Resending with a proper signoff.) >> >> Your patch is still unusable because your email client white-space mangled >> the patch, turning tabs into space characters. >> >> Please fix this up and resubmit, thanks. > > Third time's a charm ... > > Signed-off-by: Ollie Wild <aaw@google.com> Applied, thanks. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-22 20:20 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <AANLkTimXnjnkNgwtEVpXKYMxXgmBdye=Gtjeggd4N9UA@mail.gmail.com> 2010-09-17 19:38 ` [PATCH] Move "struct net" declaration inside the __KERNEL__ macro guard Ollie Wild 2010-09-17 23:51 ` David Miller 2010-09-22 15:54 ` Ollie Wild 2010-09-22 20:21 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).