Skip to content

Commit 528930b

Browse files
yoshfujiDavid S. Miller
authored andcommitted
[NET] AX25: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f7d5745 commit 528930b

7 files changed

Lines changed: 115 additions & 115 deletions

File tree

‎net/ax25/af_ax25.c‎

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ static void ax25_destroy_timer(unsigned long data)
263263
{
264264
ax25_cb *ax25=(ax25_cb *)data;
265265
struct sock *sk;
266-
266+
267267
sk=ax25->sk;
268-
268+
269269
bh_lock_sock(sk);
270270
sock_hold(sk);
271271
ax25_destroy_socket(ax25);
@@ -369,57 +369,57 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg)
369369
ax25_disconnect(ax25, ENETRESET);
370370
break;
371371

372-
case AX25_WINDOW:
373-
if (ax25->modulus == AX25_MODULUS) {
374-
if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7)
375-
return -EINVAL;
376-
} else {
377-
if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63)
378-
return -EINVAL;
379-
}
380-
ax25->window = ax25_ctl.arg;
381-
break;
382-
383-
case AX25_T1:
372+
case AX25_WINDOW:
373+
if (ax25->modulus == AX25_MODULUS) {
374+
if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7)
375+
return -EINVAL;
376+
} else {
377+
if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63)
378+
return -EINVAL;
379+
}
380+
ax25->window = ax25_ctl.arg;
381+
break;
382+
383+
case AX25_T1:
384384
if (ax25_ctl.arg < 1)
385-
return -EINVAL;
386-
ax25->rtt = (ax25_ctl.arg * HZ) / 2;
387-
ax25->t1 = ax25_ctl.arg * HZ;
388-
break;
389-
390-
case AX25_T2:
391-
if (ax25_ctl.arg < 1)
392-
return -EINVAL;
393-
ax25->t2 = ax25_ctl.arg * HZ;
394-
break;
395-
396-
case AX25_N2:
397-
if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
398385
return -EINVAL;
399-
ax25->n2count = 0;
400-
ax25->n2 = ax25_ctl.arg;
401-
break;
402-
403-
case AX25_T3:
404-
if (ax25_ctl.arg < 0)
405-
return -EINVAL;
406-
ax25->t3 = ax25_ctl.arg * HZ;
407-
break;
408-
409-
case AX25_IDLE:
410-
if (ax25_ctl.arg < 0)
411-
return -EINVAL;
412-
ax25->idle = ax25_ctl.arg * 60 * HZ;
413-
break;
414-
415-
case AX25_PACLEN:
416-
if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535)
417-
return -EINVAL;
418-
ax25->paclen = ax25_ctl.arg;
419-
break;
420-
421-
default:
422-
return -EINVAL;
386+
ax25->rtt = (ax25_ctl.arg * HZ) / 2;
387+
ax25->t1 = ax25_ctl.arg * HZ;
388+
break;
389+
390+
case AX25_T2:
391+
if (ax25_ctl.arg < 1)
392+
return -EINVAL;
393+
ax25->t2 = ax25_ctl.arg * HZ;
394+
break;
395+
396+
case AX25_N2:
397+
if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31)
398+
return -EINVAL;
399+
ax25->n2count = 0;
400+
ax25->n2 = ax25_ctl.arg;
401+
break;
402+
403+
case AX25_T3:
404+
if (ax25_ctl.arg < 0)
405+
return -EINVAL;
406+
ax25->t3 = ax25_ctl.arg * HZ;
407+
break;
408+
409+
case AX25_IDLE:
410+
if (ax25_ctl.arg < 0)
411+
return -EINVAL;
412+
ax25->idle = ax25_ctl.arg * 60 * HZ;
413+
break;
414+
415+
case AX25_PACLEN:
416+
if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535)
417+
return -EINVAL;
418+
ax25->paclen = ax25_ctl.arg;
419+
break;
420+
421+
default:
422+
return -EINVAL;
423423
}
424424

425425
return 0;
@@ -1209,7 +1209,7 @@ static int __must_check ax25_connect(struct socket *sock,
12091209

12101210
if (sk->sk_type == SOCK_SEQPACKET &&
12111211
(ax25t=ax25_find_cb(&ax25->source_addr, &fsa->fsa_ax25.sax25_call, digi,
1212-
ax25->ax25_dev->dev))) {
1212+
ax25->ax25_dev->dev))) {
12131213
kfree(digi);
12141214
err = -EADDRINUSE; /* Already such a connection */
12151215
ax25_cb_put(ax25t);
@@ -1456,7 +1456,7 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
14561456
err = -EMSGSIZE;
14571457
goto out;
14581458
}
1459-
1459+
14601460
if (usax != NULL) {
14611461
if (usax->sax25_family != AF_AX25) {
14621462
err = -EINVAL;
@@ -1470,8 +1470,8 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
14701470
else if (addr_len != sizeof(struct full_sockaddr_ax25)) {
14711471
/* support for old structure may go away some time */
14721472
if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) ||
1473-
(addr_len > sizeof(struct full_sockaddr_ax25))) {
1474-
err = -EINVAL;
1473+
(addr_len > sizeof(struct full_sockaddr_ax25))) {
1474+
err = -EINVAL;
14751475
goto out;
14761476
}
14771477

@@ -1624,7 +1624,7 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
16241624

16251625
/* Now we can treat all alike */
16261626
skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
1627-
flags & MSG_DONTWAIT, &err);
1627+
flags & MSG_DONTWAIT, &err);
16281628
if (skb == NULL)
16291629
goto out;
16301630

@@ -1869,7 +1869,7 @@ static void *ax25_info_next(struct seq_file *seq, void *v, loff_t *pos)
18691869
return hlist_entry( ((struct ax25_cb *)v)->ax25_node.next,
18701870
struct ax25_cb, ax25_node);
18711871
}
1872-
1872+
18731873
static void ax25_info_stop(struct seq_file *seq, void *v)
18741874
{
18751875
spin_unlock_bh(&ax25_list_lock);

‎net/ax25/ax25_addr.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ int ax25cmp(const ax25_address *a, const ax25_address *b)
126126
ct++;
127127
}
128128

129-
if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E)) /* SSID without control bit */
130-
return 0;
129+
if ((a->ax25_call[ct] & 0x1E) == (b->ax25_call[ct] & 0x1E)) /* SSID without control bit */
130+
return 0;
131131

132-
return 2; /* Partial match */
132+
return 2; /* Partial match */
133133
}
134134

135135
EXPORT_SYMBOL(ax25cmp);

‎net/ax25/ax25_ip.c‎

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -55,46 +55,46 @@ int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short
5555
if (type == ETH_P_AX25)
5656
return 0;
5757

58-
/* header is an AX.25 UI frame from us to them */
59-
buff = skb_push(skb, AX25_HEADER_LEN);
60-
*buff++ = 0x00; /* KISS DATA */
58+
/* header is an AX.25 UI frame from us to them */
59+
buff = skb_push(skb, AX25_HEADER_LEN);
60+
*buff++ = 0x00; /* KISS DATA */
6161

6262
if (daddr != NULL)
6363
memcpy(buff, daddr, dev->addr_len); /* Address specified */
6464

65-
buff[6] &= ~AX25_CBIT;
66-
buff[6] &= ~AX25_EBIT;
67-
buff[6] |= AX25_SSSID_SPARE;
68-
buff += AX25_ADDR_LEN;
69-
70-
if (saddr != NULL)
71-
memcpy(buff, saddr, dev->addr_len);
72-
else
73-
memcpy(buff, dev->dev_addr, dev->addr_len);
74-
75-
buff[6] &= ~AX25_CBIT;
76-
buff[6] |= AX25_EBIT;
77-
buff[6] |= AX25_SSSID_SPARE;
78-
buff += AX25_ADDR_LEN;
79-
80-
*buff++ = AX25_UI; /* UI */
81-
82-
/* Append a suitable AX.25 PID */
83-
switch (type) {
84-
case ETH_P_IP:
85-
*buff++ = AX25_P_IP;
86-
break;
87-
case ETH_P_ARP:
88-
*buff++ = AX25_P_ARP;
89-
break;
90-
default:
91-
printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
92-
*buff++ = 0;
93-
break;
94-
}
65+
buff[6] &= ~AX25_CBIT;
66+
buff[6] &= ~AX25_EBIT;
67+
buff[6] |= AX25_SSSID_SPARE;
68+
buff += AX25_ADDR_LEN;
69+
70+
if (saddr != NULL)
71+
memcpy(buff, saddr, dev->addr_len);
72+
else
73+
memcpy(buff, dev->dev_addr, dev->addr_len);
74+
75+
buff[6] &= ~AX25_CBIT;
76+
buff[6] |= AX25_EBIT;
77+
buff[6] |= AX25_SSSID_SPARE;
78+
buff += AX25_ADDR_LEN;
79+
80+
*buff++ = AX25_UI; /* UI */
81+
82+
/* Append a suitable AX.25 PID */
83+
switch (type) {
84+
case ETH_P_IP:
85+
*buff++ = AX25_P_IP;
86+
break;
87+
case ETH_P_ARP:
88+
*buff++ = AX25_P_ARP;
89+
break;
90+
default:
91+
printk(KERN_ERR "AX.25: ax25_hard_header - wrong protocol type 0x%2.2x\n", type);
92+
*buff++ = 0;
93+
break;
94+
}
9595

9696
if (daddr != NULL)
97-
return AX25_HEADER_LEN;
97+
return AX25_HEADER_LEN;
9898

9999
return -AX25_HEADER_LEN; /* Unfinished header */
100100
}
@@ -114,8 +114,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
114114
dst = (ax25_address *)(bp + 1);
115115
src = (ax25_address *)(bp + 8);
116116

117-
if (arp_find(bp + 1, skb))
118-
return 1;
117+
if (arp_find(bp + 1, skb))
118+
return 1;
119119

120120
route = ax25_get_route(dst, NULL);
121121
if (route) {
@@ -127,8 +127,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
127127
if (dev == NULL)
128128
dev = skb->dev;
129129

130-
if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
131-
goto put;
130+
if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
131+
goto put;
132132
}
133133

134134
if (bp[16] == AX25_P_IP) {
@@ -175,8 +175,8 @@ int ax25_rebuild_header(struct sk_buff *skb)
175175
ourskb->nh.raw = ourskb->data;
176176

177177
ax25=ax25_send_frame(
178-
ourskb,
179-
ax25_dev->values[AX25_VALUES_PACLEN],
178+
ourskb,
179+
ax25_dev->values[AX25_VALUES_PACLEN],
180180
&src_c,
181181
&dst_c, digipeat, dev);
182182
if (ax25) {
@@ -186,13 +186,13 @@ int ax25_rebuild_header(struct sk_buff *skb)
186186
}
187187
}
188188

189-
bp[7] &= ~AX25_CBIT;
190-
bp[7] &= ~AX25_EBIT;
191-
bp[7] |= AX25_SSSID_SPARE;
189+
bp[7] &= ~AX25_CBIT;
190+
bp[7] &= ~AX25_EBIT;
191+
bp[7] |= AX25_SSSID_SPARE;
192192

193-
bp[14] &= ~AX25_CBIT;
194-
bp[14] |= AX25_EBIT;
195-
bp[14] |= AX25_SSSID_SPARE;
193+
bp[14] &= ~AX25_CBIT;
194+
bp[14] |= AX25_EBIT;
195+
bp[14] |= AX25_SSSID_SPARE;
196196

197197
skb_pull(skb, AX25_KISS_HEADER_LEN);
198198

@@ -211,7 +211,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
211211
if (route)
212212
ax25_put_route(route);
213213

214-
return 1;
214+
return 1;
215215
}
216216

217217
#else /* INET */

‎net/ax25/ax25_route.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
8787
ax25_rt = ax25_route_list;
8888
while (ax25_rt != NULL) {
8989
if (ax25cmp(&ax25_rt->callsign, &route->dest_addr) == 0 &&
90-
ax25_rt->dev == ax25_dev->dev) {
90+
ax25_rt->dev == ax25_dev->dev) {
9191
kfree(ax25_rt->digipeat);
9292
ax25_rt->digipeat = NULL;
9393
if (route->digi_count != 0) {
@@ -252,8 +252,8 @@ static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos)
252252
{
253253
struct ax25_route *ax25_rt;
254254
int i = 1;
255-
256-
read_lock(&ax25_route_lock);
255+
256+
read_lock(&ax25_route_lock);
257257
if (*pos == 0)
258258
return SEQ_START_TOKEN;
259259

@@ -269,7 +269,7 @@ static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos)
269269
static void *ax25_rt_seq_next(struct seq_file *seq, void *v, loff_t *pos)
270270
{
271271
++*pos;
272-
return (v == SEQ_START_TOKEN) ? ax25_route_list :
272+
return (v == SEQ_START_TOKEN) ? ax25_route_list :
273273
((struct ax25_route *) v)->next;
274274
}
275275

‎net/ax25/ax25_std_timer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
void ax25_std_heartbeat_expiry(ax25_cb *ax25)
3535
{
3636
struct sock *sk=ax25->sk;
37-
37+
3838
if (sk)
3939
bh_lock_sock(sk);
4040

‎net/ax25/ax25_subr.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
5656
*/
5757
if (ax25->va != nr) {
5858
while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
59-
skb = skb_dequeue(&ax25->ack_queue);
59+
skb = skb_dequeue(&ax25->ack_queue);
6060
kfree_skb(skb);
6161
ax25->va = (ax25->va + 1) % ax25->modulus;
6262
}
@@ -65,7 +65,7 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
6565

6666
void ax25_requeue_frames(ax25_cb *ax25)
6767
{
68-
struct sk_buff *skb, *skb_prev = NULL;
68+
struct sk_buff *skb, *skb_prev = NULL;
6969

7070
/*
7171
* Requeue all the un-ack-ed frames on the output queue to be picked

‎net/ax25/ax25_uid.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos)
164164
++*pos;
165165

166166
return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next,
167-
ax25_uid_assoc, uid_node);
167+
ax25_uid_assoc, uid_node);
168168
}
169169

170170
static void ax25_uid_seq_stop(struct seq_file *seq, void *v)

0 commit comments

Comments
 (0)