
From: Andrew Morton <akpm@osdl.org>

This:

include/linux/dccp.h: In function `dccp_role':
include/linux/dccp.h:429: warning: control reaches end of non-void function


and this (gcc-2.95 macro expansion bug workaround)

net/dccp/input.c: In function `dccp_check_seqno':
net/dccp/input.c:132: parse error before `)'

and this:

net/dccp/ipv4.c: In function `__dccp_v4_check_established':
net/dccp/ipv4.c:65: warning: duplicate `const'

and this:

net/dccp/output.c: In function `dccp_transmit_skb':
net/dccp/output.c:36: warning: duplicate `const'


ddcp_role() shouldn't be inlined: I think those strings will be instantiated
into each compilation unit (maybe latest gcc/ld are smart enough).  But
still...


The ddcp code looks yuk in an 80-col window.

Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 include/linux/dccp.h |    1 +
 net/dccp/dccp.h      |    2 +-
 net/dccp/ipv4.c      |    2 +-
 net/dccp/output.c    |    2 +-
 dccp/input.c         |    0 
 5 files changed, 4 insertions(+), 3 deletions(-)

diff -puN include/linux/dccp.h~git-net-ddcp-fixes include/linux/dccp.h
--- devel/include/linux/dccp.h~git-net-ddcp-fixes	2005-08-07 00:17:02.000000000 -0700
+++ devel-akpm/include/linux/dccp.h	2005-08-07 00:18:43.000000000 -0700
@@ -426,6 +426,7 @@ static inline const char *dccp_role(cons
 	case DCCP_ROLE_SERVER:	  return "server";
 	case DCCP_ROLE_CLIENT:	  return "client";
 	}
+	return NULL;
 }
 
 #endif /* _LINUX_DCCP_H */
diff -puN net/dccp/input.c~git-net-ddcp-fixes net/dccp/input.c
diff -puN net/dccp/dccp.h~git-net-ddcp-fixes net/dccp/dccp.h
--- devel/net/dccp/dccp.h~git-net-ddcp-fixes	2005-08-07 00:20:09.000000000 -0700
+++ devel-akpm/net/dccp/dccp.h	2005-08-07 00:20:24.000000000 -0700
@@ -23,7 +23,7 @@ extern int dccp_debug;
 
 #define dccp_pr_debug(format, a...) \
 	do { if (dccp_debug) \
-		printk(KERN_DEBUG "%s: " format, __FUNCTION__, ##a); \
+		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)
 #else
diff -puN net/dccp/ipv4.c~git-net-ddcp-fixes net/dccp/ipv4.c
--- devel/net/dccp/ipv4.c~git-net-ddcp-fixes	2005-08-07 00:22:07.000000000 -0700
+++ devel-akpm/net/dccp/ipv4.c	2005-08-07 00:22:14.000000000 -0700
@@ -62,7 +62,7 @@ static int __dccp_v4_check_established(s
 	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 const struct hlist_node *node;
+	const struct hlist_node *node;
 	struct inet_timewait_sock *tw;
 
 	write_lock(&head->lock);
diff -puN net/dccp/output.c~git-net-ddcp-fixes net/dccp/output.c
--- devel/net/dccp/output.c~git-net-ddcp-fixes	2005-08-07 00:22:54.000000000 -0700
+++ devel-akpm/net/dccp/output.c	2005-08-07 00:23:11.000000000 -0700
@@ -33,7 +33,7 @@ static inline void dccp_event_ack_sent(s
 int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
 {
 	if (likely(skb != NULL)) {
-		const const struct inet_sock *inet = inet_sk(sk);
+		const struct inet_sock *inet = inet_sk(sk);
 		struct dccp_sock *dp = dccp_sk(sk);
 		struct dccp_skb_cb *dcb = DCCP_SKB_CB(skb);
 		struct dccp_hdr *dh;
_
