Patchwork bridge: Fix compilation warning in function br_stp_recalculate_bridge_id()

login
register
mail settings
Submitter Balaji G
Date March 29, 2011, 4:20 p.m.
Message ID <1301415604-3871-1-git-send-email-balajig81@gmail.com>
Download mbox | patch
Permalink /patch/88807/
State Accepted
Delegated to: David Miller
Headers show

Comments

Balaji G - March 29, 2011, 4:20 p.m.
net/bridge/br_stp_if.c: In function ‘br_stp_recalculate_bridge_id’:
net/bridge/br_stp_if.c:216:3: warning: ‘return’ with no value, in function returning non-void

Signed-off-by: G.Balaji <balajig81@gmail.com>
---
 net/bridge/br_stp_if.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
stephen hemminger - March 29, 2011, 6:10 p.m.
On Tue, 29 Mar 2011 21:50:04 +0530
"G.Balaji" <balajig81@gmail.com> wrote:

> net/bridge/br_stp_if.c: In function ‘br_stp_recalculate_bridge_id’:
> net/bridge/br_stp_if.c:216:3: warning: ‘return’ with no value, in function returning non-void
> 
> Signed-off-by: G.Balaji <balajig81@gmail.com>

Acked-by: Stephen Hemminger <shemminger@vyatta.com>

(Forget to refresh quilt patch before sending).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - March 30, 2011, 6:37 a.m.
From: Stephen Hemminger <shemminger@vyatta.com>

Date: Tue, 29 Mar 2011 11:10:38 -0700

> On Tue, 29 Mar 2011 21:50:04 +0530

> "G.Balaji" <balajig81@gmail.com> wrote:

> 

>> net/bridge/br_stp_if.c: In function ‘br_stp_recalculate_bridge_id’:

>> net/bridge/br_stp_if.c:216:3: warning: ‘return’ with no value, in function returning non-void

>> 

>> Signed-off-by: G.Balaji <balajig81@gmail.com>

> 

> Acked-by: Stephen Hemminger <shemminger@vyatta.com>

> 

> (Forget to refresh quilt patch before sending).


Applied.

Patch

diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 5593f5a..9b61d09 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -213,7 +213,7 @@  bool br_stp_recalculate_bridge_id(struct net_bridge *br)
 
 	/* user has chosen a value so keep it */
 	if (br->flags & BR_SET_MAC_ADDR)
-		return;
+		return false;
 
 	list_for_each_entry(p, &br->port_list, list) {
 		if (addr == br_mac_zero ||