Commit 2ad0d9d413abc3380fc1d89a9da7f8db59d9746b
Committed by
David S. Miller
1 parent
f88de8de5a
Exists in
master
and in
7 other branches
net: remove the duplicate #ifdef __KERNEL__
Since we are already in #ifdef __KERNEL__, we don't need to check it again. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 2 additions and 6 deletions Side-by-side Diff
include/linux/socket.h
... | ... | @@ -30,12 +30,10 @@ |
30 | 30 | #define __sockaddr_check_size(size) \ |
31 | 31 | BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) |
32 | 32 | |
33 | -#ifdef __KERNEL__ | |
34 | -# ifdef CONFIG_PROC_FS | |
33 | +#ifdef CONFIG_PROC_FS | |
35 | 34 | struct seq_file; |
36 | 35 | extern void socket_seq_show(struct seq_file *seq); |
37 | -# endif | |
38 | -#endif /* __KERNEL__ */ | |
36 | +#endif | |
39 | 37 | |
40 | 38 | typedef unsigned short sa_family_t; |
41 | 39 | |
... | ... | @@ -311,7 +309,6 @@ |
311 | 309 | /* IPX options */ |
312 | 310 | #define IPX_TYPE 1 |
313 | 311 | |
314 | -#ifdef __KERNEL__ | |
315 | 312 | extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred); |
316 | 313 | |
317 | 314 | extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
... | ... | @@ -333,7 +330,6 @@ |
333 | 330 | |
334 | 331 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, |
335 | 332 | unsigned int flags, struct timespec *timeout); |
336 | -#endif | |
337 | 333 | #endif /* not kernel and not glibc */ |
338 | 334 | #endif /* _LINUX_SOCKET_H */ |