diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
index fd38b05..248d20f 100644
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -139,7 +139,7 @@
 		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 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 @@
 		return -1;
 
 	while (opt_ptr != opt_end) {
-                opt   = *opt_ptr++;
-                len   = 0;
-                value = NULL;
+		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;
+		/* 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;
+			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;
-                }
+			if (opt_ptr > opt_end)
+				goto out_invalid_option;
+		}
 
 		switch (opt) {
 		case DCCPO_ACK_VECTOR_0:
@@ -432,7 +432,7 @@
 }
 
 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 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 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);
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 5c452a3..5361a4d 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -284,7 +284,7 @@
 
 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 @@
 	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 @@
 			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 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 @@
 		       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 @@
 {
 	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 @@
 {
 	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;
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h
index 1f960c1..60d00f0 100644
--- a/net/dccp/ccids/lib/packet_history.h
+++ b/net/dccp/ccids/lib/packet_history.h
@@ -137,7 +137,7 @@
 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 @@
 }
 
 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);
 
diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c
index 90009fd..e4e64b7 100644
--- a/net/dccp/ccids/lib/tfrc_equation.c
+++ b/net/dccp/ccids/lib/tfrc_equation.c
@@ -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 @@
 	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 @@
 		} 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 @@
 	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;
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index a0900bf..e33a9ed 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -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 @@
 	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 @@
 		       (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);
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index 95b6927..cd845df 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -480,8 +480,8 @@
 
 	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 @@
 			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) {
diff --git a/net/dccp/feat.h b/net/dccp/feat.h
index 2c373ad..177f7de 100644
--- a/net/dccp/feat.h
+++ b/net/dccp/feat.h
@@ -30,7 +30,7 @@
 {
 	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) */
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 565bc80..4dee462 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -91,7 +91,7 @@
 		else
 			return -1;
 	}
-	
+
 	/*
 	 *   Step 6: Check sequence numbers
 	 *      Let LSWL = S.SWL and LAWL = S.AWL
@@ -136,7 +136,7 @@
 			  (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 @@
 		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);
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index fa2c982..4a83978 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -106,7 +106,7 @@
 		goto failure;
 
 	err = ip_route_newports(&rt, IPPROTO_DCCP, inet->sport, inet->dport,
-	                        sk);
+				sk);
 	if (err != 0)
 		goto failure;
 
@@ -157,7 +157,7 @@
 	/* 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 @@
 	struct sk_buff *skb;
 
 	/* First, grab a route. */
-	
+
 	if (dst == NULL && (dst = inet_csk_route_req(sk, req)) == NULL)
 		goto out;
 
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 79140b3..7f51e8d 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -734,7 +734,7 @@
 	   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)
 	/*
diff --git a/net/dccp/options.c b/net/dccp/options.c
index c03ba61..ca13f77 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -242,7 +242,7 @@
 			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_feat_opt(struct sk_buff *skb, u8 type, u8 feat,
-			        u8 *val, u8 len)
+				u8 *val, u8 len)
 {
 	u8 *to;
 
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 3435542..f5c6aca 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -87,7 +87,7 @@
 			kfree_skb(skb);
 			return -EPROTO;
 		}
-		
+
 
 		/* Build DCCP header and checksum it. */
 		dh = dccp_zeroed_hdr(skb, dccp_header_size);
@@ -415,7 +415,7 @@
 
 	sk->sk_err = 0;
 	sock_reset_flag(sk, SOCK_DONE);
-	
+
 	dccp_sync_mss(sk, dst_mtu(dst));
 
 	/*
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 4843856..cf28c53 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -478,7 +478,7 @@
 			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:
diff --git a/net/dccp/timer.c b/net/dccp/timer.c
index e5348f3..41ea0f6 100644
--- a/net/dccp/timer.c
+++ b/net/dccp/timer.c
@@ -60,7 +60,7 @@
    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);
