Skip to content

Commit

Permalink
net/core: EXPORT_SYMBOL cleanups
Browse files Browse the repository at this point in the history
CodingStyle cleanups

EXPORT_SYMBOL should immediately follow the symbol declaration.

Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Jul 12, 2010
1 parent 4bc2f18 commit 9e34a5b
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 53 deletions.
8 changes: 3 additions & 5 deletions net/core/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
return __skb_recv_datagram(sk, flags | (noblock ? MSG_DONTWAIT : 0),
&peeked, err);
}
EXPORT_SYMBOL(skb_recv_datagram);

void skb_free_datagram(struct sock *sk, struct sk_buff *skb)
{
Expand Down Expand Up @@ -288,7 +289,6 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)

return err;
}

EXPORT_SYMBOL(skb_kill_datagram);

/**
Expand Down Expand Up @@ -373,6 +373,7 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset,
fault:
return -EFAULT;
}
EXPORT_SYMBOL(skb_copy_datagram_iovec);

/**
* skb_copy_datagram_const_iovec - Copy a datagram to an iovec.
Expand Down Expand Up @@ -716,6 +717,7 @@ int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
fault:
return -EFAULT;
}
EXPORT_SYMBOL(skb_copy_and_csum_datagram_iovec);

/**
* datagram_poll - generic datagram poll
Expand Down Expand Up @@ -770,8 +772,4 @@ unsigned int datagram_poll(struct file *file, struct socket *sock,

return mask;
}

EXPORT_SYMBOL(datagram_poll);
EXPORT_SYMBOL(skb_copy_and_csum_datagram_iovec);
EXPORT_SYMBOL(skb_copy_datagram_iovec);
EXPORT_SYMBOL(skb_recv_datagram);
5 changes: 2 additions & 3 deletions net/core/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct flow_cache {
};

atomic_t flow_cache_genid = ATOMIC_INIT(0);
EXPORT_SYMBOL(flow_cache_genid);
static struct flow_cache flow_cache_global;
static struct kmem_cache *flow_cachep;

Expand Down Expand Up @@ -291,6 +292,7 @@ flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
local_bh_enable();
return flo;
}
EXPORT_SYMBOL(flow_cache_lookup);

static void flow_cache_flush_tasklet(unsigned long data)
{
Expand Down Expand Up @@ -424,6 +426,3 @@ static int __init flow_cache_init_global(void)
}

module_init(flow_cache_init_global);

EXPORT_SYMBOL(flow_cache_genid);
EXPORT_SYMBOL(flow_cache_lookup);
14 changes: 6 additions & 8 deletions net/core/gen_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type,

return 0;
}
EXPORT_SYMBOL(gnet_stats_start_copy_compat);

/**
* gnet_stats_start_copy_compat - start dumping procedure in compatibility mode
Expand All @@ -93,6 +94,7 @@ gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock,
{
return gnet_stats_start_copy_compat(skb, type, 0, 0, lock, d);
}
EXPORT_SYMBOL(gnet_stats_start_copy);

/**
* gnet_stats_copy_basic - copy basic statistics into statistic TLV
Expand Down Expand Up @@ -123,6 +125,7 @@ gnet_stats_copy_basic(struct gnet_dump *d, struct gnet_stats_basic_packed *b)
}
return 0;
}
EXPORT_SYMBOL(gnet_stats_copy_basic);

/**
* gnet_stats_copy_rate_est - copy rate estimator statistics into statistics TLV
Expand Down Expand Up @@ -154,6 +157,7 @@ gnet_stats_copy_rate_est(struct gnet_dump *d,

return 0;
}
EXPORT_SYMBOL(gnet_stats_copy_rate_est);

/**
* gnet_stats_copy_queue - copy queue statistics into statistics TLV
Expand Down Expand Up @@ -181,6 +185,7 @@ gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q)

return 0;
}
EXPORT_SYMBOL(gnet_stats_copy_queue);

/**
* gnet_stats_copy_app - copy application specific statistics into statistics TLV
Expand Down Expand Up @@ -208,6 +213,7 @@ gnet_stats_copy_app(struct gnet_dump *d, void *st, int len)

return 0;
}
EXPORT_SYMBOL(gnet_stats_copy_app);

/**
* gnet_stats_finish_copy - finish dumping procedure
Expand Down Expand Up @@ -241,12 +247,4 @@ gnet_stats_finish_copy(struct gnet_dump *d)
spin_unlock_bh(d->lock);
return 0;
}


EXPORT_SYMBOL(gnet_stats_start_copy);
EXPORT_SYMBOL(gnet_stats_start_copy_compat);
EXPORT_SYMBOL(gnet_stats_copy_basic);
EXPORT_SYMBOL(gnet_stats_copy_rate_est);
EXPORT_SYMBOL(gnet_stats_copy_queue);
EXPORT_SYMBOL(gnet_stats_copy_app);
EXPORT_SYMBOL(gnet_stats_finish_copy);
9 changes: 4 additions & 5 deletions net/core/iovec.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len)

return 0;
}
EXPORT_SYMBOL(memcpy_toiovec);

/*
* Copy kernel to iovec. Returns -EFAULT on error.
Expand All @@ -120,6 +121,7 @@ int memcpy_toiovecend(const struct iovec *iov, unsigned char *kdata,

return 0;
}
EXPORT_SYMBOL(memcpy_toiovecend);

/*
* Copy iovec to kernel. Returns -EFAULT on error.
Expand All @@ -144,6 +146,7 @@ int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len)

return 0;
}
EXPORT_SYMBOL(memcpy_fromiovec);

/*
* Copy iovec from kernel. Returns -EFAULT on error.
Expand Down Expand Up @@ -172,6 +175,7 @@ int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,

return 0;
}
EXPORT_SYMBOL(memcpy_fromiovecend);

/*
* And now for the all-in-one: copy and checksum from a user iovec
Expand Down Expand Up @@ -256,9 +260,4 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov,
err = -EFAULT;
goto out;
}

EXPORT_SYMBOL(csum_partial_copy_fromiovecend);
EXPORT_SYMBOL(memcpy_fromiovec);
EXPORT_SYMBOL(memcpy_fromiovecend);
EXPORT_SYMBOL(memcpy_toiovec);
EXPORT_SYMBOL(memcpy_toiovecend);
1 change: 0 additions & 1 deletion net/core/link_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,4 @@ void linkwatch_fire_event(struct net_device *dev)

linkwatch_schedule_work(urgent);
}

EXPORT_SYMBOL(linkwatch_fire_event);
3 changes: 1 addition & 2 deletions net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,13 +924,12 @@ int netdev_class_create_file(struct class_attribute *class_attr)
{
return class_create_file(&net_class, class_attr);
}
EXPORT_SYMBOL(netdev_class_create_file);

void netdev_class_remove_file(struct class_attribute *class_attr)
{
class_remove_file(&net_class, class_attr);
}

EXPORT_SYMBOL(netdev_class_create_file);
EXPORT_SYMBOL(netdev_class_remove_file);

int netdev_kobject_init(void)
Expand Down
5 changes: 2 additions & 3 deletions net/core/netevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ int register_netevent_notifier(struct notifier_block *nb)
err = atomic_notifier_chain_register(&netevent_notif_chain, nb);
return err;
}
EXPORT_SYMBOL_GPL(register_netevent_notifier);

/**
* netevent_unregister_notifier - unregister a netevent notifier block
Expand All @@ -50,6 +51,7 @@ int unregister_netevent_notifier(struct notifier_block *nb)
{
return atomic_notifier_chain_unregister(&netevent_notif_chain, nb);
}
EXPORT_SYMBOL_GPL(unregister_netevent_notifier);

/**
* call_netevent_notifiers - call all netevent notifier blocks
Expand All @@ -64,7 +66,4 @@ int call_netevent_notifiers(unsigned long val, void *v)
{
return atomic_notifier_call_chain(&netevent_notif_chain, val, v);
}

EXPORT_SYMBOL_GPL(register_netevent_notifier);
EXPORT_SYMBOL_GPL(unregister_netevent_notifier);
EXPORT_SYMBOL_GPL(call_netevent_notifiers);
19 changes: 9 additions & 10 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ void netpoll_poll_dev(struct net_device *dev)
service_arp_queue(dev->npinfo);

}
EXPORT_SYMBOL(netpoll_poll_dev);

void netpoll_poll(struct netpoll *np)
{
netpoll_poll_dev(np->dev);
}
EXPORT_SYMBOL(netpoll_poll);

static void refill_skbs(void)
{
Expand Down Expand Up @@ -313,6 +315,7 @@ void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
schedule_delayed_work(&npinfo->tx_work,0);
}
}
EXPORT_SYMBOL(netpoll_send_skb);

void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
{
Expand Down Expand Up @@ -374,6 +377,7 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)

netpoll_send_skb(np, skb);
}
EXPORT_SYMBOL(netpoll_send_udp);

static void arp_reply(struct sk_buff *skb)
{
Expand Down Expand Up @@ -600,6 +604,7 @@ void netpoll_print_options(struct netpoll *np)
printk(KERN_INFO "%s: remote ethernet address %pM\n",
np->name, np->remote_mac);
}
EXPORT_SYMBOL(netpoll_print_options);

int netpoll_parse_options(struct netpoll *np, char *opt)
{
Expand Down Expand Up @@ -692,6 +697,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
np->name, cur);
return -1;
}
EXPORT_SYMBOL(netpoll_parse_options);

int __netpoll_setup(struct netpoll *np)
{
Expand Down Expand Up @@ -848,6 +854,7 @@ int netpoll_setup(struct netpoll *np)
dev_put(ndev);
return err;
}
EXPORT_SYMBOL(netpoll_setup);

static int __init netpoll_init(void)
{
Expand Down Expand Up @@ -908,11 +915,13 @@ void netpoll_cleanup(struct netpoll *np)
dev_put(np->dev);
np->dev = NULL;
}
EXPORT_SYMBOL(netpoll_cleanup);

int netpoll_trap(void)
{
return atomic_read(&trapped);
}
EXPORT_SYMBOL(netpoll_trap);

void netpoll_set_trap(int trap)
{
Expand All @@ -921,14 +930,4 @@ void netpoll_set_trap(int trap)
else
atomic_dec(&trapped);
}

EXPORT_SYMBOL(netpoll_send_skb);
EXPORT_SYMBOL(netpoll_set_trap);
EXPORT_SYMBOL(netpoll_trap);
EXPORT_SYMBOL(netpoll_print_options);
EXPORT_SYMBOL(netpoll_parse_options);
EXPORT_SYMBOL(netpoll_setup);
EXPORT_SYMBOL(netpoll_cleanup);
EXPORT_SYMBOL(netpoll_send_udp);
EXPORT_SYMBOL(netpoll_poll_dev);
EXPORT_SYMBOL(netpoll_poll);
2 changes: 1 addition & 1 deletion net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ static size_t rtnl_port_size(const struct net_device *dev)
return port_self_size;
}

static inline size_t if_nlmsg_size(const struct net_device *dev)
static noinline size_t if_nlmsg_size(const struct net_device *dev)
{
return NLMSG_ALIGN(sizeof(struct ifinfomsg))
+ nla_total_size(IFNAMSIZ) /* IFLA_IFNAME */
Expand Down
9 changes: 4 additions & 5 deletions net/core/scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ void __scm_destroy(struct scm_cookie *scm)
}
}
}
EXPORT_SYMBOL(__scm_destroy);

int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p)
{
Expand Down Expand Up @@ -211,6 +212,7 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p)
scm_destroy(p);
return err;
}
EXPORT_SYMBOL(__scm_send);

int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
{
Expand Down Expand Up @@ -249,6 +251,7 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
out:
return err;
}
EXPORT_SYMBOL(put_cmsg);

void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
{
Expand Down Expand Up @@ -318,6 +321,7 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
*/
__scm_destroy(scm);
}
EXPORT_SYMBOL(scm_detach_fds);

struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
{
Expand All @@ -335,9 +339,4 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
}
return new_fpl;
}

EXPORT_SYMBOL(__scm_destroy);
EXPORT_SYMBOL(__scm_send);
EXPORT_SYMBOL(put_cmsg);
EXPORT_SYMBOL(scm_detach_fds);
EXPORT_SYMBOL(scm_fp_dup);
1 change: 0 additions & 1 deletion net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,6 @@ unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)
skb_postpull_rcsum(skb, skb->data, len);
return skb->data += len;
}

EXPORT_SYMBOL_GPL(skb_pull_rcsum);

/**
Expand Down
6 changes: 0 additions & 6 deletions net/core/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ void sk_stream_write_space(struct sock *sk)
rcu_read_unlock();
}
}

EXPORT_SYMBOL(sk_stream_write_space);

/**
Expand Down Expand Up @@ -81,7 +80,6 @@ int sk_stream_wait_connect(struct sock *sk, long *timeo_p)
} while (!done);
return 0;
}

EXPORT_SYMBOL(sk_stream_wait_connect);

/**
Expand Down Expand Up @@ -109,7 +107,6 @@ void sk_stream_wait_close(struct sock *sk, long timeout)
finish_wait(sk_sleep(sk), &wait);
}
}

EXPORT_SYMBOL(sk_stream_wait_close);

/**
Expand Down Expand Up @@ -174,7 +171,6 @@ int sk_stream_wait_memory(struct sock *sk, long *timeo_p)
err = sock_intr_errno(*timeo_p);
goto out;
}

EXPORT_SYMBOL(sk_stream_wait_memory);

int sk_stream_error(struct sock *sk, int flags, int err)
Expand All @@ -185,7 +181,6 @@ int sk_stream_error(struct sock *sk, int flags, int err)
send_sig(SIGPIPE, current, 0);
return err;
}

EXPORT_SYMBOL(sk_stream_error);

void sk_stream_kill_queues(struct sock *sk)
Expand All @@ -210,5 +205,4 @@ void sk_stream_kill_queues(struct sock *sk)
* have gone away, only the net layer knows can touch it.
*/
}

EXPORT_SYMBOL(sk_stream_kill_queues);
Loading

0 comments on commit 9e34a5b

Please sign in to comment.