Skip to content

Commit

Permalink
net/ipv4: 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 <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jul 12, 2010
1 parent ba80a25 commit 4bc2f18
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 140 deletions.
18 changes: 7 additions & 11 deletions net/ipv4/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
#include <net/atmclip.h>
struct neigh_table *clip_tbl_hook;
EXPORT_SYMBOL(clip_tbl_hook);
#endif

#include <asm/system.h>
Expand Down Expand Up @@ -169,6 +170,7 @@ const struct neigh_ops arp_broken_ops = {
.hh_output = dev_queue_xmit,
.queue_xmit = dev_queue_xmit,
};
EXPORT_SYMBOL(arp_broken_ops);

struct neigh_table arp_tbl = {
.family = AF_INET,
Expand Down Expand Up @@ -198,6 +200,7 @@ struct neigh_table arp_tbl = {
.gc_thresh2 = 512,
.gc_thresh3 = 1024,
};
EXPORT_SYMBOL(arp_tbl);

int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir)
{
Expand Down Expand Up @@ -499,6 +502,7 @@ int arp_find(unsigned char *haddr, struct sk_buff *skb)
kfree_skb(skb);
return 1;
}
EXPORT_SYMBOL(arp_find);

/* END OF OBSOLETE FUNCTIONS */

Expand Down Expand Up @@ -700,6 +704,7 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
kfree_skb(skb);
return NULL;
}
EXPORT_SYMBOL(arp_create);

/*
* Send an arp packet.
Expand All @@ -709,6 +714,7 @@ void arp_xmit(struct sk_buff *skb)
/* Send it off, maybe filter it using firewalling first. */
NF_HOOK(NFPROTO_ARP, NF_ARP_OUT, skb, NULL, skb->dev, dev_queue_xmit);
}
EXPORT_SYMBOL(arp_xmit);

/*
* Create and send an arp packet.
Expand All @@ -735,6 +741,7 @@ void arp_send(int type, int ptype, __be32 dest_ip,

arp_xmit(skb);
}
EXPORT_SYMBOL(arp_send);

/*
* Process an arp request.
Expand Down Expand Up @@ -1452,14 +1459,3 @@ static int __init arp_proc_init(void)
}

#endif /* CONFIG_PROC_FS */

EXPORT_SYMBOL(arp_broken_ops);
EXPORT_SYMBOL(arp_find);
EXPORT_SYMBOL(arp_create);
EXPORT_SYMBOL(arp_xmit);
EXPORT_SYMBOL(arp_send);
EXPORT_SYMBOL(arp_tbl);

#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
EXPORT_SYMBOL(clip_tbl_hook);
#endif
2 changes: 0 additions & 2 deletions net/ipv4/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,4 @@ int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
sk_dst_set(sk, &rt->dst);
return(0);
}

EXPORT_SYMBOL(ip4_datagram_connect);

7 changes: 3 additions & 4 deletions net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ struct net_device * ip_dev_find(struct net *net, __be32 addr)
fib_res_put(&res);
return dev;
}
EXPORT_SYMBOL(ip_dev_find);

/*
* Find address type as if only "dev" was present in the system. If
Expand Down Expand Up @@ -214,12 +215,14 @@ unsigned int inet_addr_type(struct net *net, __be32 addr)
{
return __inet_dev_addr_type(net, NULL, addr);
}
EXPORT_SYMBOL(inet_addr_type);

unsigned int inet_dev_addr_type(struct net *net, const struct net_device *dev,
__be32 addr)
{
return __inet_dev_addr_type(net, dev, addr);
}
EXPORT_SYMBOL(inet_dev_addr_type);

/* Given (packet source, input interface) and optional (dst, oif, tos):
- (main) check, that source is valid i.e. not broadcast or our local
Expand Down Expand Up @@ -1077,7 +1080,3 @@ void __init ip_fib_init(void)

fib_hash_init();
}

EXPORT_SYMBOL(inet_addr_type);
EXPORT_SYMBOL(inet_dev_addr_type);
EXPORT_SYMBOL(ip_dev_find);
7 changes: 3 additions & 4 deletions net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ const struct icmp_err icmp_err_convert[] = {
.fatal = 1,
},
};
EXPORT_SYMBOL(icmp_err_convert);

/*
* ICMP control array. This specifies what to do with each ICMP.
Expand Down Expand Up @@ -267,6 +268,7 @@ int xrlim_allow(struct dst_entry *dst, int timeout)
dst->rate_tokens = token;
return rc;
}
EXPORT_SYMBOL(xrlim_allow);

static inline int icmpv4_xrlim_allow(struct net *net, struct rtable *rt,
int type, int code)
Expand Down Expand Up @@ -647,6 +649,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
icmp_xmit_unlock(sk);
out:;
}
EXPORT_SYMBOL(icmp_send);


/*
Expand Down Expand Up @@ -1214,7 +1217,3 @@ int __init icmp_init(void)
{
return register_pernet_subsys(&icmp_sk_ops);
}

EXPORT_SYMBOL(icmp_err_convert);
EXPORT_SYMBOL(icmp_send);
EXPORT_SYMBOL(xrlim_allow);
9 changes: 4 additions & 5 deletions net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr)
out:
return;
}
EXPORT_SYMBOL(ip_mc_inc_group);

/*
* Resend IGMP JOIN report; used for bonding.
Expand All @@ -1266,6 +1267,7 @@ void ip_mc_rejoin_group(struct ip_mc_list *im)
igmp_ifc_event(in_dev);
#endif
}
EXPORT_SYMBOL(ip_mc_rejoin_group);

/*
* A socket has left a multicast group on device dev
Expand Down Expand Up @@ -1296,6 +1298,7 @@ void ip_mc_dec_group(struct in_device *in_dev, __be32 addr)
}
}
}
EXPORT_SYMBOL(ip_mc_dec_group);

/* Device changing type */

Expand Down Expand Up @@ -1804,6 +1807,7 @@ int ip_mc_join_group(struct sock *sk , struct ip_mreqn *imr)
rtnl_unlock();
return err;
}
EXPORT_SYMBOL(ip_mc_join_group);

static void ip_sf_socklist_reclaim(struct rcu_head *rp)
{
Expand Down Expand Up @@ -2676,8 +2680,3 @@ int __init igmp_mc_proc_init(void)
return register_pernet_subsys(&igmp_net_ops);
}
#endif

EXPORT_SYMBOL(ip_mc_dec_group);
EXPORT_SYMBOL(ip_mc_inc_group);
EXPORT_SYMBOL(ip_mc_join_group);
EXPORT_SYMBOL(ip_mc_rejoin_group);
19 changes: 1 addition & 18 deletions net/ipv4/inet_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ int inet_csk_bind_conflict(const struct sock *sk,
}
return node != NULL;
}

EXPORT_SYMBOL_GPL(inet_csk_bind_conflict);

/* Obtain a reference to a local port for the given sock,
Expand Down Expand Up @@ -212,7 +211,6 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
local_bh_enable();
return ret;
}

EXPORT_SYMBOL_GPL(inet_csk_get_port);

/*
Expand Down Expand Up @@ -305,7 +303,6 @@ struct sock *inet_csk_accept(struct sock *sk, int flags, int *err)
*err = error;
goto out;
}

EXPORT_SYMBOL(inet_csk_accept);

/*
Expand All @@ -327,7 +324,6 @@ void inet_csk_init_xmit_timers(struct sock *sk,
setup_timer(&sk->sk_timer, keepalive_handler, (unsigned long)sk);
icsk->icsk_pending = icsk->icsk_ack.pending = 0;
}

EXPORT_SYMBOL(inet_csk_init_xmit_timers);

void inet_csk_clear_xmit_timers(struct sock *sk)
Expand All @@ -340,21 +336,18 @@ void inet_csk_clear_xmit_timers(struct sock *sk)
sk_stop_timer(sk, &icsk->icsk_delack_timer);
sk_stop_timer(sk, &sk->sk_timer);
}

EXPORT_SYMBOL(inet_csk_clear_xmit_timers);

void inet_csk_delete_keepalive_timer(struct sock *sk)
{
sk_stop_timer(sk, &sk->sk_timer);
}

EXPORT_SYMBOL(inet_csk_delete_keepalive_timer);

void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long len)
{
sk_reset_timer(sk, &sk->sk_timer, jiffies + len);
}

EXPORT_SYMBOL(inet_csk_reset_keepalive_timer);

struct dst_entry *inet_csk_route_req(struct sock *sk,
Expand Down Expand Up @@ -391,7 +384,6 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES);
return NULL;
}

EXPORT_SYMBOL_GPL(inet_csk_route_req);

static inline u32 inet_synq_hash(const __be32 raddr, const __be16 rport,
Expand Down Expand Up @@ -433,7 +425,6 @@ struct request_sock *inet_csk_search_req(const struct sock *sk,

return req;
}

EXPORT_SYMBOL_GPL(inet_csk_search_req);

void inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req,
Expand All @@ -447,11 +438,11 @@ void inet_csk_reqsk_queue_hash_add(struct sock *sk, struct request_sock *req,
reqsk_queue_hash_req(&icsk->icsk_accept_queue, h, req, timeout);
inet_csk_reqsk_queue_added(sk, timeout);
}
EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_hash_add);

/* Only thing we need from tcp.h */
extern int sysctl_tcp_synack_retries;

EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_hash_add);

/* Decide when to expire the request and when to resend SYN-ACK */
static inline void syn_ack_recalc(struct request_sock *req, const int thresh,
Expand Down Expand Up @@ -569,7 +560,6 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
if (lopt->qlen)
inet_csk_reset_keepalive_timer(parent, interval);
}

EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_prune);

struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req,
Expand Down Expand Up @@ -599,7 +589,6 @@ struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req,
}
return newsk;
}

EXPORT_SYMBOL_GPL(inet_csk_clone);

/*
Expand Down Expand Up @@ -630,7 +619,6 @@ void inet_csk_destroy_sock(struct sock *sk)
percpu_counter_dec(sk->sk_prot->orphan_count);
sock_put(sk);
}

EXPORT_SYMBOL(inet_csk_destroy_sock);

int inet_csk_listen_start(struct sock *sk, const int nr_table_entries)
Expand Down Expand Up @@ -665,7 +653,6 @@ int inet_csk_listen_start(struct sock *sk, const int nr_table_entries)
__reqsk_queue_destroy(&icsk->icsk_accept_queue);
return -EADDRINUSE;
}

EXPORT_SYMBOL_GPL(inet_csk_listen_start);

/*
Expand Down Expand Up @@ -720,7 +707,6 @@ void inet_csk_listen_stop(struct sock *sk)
}
WARN_ON(sk->sk_ack_backlog);
}

EXPORT_SYMBOL_GPL(inet_csk_listen_stop);

void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr)
Expand All @@ -732,7 +718,6 @@ void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr)
sin->sin_addr.s_addr = inet->inet_daddr;
sin->sin_port = inet->inet_dport;
}

EXPORT_SYMBOL_GPL(inet_csk_addr2sockaddr);

#ifdef CONFIG_COMPAT
Expand All @@ -747,7 +732,6 @@ int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname,
return icsk->icsk_af_ops->getsockopt(sk, level, optname,
optval, optlen);
}

EXPORT_SYMBOL_GPL(inet_csk_compat_getsockopt);

int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname,
Expand All @@ -761,6 +745,5 @@ int inet_csk_compat_setsockopt(struct sock *sk, int level, int optname,
return icsk->icsk_af_ops->setsockopt(sk, level, optname,
optval, optlen);
}

EXPORT_SYMBOL_GPL(inet_csk_compat_setsockopt);
#endif
1 change: 0 additions & 1 deletion net/ipv4/inet_fragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ void inet_frag_kill(struct inet_frag_queue *fq, struct inet_frags *f)
fq->last_in |= INET_FRAG_COMPLETE;
}
}

EXPORT_SYMBOL(inet_frag_kill);

static inline void frag_kfree_skb(struct netns_frags *nf, struct inet_frags *f,
Expand Down
4 changes: 0 additions & 4 deletions net/ipv4/inet_hashtables.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ void inet_put_port(struct sock *sk)
__inet_put_port(sk);
local_bh_enable();
}

EXPORT_SYMBOL(inet_put_port);

void __inet_inherit_port(struct sock *sk, struct sock *child)
Expand All @@ -116,7 +115,6 @@ void __inet_inherit_port(struct sock *sk, struct sock *child)
inet_csk(child)->icsk_bind_hash = tb;
spin_unlock(&head->lock);
}

EXPORT_SYMBOL_GPL(__inet_inherit_port);

static inline int compute_score(struct sock *sk, struct net *net,
Expand Down Expand Up @@ -546,7 +544,6 @@ int inet_hash_connect(struct inet_timewait_death_row *death_row,
return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk),
__inet_check_established, __inet_hash_nolisten);
}

EXPORT_SYMBOL_GPL(inet_hash_connect);

void inet_hashinfo_init(struct inet_hashinfo *h)
Expand All @@ -560,5 +557,4 @@ void inet_hashinfo_init(struct inet_hashinfo *h)
i + LISTENING_NULLS_BASE);
}
}

EXPORT_SYMBOL_GPL(inet_hashinfo_init);
3 changes: 1 addition & 2 deletions net/ipv4/ip_fragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ int ip_defrag(struct sk_buff *skb, u32 user)
kfree_skb(skb);
return -ENOMEM;
}
EXPORT_SYMBOL(ip_defrag);

#ifdef CONFIG_SYSCTL
static int zero;
Expand Down Expand Up @@ -785,5 +786,3 @@ void __init ipfrag_init(void)
ip4_frags.secret_interval = 10 * 60 * HZ;
inet_frags_init(&ip4_frags);
}

EXPORT_SYMBOL(ip_defrag);
Loading

0 comments on commit 4bc2f18

Please sign in to comment.