diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
index 469f9a1..95eb47d 100644
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -30,21 +30,26 @@
 	int		(*ccid_hc_tx_init)(struct sock *sk);
 	void		(*ccid_hc_rx_exit)(struct sock *sk);
 	void		(*ccid_hc_tx_exit)(struct sock *sk);
-	void		(*ccid_hc_rx_packet_recv)(struct sock *sk, struct sk_buff *skb);
+	void		(*ccid_hc_rx_packet_recv)(struct sock *sk,
+						  struct sk_buff *skb);
 	int		(*ccid_hc_rx_parse_options)(struct sock *sk,
 						    unsigned char option,
 						    unsigned char len, u16 idx,
 						    unsigned char* value);
-	void		(*ccid_hc_rx_insert_options)(struct sock *sk, struct sk_buff *skb);
-	void		(*ccid_hc_tx_insert_options)(struct sock *sk, struct sk_buff *skb);
-	void		(*ccid_hc_tx_packet_recv)(struct sock *sk, struct sk_buff *skb);
+	void		(*ccid_hc_rx_insert_options)(struct sock *sk,
+						     struct sk_buff *skb);
+	void		(*ccid_hc_tx_insert_options)(struct sock *sk,
+						     struct sk_buff *skb);
+	void		(*ccid_hc_tx_packet_recv)(struct sock *sk,
+						  struct sk_buff *skb);
 	int		(*ccid_hc_tx_parse_options)(struct sock *sk,
 						    unsigned char option,
 						    unsigned char len, u16 idx,
 						    unsigned char* value);
 	int		(*ccid_hc_tx_send_packet)(struct sock *sk,
 						  struct sk_buff *skb, int len);
-	void		(*ccid_hc_tx_packet_sent)(struct sock *sk, int more, int len);
+	void		(*ccid_hc_tx_packet_sent)(struct sock *sk, int more,
+						  int len);
 };
 
 extern int	   ccid_register(struct ccid *ccid);
@@ -123,7 +128,8 @@
 {
 	int rc = 0;
 	if (ccid->ccid_hc_tx_parse_options != NULL)
-		rc = ccid->ccid_hc_tx_parse_options(sk, option, len, idx, value);
+		rc = ccid->ccid_hc_tx_parse_options(sk, option, len, idx,
+						    value);
 	return rc;
 }
 
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 8a0d7af..62e735f 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -25,7 +25,8 @@
 	do { if (dccp_debug) \
 		printk(KERN_DEBUG "%s: " format, __FUNCTION__ , ##a); \
 	} while (0)
-#define dccp_pr_debug_cat(format, a...) do { if (dccp_debug) printk(format, ##a); } while (0)
+#define dccp_pr_debug_cat(format, a...) do { if (dccp_debug) \
+					     printk(format, ##a); } while (0)
 #else
 #define dccp_pr_debug(format, a...)
 #define dccp_pr_debug_cat(format, a...)
@@ -72,7 +73,8 @@
 }
 
 /* is seq2 <= seq1 <= seq3 ? */
-static inline const int between48(const u64 seq1, const u64 seq2, const u64 seq3)
+static inline const int between48(const u64 seq1, const u64 seq2,
+				  const u64 seq3)
 {
 	return (seq3 << 16) - (seq2 << 16) >= (seq1 << 16) - (seq2 << 16);
 }
@@ -107,12 +109,14 @@
 } __SNMP_MIB_ALIGN__;
 
 DECLARE_SNMP_STAT(struct dccp_mib, dccp_statistics);
-#define DCCP_INC_STATS(field)		SNMP_INC_STATS(dccp_statistics, field)
-#define DCCP_INC_STATS_BH(field)	SNMP_INC_STATS_BH(dccp_statistics, field)
-#define DCCP_INC_STATS_USER(field) 	SNMP_INC_STATS_USER(dccp_statistics, field)
-#define DCCP_DEC_STATS(field)		SNMP_DEC_STATS(dccp_statistics, field)
-#define DCCP_ADD_STATS_BH(field, val)	SNMP_ADD_STATS_BH(dccp_statistics, field, val)
-#define DCCP_ADD_STATS_USER(field, val)	SNMP_ADD_STATS_USER(dccp_statistics, field, val)
+#define DCCP_INC_STATS(field)	    SNMP_INC_STATS(dccp_statistics, field)
+#define DCCP_INC_STATS_BH(field)    SNMP_INC_STATS_BH(dccp_statistics, field)
+#define DCCP_INC_STATS_USER(field)  SNMP_INC_STATS_USER(dccp_statistics, field)
+#define DCCP_DEC_STATS(field)	    SNMP_DEC_STATS(dccp_statistics, field)
+#define DCCP_ADD_STATS_BH(field, val) \
+			SNMP_ADD_STATS_BH(dccp_statistics, field, val)
+#define DCCP_ADD_STATS_USER(field, val)	\
+			SNMP_ADD_STATS_USER(dccp_statistics, field, val)
 
 extern int  dccp_transmit_skb(struct sock *sk, struct sk_buff *skb);
 extern int  dccp_retransmit_skb(struct sock *sk, struct sk_buff *skb);
@@ -234,8 +238,8 @@
 extern int	   dccp_getsockopt(struct sock *sk, int level, int optname,
 				   char *optval, int *optlen);
 extern int	   dccp_ioctl(struct sock *sk, int cmd, unsigned long arg);
-extern int	   dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-				size_t size);
+extern int	   dccp_sendmsg(struct kiocb *iocb, struct sock *sk,
+				struct msghdr *msg, size_t size);
 extern int	   dccp_recvmsg(struct kiocb *iocb, struct sock *sk,
 				struct msghdr *msg, size_t len, int nonblock,
 				int flags, int *addr_len);
@@ -246,7 +250,8 @@
 extern int	   dccp_v4_checksum(const struct sk_buff *skb,
 				    const u32 saddr, const u32 daddr);
 
-extern int	   dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code);
+extern int	   dccp_v4_send_reset(struct sock *sk,
+				      enum dccp_reset_codes code);
 extern void	   dccp_send_close(struct sock *sk);
 
 struct dccp_skb_cb {
@@ -303,7 +308,8 @@
 
 static inline void dccp_hdr_set_seq(struct dccp_hdr *dh, const u64 gss)
 {
-	struct dccp_hdr_ext *dhx = (struct dccp_hdr_ext *)((void *)dh + sizeof(*dh));
+	struct dccp_hdr_ext *dhx = (struct dccp_hdr_ext *)((void *)dh +
+							   sizeof(*dh));
 
 #if defined(__LITTLE_ENDIAN_BITFIELD)
 	dh->dccph_seq	   = htonl((gss >> 32)) >> 8;
@@ -315,7 +321,8 @@
 	dhx->dccph_seq_low = htonl(gss & 0xffffffff);
 }
 
-static inline void dccp_hdr_set_ack(struct dccp_hdr_ack_bits *dhack, const u64 gsr)
+static inline void dccp_hdr_set_ack(struct dccp_hdr_ack_bits *dhack,
+				    const u64 gsr)
 {
 #if defined(__LITTLE_ENDIAN_BITFIELD)
 	dhack->dccph_ack_nr_high = htonl((gsr >> 32)) >> 8;
@@ -332,11 +339,14 @@
 	struct dccp_sock *dp = dccp_sk(sk);
 	u64 tmp_gsr;
 
-	dccp_set_seqno(&tmp_gsr, dp->dccps_gsr + 1 - (dp->dccps_options.dccpo_sequence_window / 4));
+	dccp_set_seqno(&tmp_gsr,
+		       (dp->dccps_gsr + 1 -
+		        (dp->dccps_options.dccpo_sequence_window / 4)));
 	dp->dccps_gsr = seq;
 	dccp_set_seqno(&dp->dccps_swl, max48(tmp_gsr, dp->dccps_isr));
 	dccp_set_seqno(&dp->dccps_swh,
-		       dp->dccps_gsr + (3 * dp->dccps_options.dccpo_sequence_window) / 4);
+		       (dp->dccps_gsr +
+			(3 * dp->dccps_options.dccpo_sequence_window) / 4));
 }
 
 static inline void dccp_update_gss(struct sock *sk, u64 seq)
@@ -344,7 +354,9 @@
 	struct dccp_sock *dp = dccp_sk(sk);
 	u64 tmp_gss;
 
-	dccp_set_seqno(&tmp_gss, dp->dccps_gss - dp->dccps_options.dccpo_sequence_window + 1);
+	dccp_set_seqno(&tmp_gss,
+		       (dp->dccps_gss -
+			dp->dccps_options.dccpo_sequence_window + 1));
 	dp->dccps_awl = max48(tmp_gss, dp->dccps_iss);
 	dp->dccps_awh = dp->dccps_gss = seq;
 }
@@ -373,16 +385,20 @@
  *
  * @dccpap_buf_head - circular buffer head
  * @dccpap_buf_tail - circular buffer tail
- * @dccpap_buf_ackno - ack # of the most recent packet acknoldgeable in the buffer (i.e. %dccpap_buf_head)
- * @dccpap_buf_nonce - the one-bit sum of the ECN Nonces on all packets acked by the buffer with State 0
+ * @dccpap_buf_ackno - ack # of the most recent packet acknowledgeable in the
+ * 		       buffer (i.e. %dccpap_buf_head)
+ * @dccpap_buf_nonce - the one-bit sum of the ECN Nonces on all packets acked
+ * 		       by the buffer with State 0
  *
  * Additionally, the HC-Receiver must keep some information about the
  * Ack Vectors it has recently sent. For each packet sent carrying an
  * Ack Vector, it remembers four variables:
  *
- * @dccpap_ack_seqno - the Sequence Number used for the packet (HC-Receiver seqno)
+ * @dccpap_ack_seqno - the Sequence Number used for the packet
+ * 		       (HC-Receiver seqno)
  * @dccpap_ack_ptr - the value of buf_head at the time of acknowledgement.
- * @dccpap_ack_ackno - the Acknowledgement Number used for the packet (HC-Sender seqno)
+ * @dccpap_ack_ackno - the Acknowledgement Number used for the packet
+ * 		       (HC-Sender seqno)
  * @dccpap_ack_nonce - the one-bit sum of the ECN Nonces for all State 0.
  *
  * @dccpap_buf_len - circular buffer length
diff --git a/net/dccp/input.c b/net/dccp/input.c
index bdaecde..4b8638f 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -93,7 +93,8 @@
 	 */
 	if (dh->dccph_type == DCCP_PKT_SYNC || 
 	    dh->dccph_type == DCCP_PKT_SYNCACK) {
-		if (between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, dp->dccps_awl, dp->dccps_awh) &&
+		if (between48(DCCP_SKB_CB(skb)->dccpd_ack_seq,
+			      dp->dccps_awl, dp->dccps_awh) &&
 		    !before48(DCCP_SKB_CB(skb)->dccpd_seq, dp->dccps_swl))
 			dccp_update_gsr(sk, DCCP_SKB_CB(skb)->dccpd_seq);
 		else
@@ -122,11 +123,13 @@
 
 	if (between48(DCCP_SKB_CB(skb)->dccpd_seq, lswl, dp->dccps_swh) &&
 	    (DCCP_SKB_CB(skb)->dccpd_ack_seq == DCCP_PKT_WITHOUT_ACK_SEQ ||
-	     between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, lawl, dp->dccps_awh))) {
+	     between48(DCCP_SKB_CB(skb)->dccpd_ack_seq,
+		       lawl, dp->dccps_awh))) {
 		dccp_update_gsr(sk, DCCP_SKB_CB(skb)->dccpd_seq);
 
 		if (dh->dccph_type != DCCP_PKT_SYNC &&
-		    DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
+		    (DCCP_SKB_CB(skb)->dccpd_ack_seq !=
+		     DCCP_PKT_WITHOUT_ACK_SEQ))
 			dp->dccps_gar = DCCP_SKB_CB(skb)->dccpd_ack_seq;
 	} else {
 		dccp_pr_debug("Step 6 failed, sending SYNC...\n");
@@ -161,10 +164,13 @@
 		if (dccp_ackpkts_add(dp->dccps_hc_rx_ackpkts,
 				     DCCP_SKB_CB(skb)->dccpd_seq,
 				     DCCP_ACKPKTS_STATE_RECEIVED)) {
-			LIMIT_NETDEBUG(KERN_INFO "DCCP: acknowledgeable packets buffer full!\n");
+			LIMIT_NETDEBUG(KERN_INFO "DCCP: acknowledgeable "
+						 "packets buffer full!\n");
 			ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1;
 			inet_csk_schedule_ack(sk);
-			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, TCP_DELACK_MIN, TCP_RTO_MAX);
+			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
+						  TCP_DELACK_MIN,
+						  DCCP_RTO_MAX);
 			goto discard;
 		}
 
@@ -175,7 +181,8 @@
 		 */
 		if (!inet_csk_ack_scheduled(sk)) {
 			inet_csk_schedule_ack(sk);
-			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, 5 * HZ, TCP_RTO_MAX);
+			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, 5 * HZ,
+						  DCCP_RTO_MAX);
 		}
 	}
 
@@ -186,8 +193,8 @@
 	case DCCP_PKT_DATAACK:
 	case DCCP_PKT_DATA:
 		/*
-		 * FIXME: check if sk_receive_queue is full, schedule DATA_DROPPED option
-		 * if it is.
+		 * FIXME: check if sk_receive_queue is full, schedule DATA_DROPPED
+		 * option if it is.
 		 */
 		__skb_pull(skb, dh->dccph_doff * 4);
 		__skb_queue_tail(&sk->sk_receive_queue, skb);
@@ -272,11 +279,13 @@
 		__kfree_skb(sk->sk_send_head);
 		sk->sk_send_head = NULL;
 
-		if (!between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, dp->dccps_awl, dp->dccps_awh)) {
-			dccp_pr_debug("invalid ackno: S.AWL=%llu, P.ackno=%llu, S.AWH=%llu \n",
-				      (unsigned long long) dp->dccps_awl,
-				      (unsigned long long) DCCP_SKB_CB(skb)->dccpd_ack_seq,
-				      (unsigned long long) dp->dccps_awh);
+		if (!between48(DCCP_SKB_CB(skb)->dccpd_ack_seq,
+			       dp->dccps_awl, dp->dccps_awh)) {
+			dccp_pr_debug("invalid ackno: S.AWL=%llu, "
+				      "P.ackno=%llu, S.AWH=%llu \n",
+				      (unsigned long long)dp->dccps_awl,
+			   (unsigned long long)DCCP_SKB_CB(skb)->dccpd_ack_seq,
+				      (unsigned long long)dp->dccps_awh);
 			goto out_invalid_packet;
 		}
 
@@ -296,16 +305,17 @@
 		/*
 		 *    Step 10: Process REQUEST state (second part)
 		 *       If S.state == REQUEST,
-		 *	  / * If we get here, P is a valid Response from the server (see
-		 *	     Step 4), and we should move to PARTOPEN state.  PARTOPEN
-		 *	     means send an Ack, don't send Data packets, retransmit
-		 *	     Acks periodically, and always include any Init Cookie from
-		 *	     the Response * /
+		 *	  / * If we get here, P is a valid Response from the
+		 *	      server (see Step 4), and we should move to
+		 *	      PARTOPEN state. PARTOPEN means send an Ack,
+		 *	      don't send Data packets, retransmit Acks
+		 *	      periodically, and always include any Init Cookie
+		 *	      from the Response * /
 		 *	  S.state := PARTOPEN
 		 *	  Set PARTOPEN timer
 		 * 	  Continue with S.state == PARTOPEN
-		 *	  / * Step 12 will send the Ack completing the three-way
-		 *	     handshake * /
+		 *	  / * Step 12 will send the Ack completing the
+		 *	      three-way handshake * /
 		 */
 		dccp_set_state(sk, DCCP_PARTOPEN);
 
@@ -341,7 +351,8 @@
 
 out_invalid_packet:
 	return 1; /* dccp_v4_do_rcv will send a reset, but...
-		     FIXME: the reset code should be DCCP_RESET_CODE_PACKET_ERROR  */
+		     FIXME: the reset code should be
+			    DCCP_RESET_CODE_PACKET_ERROR */
 }
 
 static int dccp_rcv_respond_partopen_state_process(struct sock *sk,
@@ -358,11 +369,12 @@
 	case DCCP_PKT_DATAACK:
 	case DCCP_PKT_ACK:
 		/*
-		 * FIXME: we should be reseting the PARTOPEN (DELACK) timer here,
-		 * but only if we haven't used the DELACK timer for something else,
-		 * like sending a delayed ack for a TIMESTAMP echo, etc, for now
-		 * were not clearing it, sending an extra ACK when there is nothing
-		 * else to do in DELACK is not a big deal after all.
+		 * FIXME: we should be reseting the PARTOPEN (DELACK) timer
+		 * here but only if we haven't used the DELACK timer for
+		 * something else, like sending a delayed ack for a TIMESTAMP
+		 * echo, etc, for now were not clearing it, sending an extra
+		 * ACK when there is nothing else to do in DELACK is not a big
+		 * deal after all.
 		 */
 
 		/* Stop the PARTOPEN timer */
@@ -374,7 +386,8 @@
 
 		if (dh->dccph_type == DCCP_PKT_DATAACK) {
 			dccp_rcv_established(sk, skb, dh, len);
-			queued = 1; /* packet was queued (by dccp_rcv_established) */
+			queued = 1; /* packet was queued
+				       (by dccp_rcv_established) */
 		}
 		break;
 	}
@@ -399,7 +412,8 @@
 		if (dccp_parse_options(sk, skb))
 			goto discard;
 
-		if (DCCP_SKB_CB(skb)->dccpd_ack_seq != DCCP_PKT_WITHOUT_ACK_SEQ)
+		if (DCCP_SKB_CB(skb)->dccpd_ack_seq !=
+		    DCCP_PKT_WITHOUT_ACK_SEQ)
 			dccp_event_ack_recv(sk, skb);
 
 		ccid_hc_rx_packet_recv(dp->dccps_hc_rx_ccid, sk, skb);
@@ -415,14 +429,17 @@
 					     DCCP_ACKPKTS_STATE_RECEIVED))
 				goto discard;
 			/*
-			 * FIXME: this activation is probably wrong, have to study more
-			 * TCP delack machinery and how it fits into DCCP draft, but
-			 * for now it kinda "works" 8)
+			 * FIXME: this activation is probably wrong, have to
+			 * study more TCP delack machinery and how it fits into
+			 * DCCP draft, but for now it kinda "works" 8)
 			 */
-			if (dp->dccps_hc_rx_ackpkts->dccpap_ack_seqno == DCCP_MAX_SEQNO + 1 &&
+			if ((dp->dccps_hc_rx_ackpkts->dccpap_ack_seqno ==
+			     DCCP_MAX_SEQNO + 1) &&
 			    !inet_csk_ack_scheduled(sk)) {
 				inet_csk_schedule_ack(sk);
-				inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, TCP_DELACK_MIN, TCP_RTO_MAX);
+				inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
+							  TCP_DELACK_MIN,
+							  DCCP_RTO_MAX);
 			}
 		}
 	}
@@ -436,7 +453,10 @@
 	 *		Drop packet and return
 	*/
 	if (dh->dccph_type == DCCP_PKT_RESET) {
-		/* Queue the equivalent of TCP fin so that dccp_recvmsg exits the loop */
+		/*
+		 * Queue the equivalent of TCP fin so that dccp_recvmsg
+		 * exits the loop
+		 */
 		dccp_fin(sk, skb);
 		dccp_time_wait(sk, DCCP_TIME_WAIT, 0);
 		return 0;
@@ -450,10 +470,12 @@
 		 *	  Drop packet and return
 		 */
 	} else if ((dp->dccps_role != DCCP_ROLE_CLIENT &&
-		    (dh->dccph_type == DCCP_PKT_RESPONSE || dh->dccph_type == DCCP_PKT_CLOSEREQ)) ||
+		    (dh->dccph_type == DCCP_PKT_RESPONSE ||
+		     dh->dccph_type == DCCP_PKT_CLOSEREQ)) ||
 		    (dp->dccps_role == DCCP_ROLE_CLIENT &&
 		     dh->dccph_type == DCCP_PKT_REQUEST) ||
-		    (sk->sk_state == DCCP_RESPOND && dh->dccph_type == DCCP_PKT_DATA)) {
+		    (sk->sk_state == DCCP_RESPOND &&
+		     dh->dccph_type == DCCP_PKT_DATA)) {
 		dccp_send_sync(sk, DCCP_SKB_CB(skb)->dccpd_seq);
 		goto discard;
 	}
@@ -491,11 +513,13 @@
 
 	case DCCP_RESPOND:
 	case DCCP_PARTOPEN:
-		queued = dccp_rcv_respond_partopen_state_process(sk, skb, dh, len);
+		queued = dccp_rcv_respond_partopen_state_process(sk, skb,
+								 dh, len);
 		break;
 	}
 
-	if (dh->dccph_type == DCCP_PKT_ACK || dh->dccph_type == DCCP_PKT_DATAACK) {
+	if (dh->dccph_type == DCCP_PKT_ACK ||
+	    dh->dccph_type == DCCP_PKT_DATAACK) {
 		switch (old_state) {
 		case DCCP_PARTOPEN:
 			sk->sk_state_change(sk);
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index d3770ae..42d9c87 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -29,7 +29,7 @@
 struct inet_hashinfo __cacheline_aligned dccp_hashinfo = {
 	.lhash_lock	= RW_LOCK_UNLOCKED,
 	.lhash_users	= ATOMIC_INIT(0),
-	.lhash_wait	= __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.lhash_wait),
+	.lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.lhash_wait),
 	.portalloc_lock	= SPIN_LOCK_UNLOCKED,
 	.port_rover	= 1024 - 1,
 };
@@ -61,7 +61,8 @@
 	const int dif = sk->sk_bound_dev_if;
 	INET_ADDR_COOKIE(acookie, saddr, daddr)
 	const __u32 ports = INET_COMBINED_PORTS(inet->dport, lport);
-	const int hash = inet_ehashfn(daddr, lport, saddr, inet->dport, dccp_hashinfo.ehash_size);
+	const int hash = inet_ehashfn(daddr, lport, saddr, inet->dport,
+				      dccp_hashinfo.ehash_size);
 	struct inet_ehash_bucket *head = &dccp_hashinfo.ehash[hash];
 	const struct sock *sk2;
 	const struct hlist_node *node;
@@ -133,11 +134,12 @@
  		local_bh_disable();
 
  		/* TODO. Actually it is not so bad idea to remove
- 		 * dccp_hashinfo.portalloc_lock before next submission to Linus.
+ 		 * dccp_hashinfo.portalloc_lock before next submission to
+		 * Linus.
  		 * As soon as we touch this place at all it is time to think.
  		 *
- 		 * Now it protects single _advisory_ variable dccp_hashinfo.port_rover,
- 		 * hence it is mostly useless.
+ 		 * Now it protects single _advisory_ variable
+		 * dccp_hashinfo.port_rover, hence it is mostly useless.
  		 * Code will work nicely if we just delete it, but
  		 * I am afraid in contented case it will work not better or
  		 * even worse: another cpu just will hit the same bucket
@@ -152,7 +154,8 @@
  			rover++;
  			if ((rover < low) || (rover > high))
  				rover = low;
- 			head = &dccp_hashinfo.bhash[inet_bhashfn(rover, dccp_hashinfo.bhash_size)];
+ 			head = &dccp_hashinfo.bhash[inet_bhashfn(rover,
+						    dccp_hashinfo.bhash_size)];
  			spin_lock(&head->lock);
 
  			/* Does not bother with rcv_saddr checks,
@@ -172,7 +175,8 @@
  				}
  			}
 
- 			tb = inet_bind_bucket_create(dccp_hashinfo.bind_bucket_cachep, head, rover);
+ 			tb = inet_bind_bucket_create(dccp_hashinfo.bind_bucket_cachep,
+						     head, rover);
  			if (tb == NULL) {
  				spin_unlock(&head->lock);
  				break;
@@ -211,7 +215,8 @@
 		goto out;
  	}
 
- 	head = &dccp_hashinfo.bhash[inet_bhashfn(snum, dccp_hashinfo.bhash_size)];
+ 	head = &dccp_hashinfo.bhash[inet_bhashfn(snum,
+						 dccp_hashinfo.bhash_size)];
  	tb   = inet_csk(sk)->icsk_bind_hash;
 	spin_lock_bh(&head->lock);
 	if (sk_head(&tb->owners) == sk && sk->sk_bind_node.next == NULL) {
@@ -313,7 +318,9 @@
 out:
 	return err;
 failure:
-	/* This unhashes the socket and releases the local port, if necessary. */
+	/*
+	 * This unhashes the socket and releases the local port, if necessary.
+	 */
 	dccp_set_state(sk, DCCP_CLOSED);
 	ip_rt_put(rt);
 	sk->sk_route_caps = 0;
@@ -365,8 +372,9 @@
 		/*
 		 * From: draft-ietf-dccp-spec-11.txt
 		 *
-		 *	DCCP-Sync packets are the best choice for upward probing,
-		 *	since DCCP-Sync probes do not risk application data loss.
+		 *	DCCP-Sync packets are the best choice for upward
+		 *	probing, since DCCP-Sync probes do not risk application
+		 *	data loss.
 		 */
 		dccp_send_sync(sk, dp->dccps_gsr);
 	} /* else let the usual retransmit timer handle it */
@@ -405,11 +413,13 @@
 	dh->dccph_x	   = 1;
 
 	dccp_hdr_set_seq(dh, DCCP_SKB_CB(rxskb)->dccpd_ack_seq);
-	dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq);
+	dccp_hdr_set_ack(dccp_hdr_ack_bits(skb),
+			 DCCP_SKB_CB(rxskb)->dccpd_seq);
 
 	bh_lock_sock(dccp_ctl_socket->sk);
 	err = ip_build_and_send_pkt(skb, dccp_ctl_socket->sk,
-				    rxskb->nh.iph->daddr, rxskb->nh.iph->saddr, NULL);
+				    rxskb->nh.iph->daddr,
+				    rxskb->nh.iph->saddr, NULL);
 	bh_unlock_sock(dccp_ctl_socket->sk);
 
 	if (err == NET_XMIT_CN || err == 0) {
@@ -418,7 +428,8 @@
 	}
 }
 
-static void dccp_v4_reqsk_send_ack(struct sk_buff *skb, struct request_sock *req)
+static void dccp_v4_reqsk_send_ack(struct sk_buff *skb,
+				   struct request_sock *req)
 {
 	dccp_v4_ctl_send_ack(skb);
 }
@@ -465,7 +476,8 @@
 void dccp_v4_err(struct sk_buff *skb, u32 info)
 {
 	const struct iphdr *iph = (struct iphdr *)skb->data;
-	const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data + (iph->ihl << 2));
+	const struct dccp_hdr *dh = (struct dccp_hdr *)(skb->data +
+							(iph->ihl << 2));
 	struct dccp_sock *dp;
 	struct inet_sock *inet;
 	const int type = skb->h.icmph->type;
@@ -605,7 +617,8 @@
 	sock_put(sk);
 }
 
-extern struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst, enum dccp_reset_codes code);
+extern struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst,
+				       enum dccp_reset_codes code);
 
 int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
 {
@@ -689,7 +702,8 @@
 	ireq->loc_addr = daddr;
 	ireq->rmt_addr = saddr;
 	/* FIXME: Merge Aristeu's option parsing code when ready */
-	req->rcv_wnd	= 100; /* Fake, option parsing will get the right value */
+	req->rcv_wnd	= 100; /* Fake, option parsing will get the
+				  right value */
 	ireq->opt	= NULL;
 
 	/* 
@@ -804,7 +818,8 @@
 	return sk;
 }
 
-int dccp_v4_checksum(const struct sk_buff *skb, const u32 saddr, const u32 daddr)
+int dccp_v4_checksum(const struct sk_buff *skb, const u32 saddr,
+		     const u32 daddr)
 {
 	const struct dccp_hdr* dh = dccp_hdr(skb);
 	int checksum_len;
@@ -814,11 +829,13 @@
 		checksum_len = skb->len;
 	else {
 		checksum_len = (dh->dccph_cscov + dh->dccph_x) * sizeof(u32);
-		checksum_len = checksum_len < skb->len ? checksum_len : skb->len;
+		checksum_len = checksum_len < skb->len ? checksum_len :
+							 skb->len;
 	}
 
 	tmp = csum_partial((unsigned char *)dh, checksum_len, 0);
-	return csum_tcpudp_magic(saddr, daddr, checksum_len, IPPROTO_DCCP, tmp);
+	return csum_tcpudp_magic(saddr, daddr, checksum_len,
+				 IPPROTO_DCCP, tmp);
 }
 
 static int dccp_v4_verify_checksum(struct sk_buff *skb,
@@ -832,10 +849,12 @@
 		checksum_len = skb->len;
 	else {
 		checksum_len = (dh->dccph_cscov + dh->dccph_x) * sizeof(u32);
-		checksum_len = checksum_len < skb->len ? checksum_len : skb->len;
+		checksum_len = checksum_len < skb->len ? checksum_len :
+							 skb->len;
 	}
 	tmp = csum_partial((unsigned char *)dh, checksum_len, 0);
-	return csum_tcpudp_magic(saddr, daddr, checksum_len, IPPROTO_DCCP, tmp) == 0 ? 0 : -1;
+	return csum_tcpudp_magic(saddr, daddr, checksum_len,
+				 IPPROTO_DCCP, tmp) == 0 ? 0 : -1;
 }
 
 static struct dst_entry* dccp_v4_route_skb(struct sock *sk,
@@ -850,7 +869,9 @@
 			    .proto = sk->sk_protocol,
 			    .uli_u = { .ports =
 				       { .sport = dccp_hdr(skb)->dccph_dport,
-					 .dport = dccp_hdr(skb)->dccph_sport } } };
+					 .dport = dccp_hdr(skb)->dccph_sport }
+			   	     }
+			  };
 
 	if (ip_route_output_flow(&rt, &fl, sk, 0)) {
 		IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
@@ -899,17 +920,20 @@
 	dh->dccph_dport	   = rxdh->dccph_sport;
 	dh->dccph_doff	   = dccp_hdr_reset_len / 4;
 	dh->dccph_x	   = 1;
-	dccp_hdr_reset(skb)->dccph_reset_code = DCCP_SKB_CB(rxskb)->dccpd_reset_code;
+	dccp_hdr_reset(skb)->dccph_reset_code =
+				DCCP_SKB_CB(rxskb)->dccpd_reset_code;
 
 	dccp_hdr_set_seq(dh, DCCP_SKB_CB(rxskb)->dccpd_ack_seq);
-	dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), DCCP_SKB_CB(rxskb)->dccpd_seq);
+	dccp_hdr_set_ack(dccp_hdr_ack_bits(skb),
+			 DCCP_SKB_CB(rxskb)->dccpd_seq);
 
 	dh->dccph_checksum = dccp_v4_checksum(skb, rxskb->nh.iph->saddr,
 					      rxskb->nh.iph->daddr);
 
 	bh_lock_sock(dccp_ctl_socket->sk);
 	err = ip_build_and_send_pkt(skb, dccp_ctl_socket->sk,
-				    rxskb->nh.iph->daddr, rxskb->nh.iph->saddr, NULL);
+				    rxskb->nh.iph->daddr,
+				    rxskb->nh.iph->saddr, NULL);
 	bh_unlock_sock(dccp_ctl_socket->sk);
 
 	if (err == NET_XMIT_CN || err == 0) {
@@ -933,7 +957,8 @@
 	/*
 	 *  Step 3: Process LISTEN state
 	 *     If S.state == LISTEN,
-	 *	  If P.type == Request or P contains a valid Init Cookie option,
+	 *	  If P.type == Request or P contains a valid Init Cookie
+	 *	  	option,
 	 *	     * Must scan the packet's options to check for an Init
 	 *		Cookie.  Only the Init Cookie is processed here,
 	 *		however; other options are processed in Step 8.  This
@@ -950,7 +975,8 @@
 	 *	     Generate Reset(No Connection) unless P.type == Reset
 	 *	     Drop packet and return
 	 *
-	 * NOTE: the check for the packet types is done in dccp_rcv_state_process
+	 * NOTE: the check for the packet types is done in
+	 *	 dccp_rcv_state_process
 	 */
 	if (sk->sk_state == DCCP_LISTEN) {
 		struct sock *nsk = dccp_v4_hnd_req(sk, skb);
@@ -1007,7 +1033,8 @@
 	}
 
 	if (!pskb_may_pull(skb, dh->dccph_doff * sizeof(u32))) {
-		dccp_pr_debug("P.Data Offset(%u) too small 2\n", dh->dccph_doff);
+		dccp_pr_debug("P.Data Offset(%u) too small 2\n",
+			      dh->dccph_doff);
 		return 1;
 	}
 
@@ -1021,8 +1048,8 @@
 	    dh->dccph_type != DCCP_PKT_DATA &&
 	    dh->dccph_type != DCCP_PKT_ACK &&
 	    dh->dccph_type != DCCP_PKT_DATAACK) {
-		dccp_pr_debug("P.type (%s) not Data, Ack nor DataAck and P.X == 0\n",
-			      dccp_packet_name(dh->dccph_type));
+		dccp_pr_debug("P.type (%s) not Data, Ack nor DataAck and "
+			      "P.X == 0\n", dccp_packet_name(dh->dccph_type));
 		return 1;
 	}
 
@@ -1055,10 +1082,11 @@
 	 * dccp_ackpkts_add, you'll get something like this on a session that
 	 * sends 10 DATA/DATAACK packets:
 	 *
-	 * dccp_ackpkts_print: 281473596467422 |0,0|3,0|0,0|3,0|0,0|3,0|0,0|3,0|0,1|
+	 * ackpkts_print: 281473596467422 |0,0|3,0|0,0|3,0|0,0|3,0|0,0|3,0|0,1|
 	 *
 	 * 0, 0 means: DCCP_ACKPKTS_STATE_RECEIVED, RLE == just this packet
-	 * 0, 1 means: DCCP_ACKPKTS_STATE_RECEIVED, RLE == two adjacent packets with the same state
+	 * 0, 1 means: DCCP_ACKPKTS_STATE_RECEIVED, RLE == two adjacent packets
+	 * 						   with the same state
 	 * 3, 0 means: DCCP_ACKPKTS_STATE_NOT_RECEIVED, RLE == just this packet
 	 *
 	 * So...
@@ -1072,10 +1100,12 @@
 	 * 281473596467416 was received
 	 * 281473596467415 was not received
 	 * 281473596467414 was received
-	 * 281473596467413 was received (this one was the 3way handshake RESPONSE)
+	 * 281473596467413 was received (this one was the 3way handshake
+	 * 				 RESPONSE)
 	 *
 	 */
-	if (dh->dccph_type == DCCP_PKT_DATA || dh->dccph_type == DCCP_PKT_DATAACK) {
+	if (dh->dccph_type == DCCP_PKT_DATA ||
+	    dh->dccph_type == DCCP_PKT_DATAACK) {
 		static int discard = 0;
 
 		if (discard) {
@@ -1170,7 +1200,8 @@
 	 *		Drop packet and return
 	 */
 	if (dh->dccph_type != DCCP_PKT_RESET) {
-		DCCP_SKB_CB(skb)->dccpd_reset_code = DCCP_RESET_CODE_NO_CONNECTION;
+		DCCP_SKB_CB(skb)->dccpd_reset_code =
+					DCCP_RESET_CODE_NO_CONNECTION;
 		dccp_v4_ctl_send_reset(skb);
 	}
 
@@ -1196,8 +1227,9 @@
 	dccp_options_init(&dp->dccps_options);
 
 	if (dp->dccps_options.dccpo_send_ack_vector) {
-		dp->dccps_hc_rx_ackpkts = dccp_ackpkts_alloc(DCCP_MAX_ACK_VECTOR_LEN,
-							     GFP_KERNEL);
+		dp->dccps_hc_rx_ackpkts =
+			dccp_ackpkts_alloc(DCCP_MAX_ACK_VECTOR_LEN,
+					   GFP_KERNEL);
 
 		if (dp->dccps_hc_rx_ackpkts == NULL)
 			return -ENOMEM;
@@ -1211,8 +1243,10 @@
 	 * setsockopt(CCIDs-I-want/accept). -acme
 	 */
 	if (likely(!dccp_ctl_socket_init)) {
-		dp->dccps_hc_rx_ccid = ccid_init(dp->dccps_options.dccpo_ccid, sk);
-		dp->dccps_hc_tx_ccid = ccid_init(dp->dccps_options.dccpo_ccid, sk);
+		dp->dccps_hc_rx_ccid = ccid_init(dp->dccps_options.dccpo_ccid,
+						 sk);
+		dp->dccps_hc_tx_ccid = ccid_init(dp->dccps_options.dccpo_ccid,
+						 sk);
 	    	if (dp->dccps_hc_rx_ccid == NULL ||
 		    dp->dccps_hc_tx_ccid == NULL) {
 			ccid_exit(dp->dccps_hc_rx_ccid, sk);
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index a6a0b27..b8e6720 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -69,8 +69,8 @@
 		 * socket up.  We've got bigger problems than
 		 * non-graceful socket closings.
 		 */
-		if (net_ratelimit())
-			printk(KERN_INFO "DCCP: time wait bucket table overflow\n");
+		LIMIT_NETDEBUG(KERN_INFO "DCCP: time wait bucket "
+					 "table overflow\n");
 	}
 
 	dccp_done(sk);
@@ -98,19 +98,23 @@
 		newicsk->icsk_rto = DCCP_TIMEOUT_INIT;
 
 		if (newdp->dccps_options.dccpo_send_ack_vector) {
-			newdp->dccps_hc_rx_ackpkts = dccp_ackpkts_alloc(DCCP_MAX_ACK_VECTOR_LEN,
-									GFP_ATOMIC);
+			newdp->dccps_hc_rx_ackpkts =
+				dccp_ackpkts_alloc(DCCP_MAX_ACK_VECTOR_LEN,
+						   GFP_ATOMIC);
 			/*
-			 * XXX: We're using the same CCIDs set on the parent, i.e. sk_clone
-			 * copied the master sock and left the CCID pointers for this child,
-			 * that is why we do the __ccid_get calls.
+			 * XXX: We're using the same CCIDs set on the parent,
+			 * i.e. sk_clone copied the master sock and left the
+			 * CCID pointers for this child, that is why we do the
+			 * __ccid_get calls.
 			 */
 			if (unlikely(newdp->dccps_hc_rx_ackpkts == NULL))
 				goto out_free;
 		}
 
-		if (unlikely(ccid_hc_rx_init(newdp->dccps_hc_rx_ccid, newsk) != 0 ||
-			     ccid_hc_tx_init(newdp->dccps_hc_tx_ccid, newsk) != 0)) {
+		if (unlikely(ccid_hc_rx_init(newdp->dccps_hc_rx_ccid,
+					     newsk) != 0 ||
+			     ccid_hc_tx_init(newdp->dccps_hc_tx_ccid,
+				     	     newsk) != 0)) {
 			dccp_ackpkts_free(newdp->dccps_hc_rx_ackpkts);
 			ccid_hc_rx_exit(newdp->dccps_hc_rx_ccid, newsk);
 			ccid_hc_tx_exit(newdp->dccps_hc_tx_ccid, newsk);
@@ -129,7 +133,8 @@
 		 * Step 3: Process LISTEN state
 		 *
 		 *	Choose S.ISS (initial seqno) or set from Init Cookie
-		 *	Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookie
+		 *	Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init
+		 *	Cookie
 		 */
 
 		/* See dccp_v4_conn_request */
@@ -160,13 +165,15 @@
 
 	/* Check for retransmitted REQUEST */
 	if (dccp_hdr(skb)->dccph_type == DCCP_PKT_REQUEST) {
-		if (after48(DCCP_SKB_CB(skb)->dccpd_seq, dccp_rsk(req)->dreq_isr)) {
+		if (after48(DCCP_SKB_CB(skb)->dccpd_seq,
+			    dccp_rsk(req)->dreq_isr)) {
 			struct dccp_request_sock *dreq = dccp_rsk(req);
 
 			dccp_pr_debug("Retransmitted REQUEST\n");
 			/* Send another RESPONSE packet */
 			dccp_set_seqno(&dreq->dreq_iss, dreq->dreq_iss + 1);
-			dccp_set_seqno(&dreq->dreq_isr, DCCP_SKB_CB(skb)->dccpd_seq);
+			dccp_set_seqno(&dreq->dreq_isr,
+				       DCCP_SKB_CB(skb)->dccpd_seq);
 			req->rsk_ops->rtx_syn_ack(sk, req, NULL);
 		}
 		/* Network Duplicate, discard packet */
@@ -181,7 +188,8 @@
 
 	/* Invalid ACK */
 	if (DCCP_SKB_CB(skb)->dccpd_ack_seq != dccp_rsk(req)->dreq_iss) {
-		dccp_pr_debug("Invalid ACK number: ack_seq=%llu, dreq_iss=%llu\n",
+		dccp_pr_debug("Invalid ACK number: ack_seq=%llu, "
+			      "dreq_iss=%llu\n",
 			      (unsigned long long)
 			      DCCP_SKB_CB(skb)->dccpd_ack_seq,
 			      (unsigned long long)
@@ -223,7 +231,8 @@
 	const int state = child->sk_state;
 
 	if (!sock_owned_by_user(child)) {
-		ret = dccp_rcv_state_process(child, skb, dccp_hdr(skb), skb->len);
+		ret = dccp_rcv_state_process(child, skb, dccp_hdr(skb),
+					     skb->len);
 
 		/* Wakeup parent, send SIGIO */
 		if (state == DCCP_RESPOND && child->sk_state != state)
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 5bf9976..68d6614 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -59,14 +59,15 @@
 {
 	struct dccp_sock *dp = dccp_sk(sk);
 #ifdef DCCP_DEBUG
-	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ? "CLIENT rx opt: " :
-									"server rx opt: ";
+	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ?
+					"CLIENT rx opt: " : "server rx opt: ";
 #endif
 	const struct dccp_hdr *dh = dccp_hdr(skb);
 	const u8 pkt_type = DCCP_SKB_CB(skb)->dccpd_type;
 	unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb);
 	unsigned char *opt_ptr = options;
-	const unsigned char *opt_end = (unsigned char *)dh + (dh->dccph_doff * 4);
+	const unsigned char *opt_end = (unsigned char *)dh +
+					(dh->dccph_doff * 4);
 	struct dccp_options_received *opt_recv = &dp->dccps_options_received;
 	unsigned char opt, len;
 	unsigned char *value;
@@ -106,7 +107,8 @@
 				goto out_invalid_option;
 
 			opt_recv->dccpor_ndp = dccp_decode_value_var(value, len);
-			dccp_pr_debug("%sNDP count=%d\n", debug_prefix, opt_recv->dccpor_ndp);
+			dccp_pr_debug("%sNDP count=%d\n", debug_prefix,
+				      opt_recv->dccpor_ndp);
 			break;
 		case DCCPO_ACK_VECTOR_0:
 			if (len > DCCP_MAX_ACK_VECTOR_LEN)
@@ -124,8 +126,9 @@
 				      DCCP_SKB_CB(skb)->dccpd_ack_seq);
 			dccp_ackvector_print(DCCP_SKB_CB(skb)->dccpd_ack_seq,
 					     value, len);
-			dccp_ackpkts_check_rcv_ackvector(dp->dccps_hc_rx_ackpkts, sk,
-							 DCCP_SKB_CB(skb)->dccpd_ack_seq,
+			dccp_ackpkts_check_rcv_ackvector(dp->dccps_hc_rx_ackpkts,
+							 sk,
+						 DCCP_SKB_CB(skb)->dccpd_ack_seq,
 							 len, value);
 			break;
 		case DCCPO_TIMESTAMP:
@@ -148,15 +151,21 @@
 
 			opt_recv->dccpor_timestamp_echo = ntohl(*(u32 *)value);
 
-			dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, ackno=%llu, diff=%u\n",
-				      debug_prefix, opt_recv->dccpor_timestamp_echo,
+			dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, ackno=%llu, "
+				      "diff=%u\n",
+				      debug_prefix,
+				      opt_recv->dccpor_timestamp_echo,
 				      len + 2,
 				      (unsigned long long)
 				      DCCP_SKB_CB(skb)->dccpd_ack_seq,
-				      tcp_time_stamp - opt_recv->dccpor_timestamp_echo);
+				      (tcp_time_stamp -
+				       opt_recv->dccpor_timestamp_echo));
 
-			opt_recv->dccpor_elapsed_time = dccp_decode_value_var(value + 4, len - 4);
-			dccp_pr_debug("%sTIMESTAMP_ECHO ELAPSED_TIME=%d\n", debug_prefix,
+			opt_recv->dccpor_elapsed_time =
+					dccp_decode_value_var(value + 4,
+							     len - 4);
+			dccp_pr_debug("%sTIMESTAMP_ECHO ELAPSED_TIME=%d\n",
+				      debug_prefix,
 				      opt_recv->dccpor_elapsed_time);
 			break;
 		case DCCPO_ELAPSED_TIME:
@@ -165,33 +174,41 @@
 
 			if (pkt_type == DCCP_PKT_DATA)
 				continue;
-			opt_recv->dccpor_elapsed_time = dccp_decode_value_var(value, len);
+			opt_recv->dccpor_elapsed_time =
+					dccp_decode_value_var(value, len);
 			dccp_pr_debug("%sELAPSED_TIME=%d\n", debug_prefix,
 				      opt_recv->dccpor_elapsed_time);
 			break;
 			/*
 			 * From draft-ietf-dccp-spec-11.txt:
 			 *
-			 *	Option numbers 128 through 191 are for options sent from the HC-
-			 *	Sender to the HC-Receiver; option numbers 192 through 255 are for
-			 *	options sent from the HC-Receiver to the HC-Sender.
+			 *	Option numbers 128 through 191 are for
+			 *	options sent from the HC-Sender to the
+			 *	HC-Receiver; option numbers 192 through 255
+			 *	are for options sent from the HC-Receiver to
+			 *	the HC-Sender.
 			 */
 		case 128 ... 191: {
 			const u16 idx = value - options;
 
-			if (ccid_hc_rx_parse_options(dp->dccps_hc_rx_ccid, sk, opt, len, idx, value) != 0)
+			if (ccid_hc_rx_parse_options(dp->dccps_hc_rx_ccid, sk,
+						     opt, len, idx,
+						     value) != 0)
 				goto out_invalid_option;
 		}
 			break;
 		case 192 ... 255: {
 			const u16 idx = value - options;
 
-			if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk, opt, len, idx, value) != 0)
+			if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk,
+						     opt, len, idx,
+						     value) != 0)
 				goto out_invalid_option;
 		}
 			break;
 		default:
-			pr_info("DCCP(%p): option %d(len=%d) not implemented, ignoring\n",
+			pr_info("DCCP(%p): option %d(len=%d) not "
+				"implemented, ignoring\n",
 				sk, opt, len);
 			break;
 	        }
@@ -231,7 +248,8 @@
 	unsigned char *to;
 
 	if (DCCP_SKB_CB(skb)->dccpd_opt_len + len + 2 > DCCP_MAX_OPT_LEN) {
-		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to insert %d option!\n", option);
+		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to insert "
+			       "%d option!\n", option);
 		return;
 	}
 
@@ -287,8 +305,8 @@
 {
 #ifdef DCCP_DEBUG
 	struct dccp_sock *dp = dccp_sk(sk);
-	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ? "CLIENT TX opt: " :
-									"server TX opt: ";
+	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ?
+					"CLIENT TX opt: " : "server TX opt: ";
 #endif
 	const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
 	const int len = 2 + elapsed_time_len;
@@ -299,7 +317,8 @@
 		return;
 
 	if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN) {
-		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to insert elapsed time!\n");
+		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to "
+					 "insert elapsed time!\n");
 		return;
 	}
 
@@ -323,8 +342,8 @@
 {
 	struct dccp_sock *dp = dccp_sk(sk);
 #ifdef DCCP_DEBUG
-	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ? "CLIENT TX opt: " :
-									"server TX opt: ";
+	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ?
+					"CLIENT TX opt: " : "server TX opt: ";
 #endif
 	struct dccp_ackpkts *ap = dp->dccps_hc_rx_ackpkts;
 	int len = ap->dccpap_buf_vector_len + 2;
@@ -335,7 +354,8 @@
 		dccp_insert_option_elapsed_time(sk, skb, elapsed_time);
 
 	if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN) {
-		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to insert ACK Vector!\n");
+		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to "
+					 "insert ACK Vector!\n");
 		return;
 	}
 
@@ -360,7 +380,8 @@
 
 	/* Check if buf_head wraps */
 	if (ap->dccpap_buf_head + len > ap->dccpap_buf_len) {
-		const unsigned int tailsize = ap->dccpap_buf_len - ap->dccpap_buf_head;
+		const unsigned int tailsize = (ap->dccpap_buf_len -
+					       ap->dccpap_buf_head);
 
 		memcpy(to, from, tailsize);
 		to   += tailsize;
@@ -375,8 +396,8 @@
 	 *	For each acknowledgement it sends, the HC-Receiver will add an
 	 *	acknowledgement record.  ack_seqno will equal the HC-Receiver
 	 *	sequence number it used for the ack packet; ack_ptr will equal
-	 *	buf_head; ack_ackno will equal buf_ackno; and ack_nonce will equal
-	 *	buf_nonce.
+	 *	buf_head; ack_ackno will equal buf_ackno; and ack_nonce will
+	 *	equal buf_nonce.
 	 *
 	 * This implemention uses just one ack record for now.
 	 */
@@ -386,33 +407,38 @@
 	ap->dccpap_ack_nonce	  = ap->dccpap_buf_nonce;
 	ap->dccpap_ack_vector_len = ap->dccpap_buf_vector_len;
 
-	dccp_pr_debug("%sACK Vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu\n",
+	dccp_pr_debug("%sACK Vector 0, len=%d, ack_seqno=%llu, "
+		      "ack_ackno=%llu\n",
 		      debug_prefix, ap->dccpap_ack_vector_len,
 		      (unsigned long long) ap->dccpap_ack_seqno,
 		      (unsigned long long) ap->dccpap_ack_ackno);
 }
 
-static inline void dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
+static inline void dccp_insert_option_timestamp(struct sock *sk,
+						struct sk_buff *skb)
 {
 	const u32 now = htonl(tcp_time_stamp);
 	dccp_insert_option(sk, skb, DCCPO_TIMESTAMP, &now, sizeof(now));
 }
 
-static void dccp_insert_option_timestamp_echo(struct sock *sk, struct sk_buff *skb)
+static void dccp_insert_option_timestamp_echo(struct sock *sk,
+					      struct sk_buff *skb)
 {
 	struct dccp_sock *dp = dccp_sk(sk);
 #ifdef DCCP_DEBUG
-	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ? "CLIENT TX opt: " :
-									"server TX opt: ";
+	const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ?
+					"CLIENT TX opt: " : "server TX opt: ";
 #endif
 	u32 tstamp_echo;
-	const u32 elapsed_time = jiffies_to_usecs(jiffies - dp->dccps_timestamp_time) / 10;
+	const u32 elapsed_time = jiffies_to_usecs(jiffies -
+						  dp->dccps_timestamp_time) / 10;
 	const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
 	const int len = 6 + elapsed_time_len;
 	unsigned char *to;
 
 	if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN) {
-		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to insert timestamp echo!\n");
+		LIMIT_NETDEBUG(KERN_INFO "DCCP: packet too small to insert "
+					 "timestamp echo!\n");
 		return;
 	}
 
@@ -447,7 +473,8 @@
 
 	if (!dccp_packet_without_ack(skb)) {
 		if (dp->dccps_options.dccpo_send_ack_vector &&
-		    dp->dccps_hc_rx_ackpkts->dccpap_buf_ackno != DCCP_MAX_SEQNO + 1)
+		    (dp->dccps_hc_rx_ackpkts->dccpap_buf_ackno !=
+		     DCCP_MAX_SEQNO + 1))
 			dccp_insert_option_ack_vector(sk, skb);
 
 		dccp_insert_option_timestamp(sk, skb);
@@ -480,12 +507,16 @@
 #ifdef DCCP_DEBUG
 		memset(ap->dccpap_buf, 0xFF, len);
 #endif
-		ap->dccpap_buf_len	  = len;
-		ap->dccpap_buf_head	  = ap->dccpap_buf_tail = ap->dccpap_buf_len - 1;
-		ap->dccpap_buf_ackno	  = ap->dccpap_ack_ackno = ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1;
-		ap->dccpap_buf_nonce	  = ap->dccpap_buf_nonce = 0;
-		ap->dccpap_ack_ptr	  = 0;
-		ap->dccpap_time		  = 0;
+		ap->dccpap_buf_len   = len;
+		ap->dccpap_buf_head  =
+			ap->dccpap_buf_tail =
+				ap->dccpap_buf_len - 1;
+		ap->dccpap_buf_ackno =
+			ap->dccpap_ack_ackno =
+				ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1;
+		ap->dccpap_buf_nonce = ap->dccpap_buf_nonce = 0;
+		ap->dccpap_ack_ptr   = 0;
+		ap->dccpap_time	     = 0;
 		ap->dccpap_buf_vector_len = ap->dccpap_ack_vector_len = 0;
 	}
 
@@ -567,15 +598,16 @@
 	 *
 	 * From Appendix A:
 	 *
-	 *	Of course, the circular buffer may overflow, either when the HC-
-	 *	Sender is sending data at a very high rate, when the HC-Receiver's
-	 *	acknowledgements are not reaching the HC-Sender, or when the HC-
-	 *	Sender is forgetting to acknowledge those acks (so the HC-Receiver
-	 *	is unable to clean up old state).  In this case, the HC-Receiver
-	 *	should either compress the buffer (by increasing run lengths when
-	 *	possible), transfer its state to a larger buffer, or, as a last
-	 *	resort, drop all received packets, without processing them
-	 *	whatsoever, until its buffer shrinks again.
+	 *	Of course, the circular buffer may overflow, either when the
+	 *	HC-Sender is sending data at a very high rate, when the
+	 *	HC-Receiver's acknowledgements are not reaching the HC-Sender,
+	 *	or when the HC-Sender is forgetting to acknowledge those acks
+	 *	(so the HC-Receiver is unable to clean up old state). In this
+	 *	case, the HC-Receiver should either compress the buffer (by
+	 *	increasing run lengths when possible), transfer its state to
+	 *	a larger buffer, or, as a last resort, drop all received
+	 *	packets, without processing them whatsoever, until its buffer
+	 *	shrinks again.
 	 */
 
 	/* See if this is the first ackno being inserted */
@@ -583,15 +615,17 @@
 		ap->dccpap_buf[ap->dccpap_buf_head] = state;
 		ap->dccpap_buf_vector_len = 1;
 	} else if (after48(ackno, ap->dccpap_buf_ackno)) {
-		const u64 delta = dccp_delta_seqno(ap->dccpap_buf_ackno, ackno);
+		const u64 delta = dccp_delta_seqno(ap->dccpap_buf_ackno,
+						   ackno);
 
 		/*
-		 * Look if the state of this packet is the same as the previous ackno
-		 * and if so if we can bump the head len.
+		 * Look if the state of this packet is the same as the
+		 * previous ackno and if so if we can bump the head len.
 		 */
 		if (delta == 1 &&
 		    dccp_ackpkts_state(ap, ap->dccpap_buf_head) == state &&
-		    dccp_ackpkts_len(ap, ap->dccpap_buf_head) < DCCP_ACKPKTS_LEN_MASK)
+		    (dccp_ackpkts_len(ap, ap->dccpap_buf_head) <
+		     DCCP_ACKPKTS_LEN_MASK))
 			ap->dccpap_buf[ap->dccpap_buf_head]++;
 		else if (dccp_ackpkts_set_buf_head_state(ap, delta, state))
 			return -ENOBUFS;
@@ -599,9 +633,10 @@
 		/*
 		 * A.1.2.  Old Packets
 		 *
-		 *	When a packet with Sequence Number S arrives, and S <= buf_ackno,
-		 *	the HC-Receiver will scan the table for the byte corresponding to S.
-		 *	(Indexing structures could reduce the complexity of this scan.)
+		 *	When a packet with Sequence Number S arrives, and
+		 *	S <= buf_ackno, the HC-Receiver will scan the table
+		 *	for the byte corresponding to S. (Indexing structures
+		 *	could reduce the complexity of this scan.)
 		 */
 		u64 delta = dccp_delta_seqno(ackno, ap->dccpap_buf_ackno);
 		unsigned int index = ap->dccpap_buf_head;
@@ -610,11 +645,12 @@
 			const u8 len = dccp_ackpkts_len(ap, index);
 			const u8 state = dccp_ackpkts_state(ap, index);
 			/*
-			 * valid packets not yet in dccpap_buf have a reserved entry, with
-			 * a len equal to 0
+			 * valid packets not yet in dccpap_buf have a reserved
+			 * entry, with a len equal to 0.
 			 */
 			if (state == DCCP_ACKPKTS_STATE_NOT_RECEIVED &&
-			    len == 0 && delta == 0) { /* Found our reserved seat! */
+			    len == 0 && delta == 0) { /* Found our
+							 reserved seat! */
 				dccp_pr_debug("Found %llu reserved seat!\n",
 					      (unsigned long long) ackno);
 				ap->dccpap_buf[index] = state;
@@ -639,13 +675,14 @@
 
 out_duplicate:
 	/* Duplicate packet */
-	dccp_pr_debug("Received a dup or already considered lost packet: %llu\n",
-		      (unsigned long long) ackno);
+	dccp_pr_debug("Received a dup or already considered lost "
+		      "packet: %llu\n", (unsigned long long) ackno);
 	return -EILSEQ;
 }
 
 #ifdef DCCP_DEBUG
-void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len)
+void dccp_ackvector_print(const u64 ackno, const unsigned char *vector,
+			  int len)
 {
 	if (!dccp_debug)
 		return;
@@ -678,8 +715,9 @@
 	 * As we're keeping track of the ack vector size
 	 * (dccpap_buf_vector_len) and the sent ack vector size
 	 * (dccpap_ack_vector_len) we don't need dccpap_buf_tail at all, but
-	 * keep this code here as in the future we'll implement a vector of ack
-	 * records, as suggested in draft-ietf-dccp-spec-11.txt Appendix A. -acme
+	 * keep this code here as in the future we'll implement a vector of
+	 * ack records, as suggested in draft-ietf-dccp-spec-11.txt
+	 * Appendix A. -acme
 	 */
 #if 0
 	ap->dccpap_buf_tail = ap->dccpap_ack_ptr + 1;
@@ -699,10 +737,11 @@
 	if (ackno == ap->dccpap_ack_seqno) {
 #ifdef DCCP_DEBUG
 		struct dccp_sock *dp = dccp_sk(sk);
-		const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ? "CLIENT rx ack: " :
-										"server rx ack: ";
+		const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ?
+					"CLIENT rx ack: " : "server rx ack: ";
 #endif
-		dccp_pr_debug("%sACK packet 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n",
+		dccp_pr_debug("%sACK packet 0, len=%d, ack_seqno=%llu, "
+			      "ack_ackno=%llu, ACKED!\n",
 			      debug_prefix, 1,
 			      (unsigned long long) ap->dccpap_ack_seqno,
 			      (unsigned long long) ap->dccpap_ack_ackno);
@@ -722,20 +761,21 @@
 	if (ap->dccpap_ack_seqno == DCCP_MAX_SEQNO + 1)
 		return;
 	/*
-	 * We're in the receiver half connection, so if the received an ACK vector
-	 * ackno (e.g. 50) before dccpap_ack_seqno (e.g. 52), we're not interested.
+	 * We're in the receiver half connection, so if the received an ACK
+	 * vector ackno (e.g. 50) before dccpap_ack_seqno (e.g. 52), we're
+	 * not interested.
 	 *
 	 * Extra explanation with example:
 	 * 
 	 * if we received an ACK vector with ackno 50, it can only be acking
 	 * 50, 49, 48, etc, not 52 (the seqno for the ACK vector we sent).
 	 */
-	// dccp_pr_debug("is %llu < %llu? ", ackno, ap->dccpap_ack_seqno);
+	/* dccp_pr_debug("is %llu < %llu? ", ackno, ap->dccpap_ack_seqno); */
 	if (before48(ackno, ap->dccpap_ack_seqno)) {
-		// dccp_pr_debug_cat("yes\n");
+		/* dccp_pr_debug_cat("yes\n"); */
 		return;
 	}
-	// dccp_pr_debug_cat("no\n");
+	/* dccp_pr_debug_cat("no\n"); */
 
 	i = len;
 	while (i--) {
@@ -744,18 +784,25 @@
 
 		dccp_set_seqno(&ackno_end_rl, ackno - rl);
 
-		// dccp_pr_debug("is %llu <= %llu <= %llu? ", ackno_end_rl, ap->dccpap_ack_seqno, ackno);
+		/*
+		 * dccp_pr_debug("is %llu <= %llu <= %llu? ", ackno_end_rl,
+		 * ap->dccpap_ack_seqno, ackno);
+		 */
 		if (between48(ap->dccpap_ack_seqno, ackno_end_rl, ackno)) {
-			const u8 state = (*vector & DCCP_ACKPKTS_STATE_MASK) >> 6;
-			// dccp_pr_debug_cat("yes\n");
+			const u8 state = (*vector &
+					  DCCP_ACKPKTS_STATE_MASK) >> 6;
+			/* dccp_pr_debug_cat("yes\n"); */
 
 			if (state != DCCP_ACKPKTS_STATE_NOT_RECEIVED) {
 #ifdef DCCP_DEBUG
 				struct dccp_sock *dp = dccp_sk(sk);
-				const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ? "CLIENT rx ack: " :
-												"server rx ack: ";
+				const char *debug_prefix =
+					dp->dccps_role == DCCP_ROLE_CLIENT ?
+					"CLIENT rx ack: " : "server rx ack: ";
 #endif
-				dccp_pr_debug("%sACK vector 0, len=%d, ack_seqno=%llu, ack_ackno=%llu, ACKED!\n",
+				dccp_pr_debug("%sACK vector 0, len=%d, "
+					      "ack_seqno=%llu, ack_ackno=%llu, "
+					      "ACKED!\n",
 					      debug_prefix, len,
 					      (unsigned long long)
 					      ap->dccpap_ack_seqno,
@@ -764,13 +811,13 @@
 				dccp_ackpkts_trow_away_ack_record(ap);
 			}
 			/*
-			 * If dccpap_ack_seqno was not received, no problem we'll
-			 * send another ACK vector.
+			 * If dccpap_ack_seqno was not received, no problem
+			 * we'll send another ACK vector.
 			 */
 			ap->dccpap_ack_seqno = DCCP_MAX_SEQNO + 1;
 			break;
 		}
-		// dccp_pr_debug_cat("no\n");
+		/* dccp_pr_debug_cat("no\n"); */
 
 		dccp_set_seqno(&ackno, ackno_end_rl - 1);
 		++vector;
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 50292c0..dcc061b 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -40,13 +40,13 @@
 		/* XXX For now we're using only 48 bits sequence numbers */
 		const int dccp_header_size = sizeof(*dh) +
 					     sizeof(struct dccp_hdr_ext) +
-					     dccp_packet_hdr_len(dcb->dccpd_type);
+					  dccp_packet_hdr_len(dcb->dccpd_type);
 		int err, set_ack = 1;
 		u64 ackno = dp->dccps_gsr;
 
 		/*
-		 * FIXME: study DCCP_PKT_SYNC[ACK] to see what is the right thing 
-		 * to do here...
+		 * FIXME: study DCCP_PKT_SYNC[ACK] to see what is the right
+		 * thing to do here...
 		 */
 		dccp_inc_seqno(&dp->dccps_gss);
 
@@ -65,7 +65,9 @@
 		
 		skb->h.raw = skb_push(skb, dccp_header_size);
 		dh = dccp_hdr(skb);
-		/* Data packets are not cloned as they are never retransmitted */
+		/*
+		 * Data packets are not cloned as they are never retransmitted
+		 */
 		if (skb_cloned(skb))
 			skb_set_owner_w(skb, sk);
 
@@ -86,10 +88,12 @@
 
 		switch (dcb->dccpd_type) {
 		case DCCP_PKT_REQUEST:
-			dccp_hdr_request(skb)->dccph_req_service = dcb->dccpd_service;
+			dccp_hdr_request(skb)->dccph_req_service =
+							dcb->dccpd_service;
 			break;
 		case DCCP_PKT_RESET:
-			dccp_hdr_reset(skb)->dccph_reset_code = dcb->dccpd_reset_code;
+			dccp_hdr_reset(skb)->dccph_reset_code =
+							dcb->dccpd_reset_code;
 			break;
 		}
 
@@ -123,10 +127,13 @@
 	int mss_now;
 
 	/*
-	 * FIXME: we really should be using the af_specific thing to support IPv6.
-	 * mss_now = pmtu - tp->af_specific->net_header_len - sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext);
+	 * FIXME: we really should be using the af_specific thing to support
+	 * 	  IPv6.
+	 * mss_now = pmtu - tp->af_specific->net_header_len -
+	 * 	     sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext);
 	 */
-	mss_now = pmtu - sizeof(struct iphdr) - sizeof(struct dccp_hdr) - sizeof(struct dccp_hdr_ext);
+	mss_now = pmtu - sizeof(struct iphdr) - sizeof(struct dccp_hdr) -
+		  sizeof(struct dccp_hdr_ext);
 
 	/* Now subtract optional transport overhead */
 	mss_now -= dp->dccps_ext_header_len;
@@ -223,7 +230,8 @@
 
 	dh->dccph_sport	= inet_sk(sk)->sport;
 	dh->dccph_dport	= inet_rsk(req)->rmt_port;
-	dh->dccph_doff	= (dccp_header_size + DCCP_SKB_CB(skb)->dccpd_opt_len) / 4;
+	dh->dccph_doff	= (dccp_header_size +
+			   DCCP_SKB_CB(skb)->dccpd_opt_len) / 4;
 	dh->dccph_type	= DCCP_PKT_RESPONSE;
 	dh->dccph_x	= 1;
 	dccp_hdr_set_seq(dh, dccp_rsk(req)->dreq_iss);
@@ -271,7 +279,8 @@
 
 	dh->dccph_sport	= inet_sk(sk)->sport;
 	dh->dccph_dport	= inet_sk(sk)->dport;
-	dh->dccph_doff	= (dccp_header_size + DCCP_SKB_CB(skb)->dccpd_opt_len) / 4;
+	dh->dccph_doff	= (dccp_header_size +
+			   DCCP_SKB_CB(skb)->dccpd_opt_len) / 4;
 	dh->dccph_type	= DCCP_PKT_RESET;
 	dh->dccph_x	= 1;
 	dccp_hdr_set_seq(dh, dp->dccps_gss);
@@ -348,7 +357,9 @@
 		if (skb == NULL) {
 			inet_csk_schedule_ack(sk);
 			inet_csk(sk)->icsk_ack.ato = TCP_ATO_MIN;
-			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, TCP_DELACK_MAX, TCP_RTO_MAX);
+			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
+						  TCP_DELACK_MAX,
+						  DCCP_RTO_MAX);
 			return;
 		}
 
@@ -416,8 +427,10 @@
 	dccp_transmit_skb(sk, skb);
 }
 
-/* Send a DCCP_PKT_CLOSE/CLOSEREQ.  The caller locks the socket for us.  This cannot be
- * allowed to fail queueing a DCCP_PKT_CLOSE/CLOSEREQ frame under any circumstances.
+/*
+ * Send a DCCP_PKT_CLOSE/CLOSEREQ. The caller locks the socket for us. This
+ * cannot be allowed to fail queueing a DCCP_PKT_CLOSE/CLOSEREQ frame under
+ * any circumstances.
  */
 void dccp_send_close(struct sock *sk)
 {
@@ -435,7 +448,8 @@
 	/* Reserve space for headers and prepare control bits. */
 	skb_reserve(skb, sk->sk_prot->max_header);
 	skb->csum = 0;
-	DCCP_SKB_CB(skb)->dccpd_type = dp->dccps_role == DCCP_ROLE_CLIENT ? DCCP_PKT_CLOSE : DCCP_PKT_CLOSEREQ;
+	DCCP_SKB_CB(skb)->dccpd_type = dp->dccps_role == DCCP_ROLE_CLIENT ?
+					DCCP_PKT_CLOSE : DCCP_PKT_CLOSEREQ;
 
 	skb_set_owner_w(skb, sk);
 	dccp_transmit_skb(sk, skb);
diff --git a/net/dccp/packet_history.c b/net/dccp/packet_history.c
index 6b41489..2d9ef5a 100644
--- a/net/dccp/packet_history.c
+++ b/net/dccp/packet_history.c
@@ -55,7 +55,7 @@
 
 	sprintf(slab_name, dccp_rx_hist_mask, name);
 	hist->dccprxh_slab = kmem_cache_create(slab_name,
-					       sizeof(struct dccp_rx_hist_entry),
+					     sizeof(struct dccp_rx_hist_entry),
 					       0, SLAB_HWCACHE_ALIGN,
 					       NULL, NULL);
 	if (hist->dccprxh_slab == NULL)
@@ -128,7 +128,7 @@
 
 	sprintf(slab_name, dccp_tx_hist_mask, name);
 	hist->dccptxh_slab = kmem_cache_create(slab_name,
-					       sizeof(struct dccp_tx_hist_entry),
+					     sizeof(struct dccp_tx_hist_entry),
 					       0, SLAB_HWCACHE_ALIGN,
 					       NULL, NULL);
 	if (hist->dccptxh_slab == NULL)
@@ -156,8 +156,8 @@
 
 EXPORT_SYMBOL_GPL(dccp_tx_hist_delete);
 
-struct dccp_tx_hist_entry *dccp_tx_hist_find_entry(const struct list_head *list,
-						   const u64 seq)
+struct dccp_tx_hist_entry *
+	dccp_tx_hist_find_entry(const struct list_head *list, const u64 seq)
 {
 	struct dccp_tx_hist_entry *packet = NULL, *entry;
 
@@ -172,7 +172,8 @@
 
 EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry);
 
-void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist, struct list_head *list,
+void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist,
+			      struct list_head *list,
 			      struct dccp_tx_hist_entry *packet)
 {
 	struct dccp_tx_hist_entry *next;
diff --git a/net/dccp/packet_history.h b/net/dccp/packet_history.h
index 0056525..489fff4 100644
--- a/net/dccp/packet_history.h
+++ b/net/dccp/packet_history.h
@@ -115,7 +115,8 @@
 extern void dccp_tx_hist_purge(struct dccp_tx_hist *hist,
 			       struct list_head *list);
 
-static inline struct dccp_tx_hist_entry *dccp_tx_hist_head(struct list_head *list)
+static inline struct dccp_tx_hist_entry *
+		dccp_tx_hist_head(struct list_head *list)
 {
 	struct dccp_tx_hist_entry *head = NULL;
 
@@ -163,7 +164,8 @@
 	list_add(&entry->dccphrx_node, list);
 }
 
-static inline struct dccp_rx_hist_entry *dccp_rx_hist_head(struct list_head *list)
+static inline struct dccp_rx_hist_entry *
+		dccp_rx_hist_head(struct list_head *list)
 {
 	struct dccp_rx_hist_entry *head = NULL;
 
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 877c1e0..46dd489 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -255,12 +255,16 @@
 
 	/* FIXME */
 #if 0
-		/* Are we at urgent data? Stop if we have read anything or have SIGURG pending. */
+		/*
+		 * Are we at urgent data? Stop if we have read anything or
+		 * have SIGURG pending.
+		 */
 		if (tp->urg_data && tp->urg_seq == *seq) {
 			if (copied)
 				break;
 			if (signal_pending(current)) {
-				copied = timeo ? sock_intr_errno(timeo) : -EAGAIN;
+				copied = timeo ? sock_intr_errno(timeo) :
+						 -EAGAIN;
 				break;
 			}
 		}
@@ -285,7 +289,8 @@
 				dccp_pr_debug("found fin ok!\n");
 				goto found_fin_ok;
 			}
-			dccp_pr_debug("packet_type=%s\n", dccp_packet_name(dh->dccph_type));
+			dccp_pr_debug("packet_type=%s\n",
+				      dccp_packet_name(dh->dccph_type));
 			BUG_TRAP(flags & MSG_PEEK);
 			skb = skb->next;
 		} while (skb != (struct sk_buff *)&sk->sk_receive_queue);
@@ -439,16 +444,16 @@
 }
 
 static const unsigned char dccp_new_state[] = {
-	/* current state:        new state:      action:	*/
-	[0]			= DCCP_CLOSED,
-	[DCCP_OPEN] 		= DCCP_CLOSING | DCCP_ACTION_FIN,
-	[DCCP_REQUESTING] 	= DCCP_CLOSED,
-	[DCCP_PARTOPEN]	= DCCP_CLOSING | DCCP_ACTION_FIN,
-	[DCCP_LISTEN]		= DCCP_CLOSED,
-	[DCCP_RESPOND] 	= DCCP_CLOSED,
-	[DCCP_CLOSING]	= DCCP_CLOSED,
-	[DCCP_TIME_WAIT] 	= DCCP_CLOSED,
-	[DCCP_CLOSED] 	= DCCP_CLOSED,
+	/* current state:   new state:      action:	*/
+	[0]		  = DCCP_CLOSED,
+	[DCCP_OPEN] 	  = DCCP_CLOSING | DCCP_ACTION_FIN,
+	[DCCP_REQUESTING] = DCCP_CLOSED,
+	[DCCP_PARTOPEN]	  = DCCP_CLOSING | DCCP_ACTION_FIN,
+	[DCCP_LISTEN]	  = DCCP_CLOSED,
+	[DCCP_RESPOND]	  = DCCP_CLOSED,
+	[DCCP_CLOSING]	  = DCCP_CLOSED,
+	[DCCP_TIME_WAIT]  = DCCP_CLOSED,
+	[DCCP_CLOSED]	  = DCCP_CLOSED,
 };
 
 static int dccp_close_state(struct sock *sk)
@@ -541,7 +546,8 @@
 	.getname	= inet_getname,
 	.poll		= sock_no_poll,
 	.ioctl		= inet_ioctl,
-	.listen		= inet_dccp_listen, /* FIXME: work on inet_listen to rename it to sock_common_listen */
+	/* FIXME: work on inet_listen to rename it to sock_common_listen */
+	.listen		= inet_dccp_listen,
 	.shutdown	= inet_shutdown,
 	.setsockopt	= sock_common_setsockopt,
 	.getsockopt	= sock_common_getsockopt,
@@ -638,10 +644,10 @@
 	if (rc)
 		goto out;
 
-	dccp_hashinfo.bind_bucket_cachep = kmem_cache_create("dccp_bind_bucket",
-					       sizeof(struct inet_bind_bucket),
-					       0, SLAB_HWCACHE_ALIGN,
-					       NULL, NULL);
+	dccp_hashinfo.bind_bucket_cachep =
+		kmem_cache_create("dccp_bind_bucket",
+				  sizeof(struct inet_bind_bucket), 0,
+				  SLAB_HWCACHE_ALIGN, NULL, NULL);
 	if (!dccp_hashinfo.bind_bucket_cachep)
 		goto out_proto_unregister;
 
@@ -657,14 +663,16 @@
 		goal = num_physpages >> (23 - PAGE_SHIFT);
 
 	if (thash_entries)
-		goal = (thash_entries * sizeof(struct inet_ehash_bucket)) >> PAGE_SHIFT;
+		goal = (thash_entries *
+			sizeof(struct inet_ehash_bucket)) >> PAGE_SHIFT;
 	for (ehash_order = 0; (1UL << ehash_order) < goal; ehash_order++)
 		;
 	do {
 		dccp_hashinfo.ehash_size = (1UL << ehash_order) * PAGE_SIZE /
 					sizeof(struct inet_ehash_bucket);
 		dccp_hashinfo.ehash_size >>= 1;
-		while (dccp_hashinfo.ehash_size & (dccp_hashinfo.ehash_size - 1))
+		while (dccp_hashinfo.ehash_size &
+		       (dccp_hashinfo.ehash_size - 1))
 			dccp_hashinfo.ehash_size--;
 		dccp_hashinfo.ehash = (struct inet_ehash_bucket *)
 			__get_free_pages(GFP_ATOMIC, ehash_order);
@@ -686,7 +694,8 @@
 	do {
 		dccp_hashinfo.bhash_size = (1UL << bhash_order) * PAGE_SIZE /
 					sizeof(struct inet_bind_hashbucket);
-		if ((dccp_hashinfo.bhash_size > (64 * 1024)) && bhash_order > 0)
+		if ((dccp_hashinfo.bhash_size > (64 * 1024)) &&
+		    bhash_order > 0)
 			continue;
 		dccp_hashinfo.bhash = (struct inet_bind_hashbucket *)
 			__get_free_pages(GFP_ATOMIC, bhash_order);
diff --git a/net/dccp/timer.c b/net/dccp/timer.c
index 9f1f1ab..47b1616 100644
--- a/net/dccp/timer.c
+++ b/net/dccp/timer.c
@@ -45,11 +45,13 @@
 	if (sk->sk_state == DCCP_REQUESTING || sk->sk_state == DCCP_PARTOPEN) {
 		if (icsk->icsk_retransmits != 0)
 			dst_negative_advice(&sk->sk_dst_cache);
-		retry_until = icsk->icsk_syn_retries ? :  /* FIXME! */ 3 /* FIXME! sysctl_tcp_syn_retries */;
+		retry_until = icsk->icsk_syn_retries ? :
+			    /* FIXME! */ 3 /* FIXME! sysctl_tcp_syn_retries */;
 	} else {
-		if (icsk->icsk_retransmits >= /* FIXME! sysctl_tcp_retries1 */ 5 /* FIXME! */) {
-			/* NOTE. draft-ietf-tcpimpl-pmtud-01.txt requires pmtu black
-			   hole detection. :-(
+		if (icsk->icsk_retransmits >=
+		     /* FIXME! sysctl_tcp_retries1 */ 5 /* FIXME! */) {
+			/* NOTE. draft-ietf-tcpimpl-pmtud-01.txt requires pmtu
+			   black hole detection. :-(
 
 			   It is place to make it. It is not made. I do not want
 			   to make it. It is disguisting. It does not work in any
@@ -96,14 +98,17 @@
 		/* Try again later. */
 		icsk->icsk_ack.blocked = 1;
 		NET_INC_STATS_BH(LINUX_MIB_DELAYEDACKLOCKED);
-		sk_reset_timer(sk, &icsk->icsk_delack_timer, jiffies + TCP_DELACK_MIN);
+		sk_reset_timer(sk, &icsk->icsk_delack_timer,
+			       jiffies + TCP_DELACK_MIN);
 		goto out;
 	}
 
-	if (sk->sk_state == DCCP_CLOSED || !(icsk->icsk_ack.pending & ICSK_ACK_TIMER))
+	if (sk->sk_state == DCCP_CLOSED ||
+	    !(icsk->icsk_ack.pending & ICSK_ACK_TIMER))
 		goto out;
 	if (time_after(icsk->icsk_ack.timeout, jiffies)) {
-		sk_reset_timer(sk, &icsk->icsk_delack_timer, icsk->icsk_ack.timeout);
+		sk_reset_timer(sk, &icsk->icsk_delack_timer,
+			       icsk->icsk_ack.timeout);
 		goto out;
 	}
 
@@ -112,7 +117,8 @@
 	if (inet_csk_ack_scheduled(sk)) {
 		if (!icsk->icsk_ack.pingpong) {
 			/* Delayed ACK missed: inflate ATO. */
-			icsk->icsk_ack.ato = min(icsk->icsk_ack.ato << 1, icsk->icsk_rto);
+			icsk->icsk_ack.ato = min(icsk->icsk_ack.ato << 1,
+						 icsk->icsk_rto);
 		} else {
 			/* Delayed ACK missed: leave pingpong mode and
 			 * deflate ATO.
@@ -167,7 +173,7 @@
 		inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
 					  min(icsk->icsk_rto,
 					      TCP_RESOURCE_PROBE_INTERVAL),
-					  TCP_RTO_MAX);
+					  DCCP_RTO_MAX);
 		goto out;
 	}
 
@@ -175,7 +181,8 @@
 	icsk->icsk_retransmits++;
 
 	icsk->icsk_rto = min(icsk->icsk_rto << 1, DCCP_RTO_MAX);
-	inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto, TCP_RTO_MAX);
+	inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto,
+				  DCCP_RTO_MAX);
 	if (icsk->icsk_retransmits > 3 /* FIXME: sysctl_dccp_retries1 */)
 		__sk_dst_reset(sk);
 out:;
@@ -190,7 +197,8 @@
 	bh_lock_sock(sk);
 	if (sock_owned_by_user(sk)) {
 		/* Try again later */
-		sk_reset_timer(sk, &icsk->icsk_retransmit_timer, jiffies + (HZ / 20));
+		sk_reset_timer(sk, &icsk->icsk_retransmit_timer,
+			       jiffies + (HZ / 20));
 		goto out;
 	}
 
@@ -198,7 +206,8 @@
 		goto out;
 
 	if (time_after(icsk->icsk_timeout, jiffies)) {
-		sk_reset_timer(sk, &icsk->icsk_retransmit_timer, icsk->icsk_timeout);
+		sk_reset_timer(sk, &icsk->icsk_retransmit_timer,
+			       icsk->icsk_timeout);
 		goto out;
 	}
 
@@ -220,7 +229,8 @@
  */
 static void dccp_response_timer(struct sock *sk)
 {
-	inet_csk_reqsk_queue_prune(sk, TCP_SYNQ_INTERVAL, DCCP_TIMEOUT_INIT, DCCP_RTO_MAX);
+	inet_csk_reqsk_queue_prune(sk, TCP_SYNQ_INTERVAL, DCCP_TIMEOUT_INIT,
+				   DCCP_RTO_MAX);
 }
 
 static void dccp_keepalive_timer(unsigned long data)
