mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
net_namespace.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: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3cc818a27d
commit
e67e16ea9b
@ -136,8 +136,8 @@ struct net {
|
|||||||
extern struct net init_net;
|
extern struct net init_net;
|
||||||
|
|
||||||
#ifdef CONFIG_NET_NS
|
#ifdef CONFIG_NET_NS
|
||||||
extern struct net *copy_net_ns(unsigned long flags,
|
struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns,
|
||||||
struct user_namespace *user_ns, struct net *old_net);
|
struct net *old_net);
|
||||||
|
|
||||||
#else /* CONFIG_NET_NS */
|
#else /* CONFIG_NET_NS */
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
@ -154,11 +154,11 @@ static inline struct net *copy_net_ns(unsigned long flags,
|
|||||||
|
|
||||||
extern struct list_head net_namespace_list;
|
extern struct list_head net_namespace_list;
|
||||||
|
|
||||||
extern struct net *get_net_ns_by_pid(pid_t pid);
|
struct net *get_net_ns_by_pid(pid_t pid);
|
||||||
extern struct net *get_net_ns_by_fd(int pid);
|
struct net *get_net_ns_by_fd(int pid);
|
||||||
|
|
||||||
#ifdef CONFIG_NET_NS
|
#ifdef CONFIG_NET_NS
|
||||||
extern void __put_net(struct net *net);
|
void __put_net(struct net *net);
|
||||||
|
|
||||||
static inline struct net *get_net(struct net *net)
|
static inline struct net *get_net(struct net *net)
|
||||||
{
|
{
|
||||||
@ -190,7 +190,7 @@ int net_eq(const struct net *net1, const struct net *net2)
|
|||||||
return net1 == net2;
|
return net1 == net2;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void net_drop_ns(void *);
|
void net_drop_ns(void *);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -307,19 +307,19 @@ struct pernet_operations {
|
|||||||
* device which caused kernel oops, and panics during network
|
* device which caused kernel oops, and panics during network
|
||||||
* namespace cleanup. So please don't get this wrong.
|
* namespace cleanup. So please don't get this wrong.
|
||||||
*/
|
*/
|
||||||
extern int register_pernet_subsys(struct pernet_operations *);
|
int register_pernet_subsys(struct pernet_operations *);
|
||||||
extern void unregister_pernet_subsys(struct pernet_operations *);
|
void unregister_pernet_subsys(struct pernet_operations *);
|
||||||
extern int register_pernet_device(struct pernet_operations *);
|
int register_pernet_device(struct pernet_operations *);
|
||||||
extern void unregister_pernet_device(struct pernet_operations *);
|
void unregister_pernet_device(struct pernet_operations *);
|
||||||
|
|
||||||
struct ctl_table;
|
struct ctl_table;
|
||||||
struct ctl_table_header;
|
struct ctl_table_header;
|
||||||
|
|
||||||
#ifdef CONFIG_SYSCTL
|
#ifdef CONFIG_SYSCTL
|
||||||
extern int net_sysctl_init(void);
|
int net_sysctl_init(void);
|
||||||
extern struct ctl_table_header *register_net_sysctl(struct net *net,
|
struct ctl_table_header *register_net_sysctl(struct net *net, const char *path,
|
||||||
const char *path, struct ctl_table *table);
|
struct ctl_table *table);
|
||||||
extern void unregister_net_sysctl_table(struct ctl_table_header *header);
|
void unregister_net_sysctl_table(struct ctl_table_header *header);
|
||||||
#else
|
#else
|
||||||
static inline int net_sysctl_init(void) { return 0; }
|
static inline int net_sysctl_init(void) { return 0; }
|
||||||
static inline struct ctl_table_header *register_net_sysctl(struct net *net,
|
static inline struct ctl_table_header *register_net_sysctl(struct net *net,
|
||||||
|
Loading…
Reference in New Issue
Block a user