Commit 7965bd4d authored by Joe Perches's avatar Joe Perches

net.h/skbuff.h: Remove extern from function prototypes

There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
parent a0f4ecf3
...@@ -195,27 +195,23 @@ enum { ...@@ -195,27 +195,23 @@ enum {
SOCK_WAKE_URG, SOCK_WAKE_URG,
}; };
extern int sock_wake_async(struct socket *sk, int how, int band); int sock_wake_async(struct socket *sk, int how, int band);
extern int sock_register(const struct net_proto_family *fam); int sock_register(const struct net_proto_family *fam);
extern void sock_unregister(int family); void sock_unregister(int family);
extern int __sock_create(struct net *net, int family, int type, int proto, int __sock_create(struct net *net, int family, int type, int proto,
struct socket **res, int kern); struct socket **res, int kern);
extern int sock_create(int family, int type, int proto, int sock_create(int family, int type, int proto, struct socket **res);
struct socket **res); int sock_create_kern(int family, int type, int proto, struct socket **res);
extern int sock_create_kern(int family, int type, int proto, int sock_create_lite(int family, int type, int proto, struct socket **res);
struct socket **res); void sock_release(struct socket *sock);
extern int sock_create_lite(int family, int type, int proto, int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t len);
struct socket **res); int sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
extern void sock_release(struct socket *sock); int flags);
extern int sock_sendmsg(struct socket *sock, struct msghdr *msg, struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname);
size_t len); struct socket *sockfd_lookup(int fd, int *err);
extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, struct socket *sock_from_file(struct file *file, int *err);
size_t size, int flags);
extern struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname);
extern struct socket *sockfd_lookup(int fd, int *err);
extern struct socket *sock_from_file(struct file *file, int *err);
#define sockfd_put(sock) fput(sock->file) #define sockfd_put(sock) fput(sock->file)
extern int net_ratelimit(void); int net_ratelimit(void);
#define net_ratelimited_function(function, ...) \ #define net_ratelimited_function(function, ...) \
do { \ do { \
...@@ -243,32 +239,28 @@ do { \ ...@@ -243,32 +239,28 @@ do { \
#define net_random() prandom_u32() #define net_random() prandom_u32()
#define net_srandom(seed) prandom_seed((__force u32)(seed)) #define net_srandom(seed) prandom_seed((__force u32)(seed))
extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, int kernel_sendmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec,
struct kvec *vec, size_t num, size_t len); size_t num, size_t len);
extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg, int kernel_recvmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec,
struct kvec *vec, size_t num, size_t num, size_t len, int flags);
size_t len, int flags);
extern int kernel_bind(struct socket *sock, struct sockaddr *addr, int kernel_bind(struct socket *sock, struct sockaddr *addr, int addrlen);
int addrlen); int kernel_listen(struct socket *sock, int backlog);
extern int kernel_listen(struct socket *sock, int backlog); int kernel_accept(struct socket *sock, struct socket **newsock, int flags);
extern int kernel_accept(struct socket *sock, struct socket **newsock, int kernel_connect(struct socket *sock, struct sockaddr *addr, int addrlen,
int flags); int flags);
extern int kernel_connect(struct socket *sock, struct sockaddr *addr, int kernel_getsockname(struct socket *sock, struct sockaddr *addr,
int addrlen, int flags); int *addrlen);
extern int kernel_getsockname(struct socket *sock, struct sockaddr *addr, int kernel_getpeername(struct socket *sock, struct sockaddr *addr,
int *addrlen); int *addrlen);
extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr, int kernel_getsockopt(struct socket *sock, int level, int optname, char *optval,
int *addrlen); int *optlen);
extern int kernel_getsockopt(struct socket *sock, int level, int optname, int kernel_setsockopt(struct socket *sock, int level, int optname, char *optval,
char *optval, int *optlen); unsigned int optlen);
extern int kernel_setsockopt(struct socket *sock, int level, int optname, int kernel_sendpage(struct socket *sock, struct page *page, int offset,
char *optval, unsigned int optlen); size_t size, int flags);
extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg);
size_t size, int flags); int kernel_sock_shutdown(struct socket *sock, enum sock_shutdown_cmd how);
extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg);
extern int kernel_sock_shutdown(struct socket *sock,
enum sock_shutdown_cmd how);
#define MODULE_ALIAS_NETPROTO(proto) \ #define MODULE_ALIAS_NETPROTO(proto) \
MODULE_ALIAS("net-pf-" __stringify(proto)) MODULE_ALIAS("net-pf-" __stringify(proto))
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment