diff options
author | Joe Perches <joe@perches.com> | 2010-01-26 06:40:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-27 00:15:57 -0500 |
commit | 3356b4d41605f9b0977b0963c65f466eee213fe9 (patch) | |
tree | 1594dabd6b290c66d0777f3868dc1b28b52c7dee /net/atm | |
parent | c39f01d7883f944ae75961cc1a31d348c7970599 (diff) |
net/atm/atm_misc.c: checkpatch cleanups
Moved EXPORT_SYMBOL to follow definition
Add space after commas
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/atm_misc.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c index 02cc7e71efea..fc63526d8695 100644 --- a/net/atm/atm_misc.c +++ b/net/atm/atm_misc.c | |||
@@ -2,37 +2,35 @@ | |||
2 | 2 | ||
3 | /* Written 1995-2000 by Werner Almesberger, EPFL ICA */ | 3 | /* Written 1995-2000 by Werner Almesberger, EPFL ICA */ |
4 | 4 | ||
5 | |||
6 | #include <linux/module.h> | 5 | #include <linux/module.h> |
7 | #include <linux/atm.h> | 6 | #include <linux/atm.h> |
8 | #include <linux/atmdev.h> | 7 | #include <linux/atmdev.h> |
9 | #include <linux/skbuff.h> | 8 | #include <linux/skbuff.h> |
10 | #include <linux/sonet.h> | 9 | #include <linux/sonet.h> |
11 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/errno.h> | ||
12 | #include <asm/atomic.h> | 12 | #include <asm/atomic.h> |
13 | #include <asm/errno.h> | ||
14 | |||
15 | 13 | ||
16 | int atm_charge(struct atm_vcc *vcc,int truesize) | 14 | int atm_charge(struct atm_vcc *vcc, int truesize) |
17 | { | 15 | { |
18 | atm_force_charge(vcc,truesize); | 16 | atm_force_charge(vcc, truesize); |
19 | if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf) | 17 | if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf) |
20 | return 1; | 18 | return 1; |
21 | atm_return(vcc,truesize); | 19 | atm_return(vcc, truesize); |
22 | atomic_inc(&vcc->stats->rx_drop); | 20 | atomic_inc(&vcc->stats->rx_drop); |
23 | return 0; | 21 | return 0; |
24 | } | 22 | } |
23 | EXPORT_SYMBOL(atm_charge); | ||
25 | 24 | ||
26 | 25 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc, int pdu_size, | |
27 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | 26 | gfp_t gfp_flags) |
28 | gfp_t gfp_flags) | ||
29 | { | 27 | { |
30 | struct sock *sk = sk_atm(vcc); | 28 | struct sock *sk = sk_atm(vcc); |
31 | int guess = atm_guess_pdu2truesize(pdu_size); | 29 | int guess = atm_guess_pdu2truesize(pdu_size); |
32 | 30 | ||
33 | atm_force_charge(vcc,guess); | 31 | atm_force_charge(vcc, guess); |
34 | if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) { | 32 | if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) { |
35 | struct sk_buff *skb = alloc_skb(pdu_size,gfp_flags); | 33 | struct sk_buff *skb = alloc_skb(pdu_size, gfp_flags); |
36 | 34 | ||
37 | if (skb) { | 35 | if (skb) { |
38 | atomic_add(skb->truesize-guess, | 36 | atomic_add(skb->truesize-guess, |
@@ -40,10 +38,11 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | |||
40 | return skb; | 38 | return skb; |
41 | } | 39 | } |
42 | } | 40 | } |
43 | atm_return(vcc,guess); | 41 | atm_return(vcc, guess); |
44 | atomic_inc(&vcc->stats->rx_drop); | 42 | atomic_inc(&vcc->stats->rx_drop); |
45 | return NULL; | 43 | return NULL; |
46 | } | 44 | } |
45 | EXPORT_SYMBOL(atm_alloc_charge); | ||
47 | 46 | ||
48 | 47 | ||
49 | /* | 48 | /* |
@@ -73,7 +72,6 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | |||
73 | * else * | 72 | * else * |
74 | */ | 73 | */ |
75 | 74 | ||
76 | |||
77 | int atm_pcr_goal(const struct atm_trafprm *tp) | 75 | int atm_pcr_goal(const struct atm_trafprm *tp) |
78 | { | 76 | { |
79 | if (tp->pcr && tp->pcr != ATM_MAX_PCR) | 77 | if (tp->pcr && tp->pcr != ATM_MAX_PCR) |
@@ -84,26 +82,20 @@ int atm_pcr_goal(const struct atm_trafprm *tp) | |||
84 | return -tp->max_pcr; | 82 | return -tp->max_pcr; |
85 | return 0; | 83 | return 0; |
86 | } | 84 | } |
85 | EXPORT_SYMBOL(atm_pcr_goal); | ||
87 | 86 | ||
88 | 87 | void sonet_copy_stats(struct k_sonet_stats *from, struct sonet_stats *to) | |
89 | void sonet_copy_stats(struct k_sonet_stats *from,struct sonet_stats *to) | ||
90 | { | 88 | { |
91 | #define __HANDLE_ITEM(i) to->i = atomic_read(&from->i) | 89 | #define __HANDLE_ITEM(i) to->i = atomic_read(&from->i) |
92 | __SONET_ITEMS | 90 | __SONET_ITEMS |
93 | #undef __HANDLE_ITEM | 91 | #undef __HANDLE_ITEM |
94 | } | 92 | } |
93 | EXPORT_SYMBOL(sonet_copy_stats); | ||
95 | 94 | ||
96 | 95 | void sonet_subtract_stats(struct k_sonet_stats *from, struct sonet_stats *to) | |
97 | void sonet_subtract_stats(struct k_sonet_stats *from,struct sonet_stats *to) | ||
98 | { | 96 | { |
99 | #define __HANDLE_ITEM(i) atomic_sub(to->i,&from->i) | 97 | #define __HANDLE_ITEM(i) atomic_sub(to->i, &from->i) |
100 | __SONET_ITEMS | 98 | __SONET_ITEMS |
101 | #undef __HANDLE_ITEM | 99 | #undef __HANDLE_ITEM |
102 | } | 100 | } |
103 | |||
104 | |||
105 | EXPORT_SYMBOL(atm_charge); | ||
106 | EXPORT_SYMBOL(atm_alloc_charge); | ||
107 | EXPORT_SYMBOL(atm_pcr_goal); | ||
108 | EXPORT_SYMBOL(sonet_copy_stats); | ||
109 | EXPORT_SYMBOL(sonet_subtract_stats); | 101 | EXPORT_SYMBOL(sonet_subtract_stats); |