diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-11-07 02:10:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-07 02:10:50 -0500 |
commit | 5c7f0333584128c745fbda845abbe3a32c22d467 (patch) | |
tree | f3177803eb94aa9cbc1e28b1626cacfa06341cf3 /net/phonet | |
parent | ca62059b7ec7267d1d2cab0791d3ed6d033e0583 (diff) |
phonet: sparse annotations of protocol, remove forward declaration
net/phonet/af_phonet.c:38:36: error: marked inline, but without a definition
net/phonet/pep-gprs.c:63:10: warning: incorrect type in return expression (different base types)
net/phonet/pep-gprs.c:63:10: expected int
net/phonet/pep-gprs.c:63:10: got restricted __be16 [usertype] <noident>
net/phonet/pep-gprs.c:65:10: warning: incorrect type in return expression (different base types)
net/phonet/pep-gprs.c:65:10: expected int
net/phonet/pep-gprs.c:65:10: got restricted __be16 [usertype] <noident>
net/phonet/pep-gprs.c:124:16: warning: incorrect type in assignment (different base types)
net/phonet/pep-gprs.c:124:16: expected restricted __be16 [usertype] protocol
net/phonet/pep-gprs.c:124:16: got unsigned short [unsigned] [usertype] protocol
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet')
-rw-r--r-- | net/phonet/af_phonet.c | 11 | ||||
-rw-r--r-- | net/phonet/pep-gprs.c | 8 |
2 files changed, 9 insertions, 10 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index defeb7a0d502..f400ff168904 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -35,7 +35,11 @@ | |||
35 | 35 | ||
36 | static struct net_proto_family phonet_proto_family; | 36 | static struct net_proto_family phonet_proto_family; |
37 | static struct phonet_protocol *phonet_proto_get(int protocol); | 37 | static struct phonet_protocol *phonet_proto_get(int protocol); |
38 | static inline void phonet_proto_put(struct phonet_protocol *pp); | 38 | |
39 | static inline void phonet_proto_put(struct phonet_protocol *pp) | ||
40 | { | ||
41 | module_put(pp->prot->owner); | ||
42 | } | ||
39 | 43 | ||
40 | /* protocol family functions */ | 44 | /* protocol family functions */ |
41 | 45 | ||
@@ -428,11 +432,6 @@ static struct phonet_protocol *phonet_proto_get(int protocol) | |||
428 | return pp; | 432 | return pp; |
429 | } | 433 | } |
430 | 434 | ||
431 | static inline void phonet_proto_put(struct phonet_protocol *pp) | ||
432 | { | ||
433 | module_put(pp->prot->owner); | ||
434 | } | ||
435 | |||
436 | /* Module registration */ | 435 | /* Module registration */ |
437 | static int __init phonet_init(void) | 436 | static int __init phonet_init(void) |
438 | { | 437 | { |
diff --git a/net/phonet/pep-gprs.c b/net/phonet/pep-gprs.c index 9978afbd9f2a..a4324075355f 100644 --- a/net/phonet/pep-gprs.c +++ b/net/phonet/pep-gprs.c | |||
@@ -49,14 +49,14 @@ struct gprs_dev { | |||
49 | unsigned tx_max; | 49 | unsigned tx_max; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static int gprs_type_trans(struct sk_buff *skb) | 52 | static __be16 gprs_type_trans(struct sk_buff *skb) |
53 | { | 53 | { |
54 | const u8 *pvfc; | 54 | const u8 *pvfc; |
55 | u8 buf; | 55 | u8 buf; |
56 | 56 | ||
57 | pvfc = skb_header_pointer(skb, 0, 1, &buf); | 57 | pvfc = skb_header_pointer(skb, 0, 1, &buf); |
58 | if (!pvfc) | 58 | if (!pvfc) |
59 | return 0; | 59 | return htons(0); |
60 | /* Look at IP version field */ | 60 | /* Look at IP version field */ |
61 | switch (*pvfc >> 4) { | 61 | switch (*pvfc >> 4) { |
62 | case 4: | 62 | case 4: |
@@ -64,7 +64,7 @@ static int gprs_type_trans(struct sk_buff *skb) | |||
64 | case 6: | 64 | case 6: |
65 | return htons(ETH_P_IPV6); | 65 | return htons(ETH_P_IPV6); |
66 | } | 66 | } |
67 | return 0; | 67 | return htons(0); |
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | /* |
@@ -84,7 +84,7 @@ static void gprs_state_change(struct sock *sk) | |||
84 | static int gprs_recv(struct gprs_dev *dev, struct sk_buff *skb) | 84 | static int gprs_recv(struct gprs_dev *dev, struct sk_buff *skb) |
85 | { | 85 | { |
86 | int err = 0; | 86 | int err = 0; |
87 | u16 protocol = gprs_type_trans(skb); | 87 | __be16 protocol = gprs_type_trans(skb); |
88 | 88 | ||
89 | if (!protocol) { | 89 | if (!protocol) { |
90 | err = -EINVAL; | 90 | err = -EINVAL; |