From: David Miller <davem@davemloft.net>
To: xiaosuo@gmail.com
Cc: shemminger@vyatta.com, ebiederm@xmission.com,
sjur.brandeland@stericsson.com, xemul@openvz.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: remove the duplicate #ifdef __KERNEL__
Date: Thu, 06 Jan 2011 11:42:13 -0800 (PST) [thread overview]
Message-ID: <20110106.114213.229742655.davem@davemloft.net> (raw)
In-Reply-To: <1294300788-3540-1-git-send-email-xiaosuo@gmail.com>
From: Changli Gao <xiaosuo@gmail.com>
Date: Thu, 6 Jan 2011 15:59:48 +0800
> Since we are already in #ifdef __KERNEL__, we don't need to check it
> again.
>
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Applied, but please CC: netdev on all networking patches.
> ---
> include/linux/socket.h | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
> diff --git a/include/linux/socket.h b/include/linux/socket.h
> index 86b652f..5f65f14 100644
> --- a/include/linux/socket.h
> +++ b/include/linux/socket.h
> @@ -30,12 +30,10 @@ struct cred;
> #define __sockaddr_check_size(size) \
> BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
>
> -#ifdef __KERNEL__
> -# ifdef CONFIG_PROC_FS
> +#ifdef CONFIG_PROC_FS
> struct seq_file;
> extern void socket_seq_show(struct seq_file *seq);
> -# endif
> -#endif /* __KERNEL__ */
> +#endif
>
> typedef unsigned short sa_family_t;
>
> @@ -311,7 +309,6 @@ struct ucred {
> /* IPX options */
> #define IPX_TYPE 1
>
> -#ifdef __KERNEL__
> extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred);
>
> extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
> @@ -333,6 +330,5 @@ struct timespec;
>
> extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
> unsigned int flags, struct timespec *timeout);
> -#endif
> #endif /* not kernel and not glibc */
> #endif /* _LINUX_SOCKET_H */
parent reply other threads:[~2011-01-06 19:42 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1294300788-3540-1-git-send-email-xiaosuo@gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110106.114213.229742655.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=sjur.brandeland@stericsson.com \
--cc=xemul@openvz.org \
--cc=xiaosuo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).