Skip to content

Commit c9eaf17

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

14 files changed

Lines changed: 78 additions & 78 deletions

File tree

‎net/dccp/ccids/ccid2.c‎

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
139139
return 0;
140140
}
141141

142-
hctx = ccid2_hc_tx_sk(sk);
142+
hctx = ccid2_hc_tx_sk(sk);
143143

144144
ccid2_pr_debug("pipe=%d cwnd=%d\n", hctx->ccid2hctx_pipe,
145145
hctx->ccid2hctx_cwnd);
@@ -368,13 +368,13 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)
368368
static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset,
369369
unsigned char **vec, unsigned char *veclen)
370370
{
371-
const struct dccp_hdr *dh = dccp_hdr(skb);
372-
unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb);
373-
unsigned char *opt_ptr;
374-
const unsigned char *opt_end = (unsigned char *)dh +
375-
(dh->dccph_doff * 4);
376-
unsigned char opt, len;
377-
unsigned char *value;
371+
const struct dccp_hdr *dh = dccp_hdr(skb);
372+
unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb);
373+
unsigned char *opt_ptr;
374+
const unsigned char *opt_end = (unsigned char *)dh +
375+
(dh->dccph_doff * 4);
376+
unsigned char opt, len;
377+
unsigned char *value;
378378

379379
BUG_ON(offset < 0);
380380
options += offset;
@@ -383,29 +383,29 @@ static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset,
383383
return -1;
384384

385385
while (opt_ptr != opt_end) {
386-
opt = *opt_ptr++;
387-
len = 0;
388-
value = NULL;
389-
390-
/* Check if this isn't a single byte option */
391-
if (opt > DCCPO_MAX_RESERVED) {
392-
if (opt_ptr == opt_end)
393-
goto out_invalid_option;
394-
395-
len = *opt_ptr++;
396-
if (len < 3)
397-
goto out_invalid_option;
398-
/*
399-
* Remove the type and len fields, leaving
400-
* just the value size
401-
*/
402-
len -= 2;
403-
value = opt_ptr;
404-
opt_ptr += len;
405-
406-
if (opt_ptr > opt_end)
407-
goto out_invalid_option;
408-
}
386+
opt = *opt_ptr++;
387+
len = 0;
388+
value = NULL;
389+
390+
/* Check if this isn't a single byte option */
391+
if (opt > DCCPO_MAX_RESERVED) {
392+
if (opt_ptr == opt_end)
393+
goto out_invalid_option;
394+
395+
len = *opt_ptr++;
396+
if (len < 3)
397+
goto out_invalid_option;
398+
/*
399+
* Remove the type and len fields, leaving
400+
* just the value size
401+
*/
402+
len -= 2;
403+
value = opt_ptr;
404+
opt_ptr += len;
405+
406+
if (opt_ptr > opt_end)
407+
goto out_invalid_option;
408+
}
409409

410410
switch (opt) {
411411
case DCCPO_ACK_VECTOR_0:
@@ -432,7 +432,7 @@ static void ccid2_hc_tx_kill_rto_timer(struct sock *sk)
432432
}
433433

434434
static inline void ccid2_new_ack(struct sock *sk,
435-
struct ccid2_seq *seqp,
435+
struct ccid2_seq *seqp,
436436
unsigned int *maxincr)
437437
{
438438
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
@@ -759,7 +759,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
759759

760760
static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
761761
{
762-
struct ccid2_hc_tx_sock *hctx = ccid_priv(ccid);
762+
struct ccid2_hc_tx_sock *hctx = ccid_priv(ccid);
763763

764764
ccid2_change_cwnd(hctx, 1);
765765
/* Initialize ssthresh to infinity. This means that we will exit the
@@ -793,7 +793,7 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
793793

794794
static void ccid2_hc_tx_exit(struct sock *sk)
795795
{
796-
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
796+
struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
797797
int i;
798798

799799
ccid2_hc_tx_kill_rto_timer(sk);

‎net/dccp/ccids/ccid3.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
284284

285285
restart_timer:
286286
sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
287-
jiffies + usecs_to_jiffies(t_nfb));
287+
jiffies + usecs_to_jiffies(t_nfb));
288288
out:
289289
bh_unlock_sock(sk);
290290
sock_put(sk);
@@ -319,7 +319,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
319319
case TFRC_SSTATE_NO_SENT:
320320
sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
321321
(jiffies +
322-
usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
322+
usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
323323
hctx->ccid3hctx_last_win_count = 0;
324324
hctx->ccid3hctx_t_last_win_count = now;
325325
ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
@@ -487,7 +487,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
487487
ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK);
488488
} else {
489489
hctx->ccid3hctx_rtt = (9 * hctx->ccid3hctx_rtt +
490-
(u32)r_sample) / 10;
490+
(u32)r_sample) / 10;
491491

492492
/* Update sending rate (step 4 of [RFC 3448, 4.3]) */
493493
if (hctx->ccid3hctx_p > 0)
@@ -924,7 +924,7 @@ static void ccid3_hc_rx_update_li(struct sock *sk, u64 seq_loss, u8 win_loss)
924924
}
925925

926926
static int ccid3_hc_rx_detect_loss(struct sock *sk,
927-
struct dccp_rx_hist_entry *packet)
927+
struct dccp_rx_hist_entry *packet)
928928
{
929929
struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
930930
struct dccp_rx_hist_entry *rx_hist =
@@ -1074,7 +1074,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
10741074
dccp_role(sk), sk, dccp_state_name(sk->sk_state));
10751075

10761076
p_prev = hcrx->ccid3hcrx_p;
1077-
1077+
10781078
/* Calculate loss event rate */
10791079
if (!list_empty(&hcrx->ccid3hcrx_li_hist)) {
10801080
u32 i_mean = dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist);
@@ -1156,7 +1156,7 @@ static int ccid3_hc_rx_getsockopt(struct sock *sk, const int optname, int len,
11561156
{
11571157
const struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
11581158
const void *val;
1159-
1159+
11601160
/* Listen socks doesn't have a private CCID block */
11611161
if (sk->sk_state == DCCP_LISTEN)
11621162
return -EINVAL;
@@ -1183,7 +1183,7 @@ static int ccid3_hc_tx_getsockopt(struct sock *sk, const int optname, int len,
11831183
{
11841184
const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
11851185
const void *val;
1186-
1186+
11871187
/* Listen socks doesn't have a private CCID block */
11881188
if (sk->sk_state == DCCP_LISTEN)
11891189
return -EINVAL;

‎net/dccp/ccids/lib/packet_history.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ extern void dccp_rx_hist_delete(struct dccp_rx_hist *hist);
137137
static inline struct dccp_rx_hist_entry *
138138
dccp_rx_hist_entry_new(struct dccp_rx_hist *hist,
139139
const struct sock *sk,
140-
const u32 ndp,
140+
const u32 ndp,
141141
const struct sk_buff *skb,
142142
const gfp_t prio)
143143
{
@@ -169,7 +169,7 @@ static inline struct dccp_rx_hist_entry *
169169
}
170170

171171
extern int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq,
172-
u8 *ccval);
172+
u8 *ccval);
173173
extern struct dccp_rx_hist_entry *
174174
dccp_rx_hist_find_data_packet(const struct list_head *list);
175175

‎net/dccp/ccids/lib/tfrc_equation.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
The following two-column lookup table implements a part of the TCP throughput
2727
equation from [RFC 3448, sec. 3.1]:
2828
29-
s
29+
s
3030
X_calc = --------------------------------------------------------------
3131
R * sqrt(2*b*p/3) + (3 * t_RTO * sqrt(3*b*p/8) * (p + 32*p^3))
3232
@@ -35,7 +35,7 @@
3535
s is the packet size in bytes
3636
R is the round trip time in seconds
3737
p is the loss event rate, between 0 and 1.0, of the number of loss
38-
events as a fraction of the number of packets transmitted
38+
events as a fraction of the number of packets transmitted
3939
t_RTO is the TCP retransmission timeout value in seconds
4040
b is the number of packets acknowledged by a single TCP ACK
4141
@@ -47,9 +47,9 @@
4747
4848
which we can break down into:
4949
50-
s
50+
s
5151
X_calc = ---------
52-
R * f(p)
52+
R * f(p)
5353
5454
where f(p) is given for 0 < p <= 1 by:
5555
@@ -62,7 +62,7 @@
6262
* the return result f(p)
6363
The lookup table therefore actually tabulates the following function g(q):
6464
65-
g(q) = 1000000 * f(q/1000000)
65+
g(q) = 1000000 * f(q/1000000)
6666
6767
Hence, when p <= 1, q must be less than or equal to 1000000. To achieve finer
6868
granularity for the practically more relevant case of small values of p (up to
@@ -628,7 +628,7 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p)
628628
if (R == 0) { /* possible divide by zero */
629629
DCCP_CRIT("WARNING: RTT is 0, returning maximum X_calc.");
630630
return ~0U;
631-
}
631+
}
632632

633633
if (p <= TFRC_CALC_X_SPLIT) { /* 0.0000 < p <= 0.05 */
634634
if (p < TFRC_SMALLEST_P) { /* 0.0000 < p < 0.0001 */
@@ -638,7 +638,7 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p)
638638
} else /* 0.0001 <= p <= 0.05 */
639639
index = p/TFRC_SMALLEST_P - 1;
640640

641-
f = tfrc_calc_x_lookup[index][1];
641+
f = tfrc_calc_x_lookup[index][1];
642642

643643
} else { /* 0.05 < p <= 1.00 */
644644
index = p/(1000000/TFRC_CALC_X_ARRSIZE) - 1;
@@ -687,8 +687,8 @@ u32 tfrc_calc_x_reverse_lookup(u32 fvalue)
687687
if (fvalue <= tfrc_calc_x_lookup[TFRC_CALC_X_ARRSIZE - 1][1]) {
688688
index = tfrc_binsearch(fvalue, 1);
689689
return (index + 1) * TFRC_CALC_X_SPLIT / TFRC_CALC_X_ARRSIZE;
690-
}
691-
690+
}
691+
692692
/* else ... it must be in the coarse-grained column */
693693
index = tfrc_binsearch(fvalue, 0);
694694
return (index + 1) * 1000000 / TFRC_CALC_X_ARRSIZE;

‎net/dccp/dccp.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* DCCP - specific warning and debugging macros.
2323
*/
2424
#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \
25-
__FUNCTION__, ##a)
25+
__FUNCTION__, ##a)
2626
#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
2727
__FILE__, __LINE__, __FUNCTION__)
2828
#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
@@ -34,7 +34,7 @@
3434
#ifdef MODULE
3535
#define DCCP_PRINTK(enable, fmt, args...) do { if (enable) \
3636
printk(fmt, ##args); \
37-
} while(0)
37+
} while(0)
3838
#else
3939
#define DCCP_PRINTK(enable, fmt, args...) printk(fmt, ##args)
4040
#endif
@@ -128,7 +128,7 @@ enum {
128128
DCCP_MIB_ACTIVEOPENS, /* ActiveOpens */
129129
DCCP_MIB_ESTABRESETS, /* EstabResets */
130130
DCCP_MIB_CURRESTAB, /* CurrEstab */
131-
DCCP_MIB_OUTSEGS, /* OutSegs */
131+
DCCP_MIB_OUTSEGS, /* OutSegs */
132132
DCCP_MIB_OUTRSTS,
133133
DCCP_MIB_ABORTONTIMEOUT,
134134
DCCP_MIB_TIMEOUTS,
@@ -372,7 +372,7 @@ static inline void dccp_update_gss(struct sock *sk, u64 seq)
372372
(dp->dccps_gss -
373373
dccp_msk(sk)->dccpms_sequence_window + 1));
374374
}
375-
375+
376376
static inline int dccp_ack_pending(const struct sock *sk)
377377
{
378378
const struct dccp_sock *dp = dccp_sk(sk);

‎net/dccp/feat.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,17 +480,17 @@ void dccp_feat_clean(struct dccp_minisock *dmsk)
480480

481481
list_for_each_entry_safe(opt, next, &dmsk->dccpms_pending,
482482
dccpop_node) {
483-
BUG_ON(opt->dccpop_val == NULL);
484-
kfree(opt->dccpop_val);
483+
BUG_ON(opt->dccpop_val == NULL);
484+
kfree(opt->dccpop_val);
485485

486486
if (opt->dccpop_sc != NULL) {
487487
BUG_ON(opt->dccpop_sc->dccpoc_val == NULL);
488488
kfree(opt->dccpop_sc->dccpoc_val);
489489
kfree(opt->dccpop_sc);
490490
}
491491

492-
kfree(opt);
493-
}
492+
kfree(opt);
493+
}
494494
INIT_LIST_HEAD(&dmsk->dccpms_pending);
495495

496496
list_for_each_entry_safe(opt, next, &dmsk->dccpms_conf, dccpop_node) {

‎net/dccp/feat.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static inline int dccp_feat_is_reserved(const u8 feat)
3030
{
3131
return (feat > DCCPF_DATA_CHECKSUM &&
3232
feat < DCCPF_MIN_CCID_SPECIFIC) ||
33-
feat == DCCPF_RESERVED;
33+
feat == DCCPF_RESERVED;
3434
}
3535

3636
/* feature negotiation knows only these four option types (RFC 4340, sec. 6) */

‎net/dccp/input.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
9191
else
9292
return -1;
9393
}
94-
94+
9595
/*
9696
* Step 6: Check sequence numbers
9797
* Let LSWL = S.SWL and LAWL = S.AWL
@@ -136,7 +136,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
136136
(unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq,
137137
(unsigned long long) dp->dccps_swh,
138138
(DCCP_SKB_CB(skb)->dccpd_ack_seq ==
139-
DCCP_PKT_WITHOUT_ACK_SEQ) ? "doesn't exist" : "exists",
139+
DCCP_PKT_WITHOUT_ACK_SEQ) ? "doesn't exist" : "exists",
140140
(unsigned long long) lawl,
141141
(unsigned long long) DCCP_SKB_CB(skb)->dccpd_ack_seq,
142142
(unsigned long long) dp->dccps_awh);
@@ -308,11 +308,11 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
308308
if (dccp_parse_options(sk, skb))
309309
goto out_invalid_packet;
310310

311-
if (dccp_msk(sk)->dccpms_send_ack_vector &&
312-
dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
313-
DCCP_SKB_CB(skb)->dccpd_seq,
314-
DCCP_ACKVEC_STATE_RECEIVED))
315-
goto out_invalid_packet; /* FIXME: change error code */
311+
if (dccp_msk(sk)->dccpms_send_ack_vector &&
312+
dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
313+
DCCP_SKB_CB(skb)->dccpd_seq,
314+
DCCP_ACKVEC_STATE_RECEIVED))
315+
goto out_invalid_packet; /* FIXME: change error code */
316316

317317
dp->dccps_isr = DCCP_SKB_CB(skb)->dccpd_seq;
318318
dccp_update_gsr(sk, dp->dccps_isr);

‎net/dccp/ipv4.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
106106
goto failure;
107107

108108
err = ip_route_newports(&rt, IPPROTO_DCCP, inet->sport, inet->dport,
109-
sk);
109+
sk);
110110
if (err != 0)
111111
goto failure;
112112

@@ -157,7 +157,7 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk,
157157
/* We don't check in the destentry if pmtu discovery is forbidden
158158
* on this route. We just assume that no packet_to_big packets
159159
* are send back when pmtu discovery is not active.
160-
* There is a small race when the user changes this flag in the
160+
* There is a small race when the user changes this flag in the
161161
* route, but I think that's acceptable.
162162
*/
163163
if ((dst = __sk_dst_check(sk, 0)) == NULL)
@@ -486,7 +486,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
486486
struct sk_buff *skb;
487487

488488
/* First, grab a route. */
489-
489+
490490
if (dst == NULL && (dst = inet_csk_route_req(sk, req)) == NULL)
491491
goto out;
492492

‎net/dccp/ipv6.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
734734
looks not very well thought. For now we latch
735735
options, received in the last packet, enqueued
736736
by tcp. Feel free to propose better solution.
737-
--ANK (980728)
737+
--ANK (980728)
738738
*/
739739
if (np->rxopt.all)
740740
/*

0 commit comments

Comments
 (0)