]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NET] DCCP: Fix whitespace errors.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Fri, 9 Feb 2007 14:24:38 +0000 (23:24 +0900)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 11 Feb 2007 07:19:27 +0000 (23:19 -0800)
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 files changed:
net/dccp/ccids/ccid2.c
net/dccp/ccids/ccid3.c
net/dccp/ccids/lib/packet_history.h
net/dccp/ccids/lib/tfrc_equation.c
net/dccp/dccp.h
net/dccp/feat.c
net/dccp/feat.h
net/dccp/input.c
net/dccp/ipv4.c
net/dccp/ipv6.c
net/dccp/options.c
net/dccp/output.c
net/dccp/proto.c
net/dccp/timer.c

index fd38b05d6f79ec146edda973d2a307653a0c01f8..248d20f4c7c4edb45d94715b244331b760e77775 100644 (file)
@@ -139,7 +139,7 @@ static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
                return 0;
        }
 
-        hctx = ccid2_hc_tx_sk(sk);
+       hctx = ccid2_hc_tx_sk(sk);
 
        ccid2_pr_debug("pipe=%d cwnd=%d\n", hctx->ccid2hctx_pipe,
                       hctx->ccid2hctx_cwnd);
@@ -368,13 +368,13 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)
 static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset,
                           unsigned char **vec, unsigned char *veclen)
 {
-        const struct dccp_hdr *dh = dccp_hdr(skb);
-        unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb);
-        unsigned char *opt_ptr;
-        const unsigned char *opt_end = (unsigned char *)dh +
-                                        (dh->dccph_doff * 4);
-        unsigned char opt, len;
-        unsigned char *value;
+       const struct dccp_hdr *dh = dccp_hdr(skb);
+       unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb);
+       unsigned char *opt_ptr;
+       const unsigned char *opt_end = (unsigned char *)dh +
+                                       (dh->dccph_doff * 4);
+       unsigned char opt, len;
+       unsigned char *value;
 
        BUG_ON(offset < 0);
        options += offset;
@@ -383,29 +383,29 @@ static int ccid2_ackvector(struct sock *sk, struct sk_buff *skb, int offset,
                return -1;
 
        while (opt_ptr != opt_end) {
-                opt   = *opt_ptr++;
-                len   = 0;
-                value = NULL;
-
-                /* Check if this isn't a single byte option */
-                if (opt > DCCPO_MAX_RESERVED) {
-                        if (opt_ptr == opt_end)
-                                goto out_invalid_option;
-
-                        len = *opt_ptr++;
-                        if (len < 3)
-                                goto out_invalid_option;
-                        /*
-                         * Remove the type and len fields, leaving
-                         * just the value size
-                         */
-                        len     -= 2;
-                        value   = opt_ptr;
-                        opt_ptr += len;
-
-                        if (opt_ptr > opt_end)
-                                goto out_invalid_option;
-                }
+               opt   = *opt_ptr++;
+               len   = 0;
+               value = NULL;
+
+               /* Check if this isn't a single byte option */
+               if (opt > DCCPO_MAX_RESERVED) {
+                       if (opt_ptr == opt_end)
+                               goto out_invalid_option;
+
+                       len = *opt_ptr++;
+                       if (len < 3)
+                               goto out_invalid_option;
+                       /*
+                        * Remove the type and len fields, leaving
+                        * just the value size
+                        */
+                       len     -= 2;
+                       value   = opt_ptr;
+                       opt_ptr += len;
+
+                       if (opt_ptr > opt_end)
+                               goto out_invalid_option;
+               }
 
                switch (opt) {
                case DCCPO_ACK_VECTOR_0:
@@ -432,7 +432,7 @@ static void ccid2_hc_tx_kill_rto_timer(struct sock *sk)
 }
 
 static inline void ccid2_new_ack(struct sock *sk,
-                                struct ccid2_seq *seqp,
+                                struct ccid2_seq *seqp,
                                 unsigned int *maxincr)
 {
        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)
 
 static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
 {
-        struct ccid2_hc_tx_sock *hctx = ccid_priv(ccid);
+       struct ccid2_hc_tx_sock *hctx = ccid_priv(ccid);
 
        ccid2_change_cwnd(hctx, 1);
        /* 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)
 
 static void ccid2_hc_tx_exit(struct sock *sk)
 {
-        struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
+       struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
        int i;
 
        ccid2_hc_tx_kill_rto_timer(sk);
index 5c452a3ec4d1521ee60f159735693909c918c27c..5361a4d8e13b54dc8d18ca2ea3fd959745928d06 100644 (file)
@@ -284,7 +284,7 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
 
 restart_timer:
        sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
-                          jiffies + usecs_to_jiffies(t_nfb));
+                          jiffies + usecs_to_jiffies(t_nfb));
 out:
        bh_unlock_sock(sk);
        sock_put(sk);
@@ -319,7 +319,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
        case TFRC_SSTATE_NO_SENT:
                sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
                               (jiffies +
-                               usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
+                               usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
                hctx->ccid3hctx_last_win_count   = 0;
                hctx->ccid3hctx_t_last_win_count = now;
                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)
                        ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK);
                } else {
                        hctx->ccid3hctx_rtt = (9 * hctx->ccid3hctx_rtt +
-                                                  (u32)r_sample) / 10;
+                                                  (u32)r_sample) / 10;
 
                        /* Update sending rate (step 4 of [RFC 3448, 4.3]) */
                        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)
 }
 
 static int ccid3_hc_rx_detect_loss(struct sock *sk,
-                                    struct dccp_rx_hist_entry *packet)
+                                   struct dccp_rx_hist_entry *packet)
 {
        struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
        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)
                       dccp_role(sk), sk, dccp_state_name(sk->sk_state));
 
        p_prev = hcrx->ccid3hcrx_p;
-       
+
        /* Calculate loss event rate */
        if (!list_empty(&hcrx->ccid3hcrx_li_hist)) {
                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,
 {
        const struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
        const void *val;
-       
+
        /* Listen socks doesn't have a private CCID block */
        if (sk->sk_state == DCCP_LISTEN)
                return -EINVAL;
@@ -1183,7 +1183,7 @@ static int ccid3_hc_tx_getsockopt(struct sock *sk, const int optname, int len,
 {
        const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
        const void *val;
-       
+
        /* Listen socks doesn't have a private CCID block */
        if (sk->sk_state == DCCP_LISTEN)
                return -EINVAL;
index 1f960c19ea1bf0ca948403321efd30e09fb98de8..60d00f01539021742a329d212ed0dd84d12c7c7e 100644 (file)
@@ -137,7 +137,7 @@ extern void                 dccp_rx_hist_delete(struct dccp_rx_hist *hist);
 static inline struct dccp_rx_hist_entry *
                        dccp_rx_hist_entry_new(struct dccp_rx_hist *hist,
                                               const struct sock *sk,
-                                              const u32 ndp,
+                                              const u32 ndp,
                                               const struct sk_buff *skb,
                                               const gfp_t prio)
 {
@@ -169,7 +169,7 @@ static inline struct dccp_rx_hist_entry *
 }
 
 extern int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq,
-                                  u8 *ccval);
+                                  u8 *ccval);
 extern struct dccp_rx_hist_entry *
                dccp_rx_hist_find_data_packet(const struct list_head *list);
 
index 90009fd77e158f03e3e1a4002a23be34d0bd7e01..e4e64b76c10ca8335aa71328e6f40cb462239ddf 100644 (file)
@@ -26,7 +26,7 @@
   The following two-column lookup table implements a part of the TCP throughput
   equation from [RFC 3448, sec. 3.1]:
 
-                                    s
+                                    s
   X_calc  =  --------------------------------------------------------------
             R * sqrt(2*b*p/3) + (3 * t_RTO * sqrt(3*b*p/8) * (p + 32*p^3))
 
@@ -35,7 +35,7 @@
        s      is the packet size in bytes
        R      is the round trip time in seconds
        p      is the loss event rate, between 0 and 1.0, of the number of loss
-                     events as a fraction of the number of packets transmitted
+                     events as a fraction of the number of packets transmitted
        t_RTO  is the TCP retransmission timeout value in seconds
        b      is the number of packets acknowledged by a single TCP ACK
 
@@ -47,9 +47,9 @@
 
   which we can break down into:
 
-                      s
+                     s
        X_calc  =  ---------
-                   R * f(p)
+                   R * f(p)
 
   where f(p) is given for 0 < p <= 1 by:
 
@@ -62,7 +62,7 @@
     * the return result f(p)
   The lookup table therefore actually tabulates the following function g(q):
 
-       g(q)  =  1000000 * f(q/1000000)
+       g(q)  =  1000000 * f(q/1000000)
 
   Hence, when p <= 1, q must be less than or equal to 1000000. To achieve finer
   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)
        if (R == 0) {                   /* possible  divide by zero */
                DCCP_CRIT("WARNING: RTT is 0, returning maximum X_calc.");
                return ~0U;
-       }
+       }
 
        if (p <= TFRC_CALC_X_SPLIT)             {     /* 0.0000 < p <= 0.05   */
                if (p < TFRC_SMALLEST_P) {            /* 0.0000 < p <  0.0001 */
@@ -638,7 +638,7 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p)
                } else                                /* 0.0001 <= p <= 0.05  */
                        index =  p/TFRC_SMALLEST_P - 1;
 
-               f = tfrc_calc_x_lookup[index][1];
+               f = tfrc_calc_x_lookup[index][1];
 
        } else {                                      /* 0.05   <  p <= 1.00  */
                index = p/(1000000/TFRC_CALC_X_ARRSIZE) - 1;
@@ -687,8 +687,8 @@ u32 tfrc_calc_x_reverse_lookup(u32 fvalue)
        if (fvalue <= tfrc_calc_x_lookup[TFRC_CALC_X_ARRSIZE - 1][1]) {
                index = tfrc_binsearch(fvalue, 1);
                return (index + 1) * TFRC_CALC_X_SPLIT / TFRC_CALC_X_ARRSIZE;
-       }
+       }
+
        /* else ... it must be in the coarse-grained column */
        index = tfrc_binsearch(fvalue, 0);
        return (index + 1) * 1000000 / TFRC_CALC_X_ARRSIZE;
index a0900bf98e6bbaf223f6cc3a02b500772ecc1781..e33a9edb40363ef7c964de7de3eb55c0c81d7846 100644 (file)
@@ -22,7 +22,7 @@
  *     DCCP - specific warning and debugging macros.
  */
 #define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt,       \
-                                                       __FUNCTION__, ##a)
+                                                       __FUNCTION__, ##a)
 #define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
                                         __FILE__, __LINE__, __FUNCTION__)
 #define DCCP_BUG(a...)       do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
@@ -34,7 +34,7 @@
 #ifdef MODULE
 #define DCCP_PRINTK(enable, fmt, args...)      do { if (enable)             \
                                                        printk(fmt, ##args); \
-                                               } while(0)
+                                               } while(0)
 #else
 #define DCCP_PRINTK(enable, fmt, args...)      printk(fmt, ##args)
 #endif
@@ -128,7 +128,7 @@ enum {
        DCCP_MIB_ACTIVEOPENS,                   /* ActiveOpens */
        DCCP_MIB_ESTABRESETS,                   /* EstabResets */
        DCCP_MIB_CURRESTAB,                     /* CurrEstab */
-       DCCP_MIB_OUTSEGS,                       /* OutSegs */ 
+       DCCP_MIB_OUTSEGS,                       /* OutSegs */
        DCCP_MIB_OUTRSTS,
        DCCP_MIB_ABORTONTIMEOUT,
        DCCP_MIB_TIMEOUTS,
@@ -372,7 +372,7 @@ static inline void dccp_update_gss(struct sock *sk, u64 seq)
                       (dp->dccps_gss -
                        dccp_msk(sk)->dccpms_sequence_window + 1));
 }
-                               
+
 static inline int dccp_ack_pending(const struct sock *sk)
 {
        const struct dccp_sock *dp = dccp_sk(sk);
index 95b6927ec6530eef17fab12cc5784d101fa7ded9..cd845df5320dbe6bb74d6ee2dfcbad8244a7723e 100644 (file)
@@ -480,8 +480,8 @@ void dccp_feat_clean(struct dccp_minisock *dmsk)
 
        list_for_each_entry_safe(opt, next, &dmsk->dccpms_pending,
                                 dccpop_node) {
-                BUG_ON(opt->dccpop_val == NULL);
-                kfree(opt->dccpop_val);
+               BUG_ON(opt->dccpop_val == NULL);
+               kfree(opt->dccpop_val);
 
                if (opt->dccpop_sc != NULL) {
                        BUG_ON(opt->dccpop_sc->dccpoc_val == NULL);
@@ -489,8 +489,8 @@ void dccp_feat_clean(struct dccp_minisock *dmsk)
                        kfree(opt->dccpop_sc);
                }
 
-                kfree(opt);
-        }
+               kfree(opt);
+       }
        INIT_LIST_HEAD(&dmsk->dccpms_pending);
 
        list_for_each_entry_safe(opt, next, &dmsk->dccpms_conf, dccpop_node) {
index 2c373ad7edcf297ea2404db9bf9c81d55aaf34c3..177f7dee4d101bf3a5963b0cd61d03cc1c605552 100644 (file)
@@ -30,7 +30,7 @@ static inline int dccp_feat_is_reserved(const u8 feat)
 {
        return (feat > DCCPF_DATA_CHECKSUM &&
                feat < DCCPF_MIN_CCID_SPECIFIC) ||
-               feat == DCCPF_RESERVED;
+               feat == DCCPF_RESERVED;
 }
 
 /* feature negotiation knows only these four option types (RFC 4340, sec. 6) */
index 565bc80557ceb79139ea96c930652def3a56237d..4dee462f00db2c11fab14f709e15d8f6cd97432a 100644 (file)
@@ -91,7 +91,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
                else
                        return -1;
        }
-       
+
        /*
         *   Step 6: Check sequence numbers
         *      Let LSWL = S.SWL and LAWL = S.AWL
@@ -136,7 +136,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
                          (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq,
                          (unsigned long long) dp->dccps_swh,
                          (DCCP_SKB_CB(skb)->dccpd_ack_seq ==
-                               DCCP_PKT_WITHOUT_ACK_SEQ) ? "doesn't exist" : "exists",
+                               DCCP_PKT_WITHOUT_ACK_SEQ) ? "doesn't exist" : "exists",
                          (unsigned long long) lawl,
                          (unsigned long long) DCCP_SKB_CB(skb)->dccpd_ack_seq,
                          (unsigned long long) dp->dccps_awh);
@@ -308,11 +308,11 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
                if (dccp_parse_options(sk, skb))
                        goto out_invalid_packet;
 
-                if (dccp_msk(sk)->dccpms_send_ack_vector &&
-                    dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
-                                    DCCP_SKB_CB(skb)->dccpd_seq,
-                                    DCCP_ACKVEC_STATE_RECEIVED))
-                        goto out_invalid_packet; /* FIXME: change error code */
+               if (dccp_msk(sk)->dccpms_send_ack_vector &&
+                   dccp_ackvec_add(dp->dccps_hc_rx_ackvec, sk,
+                                   DCCP_SKB_CB(skb)->dccpd_seq,
+                                   DCCP_ACKVEC_STATE_RECEIVED))
+                       goto out_invalid_packet; /* FIXME: change error code */
 
                dp->dccps_isr = DCCP_SKB_CB(skb)->dccpd_seq;
                dccp_update_gsr(sk, dp->dccps_isr);
index fa2c982d43095f78022fbbef0f234fd47c489690..4a83978aa660dd9a628bb9134af6bd853de1353d 100644 (file)
@@ -106,7 +106,7 @@ int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
                goto failure;
 
        err = ip_route_newports(&rt, IPPROTO_DCCP, inet->sport, inet->dport,
-                               sk);
+                               sk);
        if (err != 0)
                goto failure;
 
@@ -157,7 +157,7 @@ static inline void dccp_do_pmtu_discovery(struct sock *sk,
        /* We don't check in the destentry if pmtu discovery is forbidden
         * on this route. We just assume that no packet_to_big packets
         * are send back when pmtu discovery is not active.
-        * There is a small race when the user changes this flag in the
+        * There is a small race when the user changes this flag in the
         * route, but I think that's acceptable.
         */
        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,
        struct sk_buff *skb;
 
        /* First, grab a route. */
-       
+
        if (dst == NULL && (dst = inet_csk_route_req(sk, req)) == NULL)
                goto out;
 
index 79140b3e592e40231585357ba045454af64308ee..7f51e8db3967280e7698fb1c916a64c6c4a5b24c 100644 (file)
@@ -734,7 +734,7 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
           looks not very well thought. For now we latch
           options, received in the last packet, enqueued
           by tcp. Feel free to propose better solution.
-                                              --ANK (980728)
+                                              --ANK (980728)
         */
        if (np->rxopt.all)
        /*
index c03ba61eb6da3c37a1bd225a24b566fdd2e89434..ca13f77319940893459e47c23794abe00f61c905 100644 (file)
@@ -242,7 +242,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
                        DCCP_CRIT("DCCP(%p): option %d(len=%d) not "
                                  "implemented, ignoring", sk, opt, len);
                        break;
-               }
+               }
 
                if (opt != DCCPO_MANDATORY)
                        mandatory = 0;
@@ -442,7 +442,7 @@ static int dccp_insert_option_timestamp_echo(struct sock *sk,
 }
 
 static int dccp_insert_feat_opt(struct sk_buff *skb, u8 type, u8 feat,
-                               u8 *val, u8 len)
+                               u8 *val, u8 len)
 {
        u8 *to;
 
index 3435542e96528f5cce06257980e7ee95cc28ccf8..f5c6aca1dfa45557a31ed6f9fe0a9b0d4f109a9f 100644 (file)
@@ -87,7 +87,7 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
                        kfree_skb(skb);
                        return -EPROTO;
                }
-               
+
 
                /* Build DCCP header and checksum it. */
                dh = dccp_zeroed_hdr(skb, dccp_header_size);
@@ -415,7 +415,7 @@ static inline void dccp_connect_init(struct sock *sk)
 
        sk->sk_err = 0;
        sock_reset_flag(sk, SOCK_DONE);
-       
+
        dccp_sync_mss(sk, dst_mtu(dst));
 
        /*
index 48438565d70f8da9b6d7938d22b2d61512582c6f..cf28c53a389a24b49c82ccc21721139bcbf110e1 100644 (file)
@@ -478,7 +478,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname,
                        err = -EINVAL;
                else
                        err = dccp_setsockopt_change(sk, DCCPO_CHANGE_L,
-                                                    (struct dccp_so_feat __user *)
+                                                    (struct dccp_so_feat __user *)
                                                     optval);
                break;
        case DCCP_SOCKOPT_CHANGE_R:
index e5348f369c60a09055e4f7b464d9e3520eb95f35..41ea0f6594c4a5b26e82247cddc3539f90f06001 100644 (file)
@@ -60,7 +60,7 @@ static int dccp_write_timeout(struct sock *sk)
    be far nicer to have all of the black holes fixed rather than fixing
    all of the TCP implementations."
 
-                           Golden words :-).
+                          Golden words :-).
                   */
 
                        dst_negative_advice(&sk->sk_dst_cache);