* [PATCH] net: remove the duplicate #ifdef __KERNEL__
@ 2011-01-06 7:59 Changli Gao
2011-01-06 19:42 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2011-01-06 7:59 UTC (permalink / raw)
To: David S. Miller
Cc: Stephen Hemminger, Eric W. Biederman, Sjur Braendeland,
Pavel Emelyanov, linux-kernel, Changli Gao
Since we are already in #ifdef __KERNEL__, we don't need to check it
again.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
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 */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: remove the duplicate #ifdef __KERNEL__
2011-01-06 7:59 [PATCH] net: remove the duplicate #ifdef __KERNEL__ Changli Gao
@ 2011-01-06 19:42 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-01-06 19:42 UTC (permalink / raw)
To: xiaosuo; +Cc: shemminger, ebiederm, sjur.brandeland, xemul, linux-kernel,
netdev
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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-06 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 7:59 [PATCH] net: remove the duplicate #ifdef __KERNEL__ Changli Gao
2011-01-06 19:42 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.