From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Date: Fri, 19 Feb 2010 05:55:22 +0000 Subject: [RFC 2/2] SCTP: fix sparse warning Message-Id: <20100219055628.517807379@vyatta.com> List-Id: References: <20100219055520.223027612@vyatta.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vlad Yasevich , Sridhar Samudrala , "David S. Miller" , "Paul E. McKenney" Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org The variable node shadows earlier one in same function. Signed-off-by: Stephen Hemminger --- a/net/sctp/socket.c 2010-02-18 10:06:57.656887238 -0800 +++ b/net/sctp/socket.c 2010-02-18 10:07:09.894132363 -0800 @@ -5478,7 +5478,7 @@ pp_found: */ int reuse = sk->sk_reuse; struct sock *sk2; - struct hlist_node *node; + struct hlist_node *node2; SCTP_DEBUG_PRINTK("sctp_get_port() found a possible match\n"); if (pp->fastreuse && sk->sk_reuse && @@ -5495,7 +5495,7 @@ pp_found: * that this port/socket (sk) combination are already * in an endpoint. */ - sk_for_each_bound(sk2, node, &pp->owner) { + sk_for_each_bound(sk2, node2, &pp->owner) { struct sctp_endpoint *ep2; ep2 = sctp_sk(sk2)->ep; -- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [RFC 2/2] SCTP: fix sparse warning Date: Thu, 18 Feb 2010 21:55:22 -0800 Message-ID: <20100219055628.517807379@vyatta.com> References: <20100219055520.223027612@vyatta.com> Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org To: Vlad Yasevich , Sridhar Samudrala , "David S. Miller" , "Paul E. McKenney" Return-path: Received: from suva.vyatta.com ([76.74.103.44]:34719 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752492Ab0BSF7O (ORCPT ); Fri, 19 Feb 2010 00:59:14 -0500 Content-Disposition: inline; filename=sctp-sparse.patch Sender: netdev-owner@vger.kernel.org List-ID: The variable node shadows earlier one in same function. Signed-off-by: Stephen Hemminger --- a/net/sctp/socket.c 2010-02-18 10:06:57.656887238 -0800 +++ b/net/sctp/socket.c 2010-02-18 10:07:09.894132363 -0800 @@ -5478,7 +5478,7 @@ pp_found: */ int reuse = sk->sk_reuse; struct sock *sk2; - struct hlist_node *node; + struct hlist_node *node2; SCTP_DEBUG_PRINTK("sctp_get_port() found a possible match\n"); if (pp->fastreuse && sk->sk_reuse && @@ -5495,7 +5495,7 @@ pp_found: * that this port/socket (sk) combination are already * in an endpoint. */ - sk_for_each_bound(sk2, node, &pp->owner) { + sk_for_each_bound(sk2, node2, &pp->owner) { struct sctp_endpoint *ep2; ep2 = sctp_sk(sk2)->ep; --