Patchwork [UPDATED,NET-NEXT,1/4] bnx2: In bnx2_set_mac_link() return void rather then int

login
register
mail settings
Submitter Benjamin Li
Date Sept. 18, 2008, 4:57 p.m.
Message ID <1221757033-4874-2-git-send-email-benli@broadcom.com>
Download mbox | patch
Permalink /patch/534/
State Accepted
Headers show

Comments

Benjamin Li - Sept. 18, 2008, 4:57 p.m.
bnx2_set_mac_link() doesn't need to return any error codes.  And
all the callers don't check the return code. It is safe to
change the return type to a void.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
David Miller - Sept. 18, 2008, 11:38 p.m.
From: "Benjamin Li" <benli@broadcom.com>
Date: Thu, 18 Sep 2008 09:57:10 -0700

> bnx2_set_mac_link() doesn't need to return any error codes.  And
> all the callers don't check the return code. It is safe to
> change the return type to a void.
> 
> Signed-off-by: Benjamin Li <benli@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

Patch

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 2486a65..192a24e 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1127,7 +1127,7 @@  bnx2_init_all_rx_contexts(struct bnx2 *bp)
 	}
 }
 
-static int
+static void
 bnx2_set_mac_link(struct bnx2 *bp)
 {
 	u32 val;
@@ -1193,8 +1193,6 @@  bnx2_set_mac_link(struct bnx2 *bp)
 
 	if (CHIP_NUM(bp) == CHIP_NUM_5709)
 		bnx2_init_all_rx_contexts(bp);
-
-	return 0;
 }
 
 static void