aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee802154/af_ieee802154.c
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2014-07-01 23:31:09 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-07 23:55:22 -0400
commit4710d806fcb825156e0a7b3a81104915c5e90f5d (patch)
treea34530ce364e0a6db136f3509141922e7172993f /net/ieee802154/af_ieee802154.c
parent46c9521fc245d91ff5b14cf246f28cee3f99a670 (diff)
6lowpan: mac802154: fix coding style issues
This patch fixed the coding style issues reported by checkpatch.pl following issues fixed: CHECK: Alignment should match open parenthesis WARNING: line over 80 characters CHECK: Blank lines aren't necessary before a close brace '}' WARNING: networking block comments don't use an empty /* line, use /* Comment... WARNING: Missing a blank line after declarations WARNING: networking block comments start with * on subsequent lines CHECK: braces {} should be used on all arms of this statement Signed-off-by: Varka Bhadram <varkab@cdac.in> Tested-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154/af_ieee802154.c')
-rw-r--r--net/ieee802154/af_ieee802154.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c
index 351d9a94ec2f..29e0de63001b 100644
--- a/net/ieee802154/af_ieee802154.c
+++ b/net/ieee802154/af_ieee802154.c
@@ -40,9 +40,7 @@
40 40
41#include "af802154.h" 41#include "af802154.h"
42 42
43/* 43/* Utility function for families */
44 * Utility function for families
45 */
46struct net_device* 44struct net_device*
47ieee802154_get_dev(struct net *net, const struct ieee802154_addr *addr) 45ieee802154_get_dev(struct net *net, const struct ieee802154_addr *addr)
48{ 46{
@@ -87,8 +85,8 @@ ieee802154_get_dev(struct net *net, const struct ieee802154_addr *addr)
87 rtnl_unlock(); 85 rtnl_unlock();
88 break; 86 break;
89 default: 87 default:
90 pr_warning("Unsupported ieee802154 address type: %d\n", 88 pr_warn("Unsupported ieee802154 address type: %d\n",
91 addr->mode); 89 addr->mode);
92 break; 90 break;
93 } 91 }
94 92
@@ -106,7 +104,7 @@ static int ieee802154_sock_release(struct socket *sock)
106 return 0; 104 return 0;
107} 105}
108static int ieee802154_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 106static int ieee802154_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
109 struct msghdr *msg, size_t len) 107 struct msghdr *msg, size_t len)
110{ 108{
111 struct sock *sk = sock->sk; 109 struct sock *sk = sock->sk;
112 110
@@ -114,7 +112,7 @@ static int ieee802154_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
114} 112}
115 113
116static int ieee802154_sock_bind(struct socket *sock, struct sockaddr *uaddr, 114static int ieee802154_sock_bind(struct socket *sock, struct sockaddr *uaddr,
117 int addr_len) 115 int addr_len)
118{ 116{
119 struct sock *sk = sock->sk; 117 struct sock *sk = sock->sk;
120 118
@@ -125,7 +123,7 @@ static int ieee802154_sock_bind(struct socket *sock, struct sockaddr *uaddr,
125} 123}
126 124
127static int ieee802154_sock_connect(struct socket *sock, struct sockaddr *uaddr, 125static int ieee802154_sock_connect(struct socket *sock, struct sockaddr *uaddr,
128 int addr_len, int flags) 126 int addr_len, int flags)
129{ 127{
130 struct sock *sk = sock->sk; 128 struct sock *sk = sock->sk;
131 129
@@ -139,7 +137,7 @@ static int ieee802154_sock_connect(struct socket *sock, struct sockaddr *uaddr,
139} 137}
140 138
141static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg, 139static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg,
142 unsigned int cmd) 140 unsigned int cmd)
143{ 141{
144 struct ifreq ifr; 142 struct ifreq ifr;
145 int ret = -ENOIOCTLCMD; 143 int ret = -ENOIOCTLCMD;
@@ -167,7 +165,7 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg,
167} 165}
168 166
169static int ieee802154_sock_ioctl(struct socket *sock, unsigned int cmd, 167static int ieee802154_sock_ioctl(struct socket *sock, unsigned int cmd,
170 unsigned long arg) 168 unsigned long arg)
171{ 169{
172 struct sock *sk = sock->sk; 170 struct sock *sk = sock->sk;
173 171
@@ -238,8 +236,7 @@ static const struct proto_ops ieee802154_dgram_ops = {
238}; 236};
239 237
240 238
241/* 239/* Create a socket. Initialise the socket, blank the addresses
242 * Create a socket. Initialise the socket, blank the addresses
243 * set the state. 240 * set the state.
244 */ 241 */
245static int ieee802154_create(struct net *net, struct socket *sock, 242static int ieee802154_create(struct net *net, struct socket *sock,
@@ -301,13 +298,14 @@ static const struct net_proto_family ieee802154_family_ops = {
301}; 298};
302 299
303static int ieee802154_rcv(struct sk_buff *skb, struct net_device *dev, 300static int ieee802154_rcv(struct sk_buff *skb, struct net_device *dev,
304 struct packet_type *pt, struct net_device *orig_dev) 301 struct packet_type *pt, struct net_device *orig_dev)
305{ 302{
306 if (!netif_running(dev)) 303 if (!netif_running(dev))
307 goto drop; 304 goto drop;
308 pr_debug("got frame, type %d, dev %p\n", dev->type, dev); 305 pr_debug("got frame, type %d, dev %p\n", dev->type, dev);
309#ifdef DEBUG 306#ifdef DEBUG
310 print_hex_dump_bytes("ieee802154_rcv ", DUMP_PREFIX_NONE, skb->data, skb->len); 307 print_hex_dump_bytes("ieee802154_rcv ",
308 DUMP_PREFIX_NONE, skb->data, skb->len);
311#endif 309#endif
312 310
313 if (!net_eq(dev_net(dev), &init_net)) 311 if (!net_eq(dev_net(dev), &init_net))