[<prev] [next>] [day] [month] [year] [list]
Message-ID: <0EA5B226BC5C7B45A71BF612AA8A019E01947ACBF7@AVMB1.qlogic.org>
Date: Fri, 10 Jul 2015 03:20:56 +0000
From: Sony Chacko <sony.chacko@...gic.com>
To: Nicholas Krause <xerofoify@...il.com>
CC: Dept-GE Linux NIC Dev <Dept-GELinuxNICDev@...gic.com>,
netdev <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] bnx2:Make various functions to have a return type of
void in the file bnx2.c
> -----Original Message-----
> From: Nicholas Krause [mailto:xerofoify@...il.com]
> Sent: Wednesday, July 08, 2015 11:31 AM
> To: Sony Chacko
> Cc: Dept-GE Linux NIC Dev; netdev; linux-kernel
> Subject: [PATCH] bnx2:Make various functions to have a return
> type of void in the file bnx2.c
>
> This makes various functions that never fail nor signal their caller
> with a error code when a failure occurs to now have a return
> type of void for the file bnx2.c.
>
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
> drivers/net/ethernet/broadcom/bnx2.c | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2.c
> b/drivers/net/ethernet/broadcom/bnx2.c
> index 2b66ef3..ddf0ccc 100644
> --- a/drivers/net/ethernet/broadcom/bnx2.c
> +++ b/drivers/net/ethernet/broadcom/bnx2.c
> @@ -1087,7 +1087,7 @@ bnx2_resolve_flow_ctrl(struct bnx2
> *bp)
> }
> }
>
> -static int
> +static void
> bnx2_5709s_linkup(struct bnx2 *bp)
> {
> u32 val, speed;
> @@ -1101,7 +1101,7 @@ bnx2_5709s_linkup(struct bnx2 *bp)
> if ((bp->autoneg & AUTONEG_SPEED) == 0) {
> bp->line_speed = bp->req_line_speed;
> bp->duplex = bp->req_duplex;
> - return 0;
> + return;
> }
> speed = val & MII_BNX2_GP_TOP_AN_SPEED_MSK;
> switch (speed) {
> @@ -1123,10 +1123,9 @@ bnx2_5709s_linkup(struct bnx2 *bp)
> bp->duplex = DUPLEX_FULL;
> else
> bp->duplex = DUPLEX_HALF;
> - return 0;
> }
>
> -static int
> +static void
> bnx2_5708s_linkup(struct bnx2 *bp)
> {
> u32 val;
> @@ -1152,10 +1151,9 @@ bnx2_5708s_linkup(struct bnx2 *bp)
> else
> bp->duplex = DUPLEX_HALF;
>
> - return 0;
> }
>
> -static int
> +static void
> bnx2_5706s_linkup(struct bnx2 *bp)
> {
> u32 bmcr, local_adv, remote_adv, common; @@ -1172,7
> +1170,7 @@ bnx2_5706s_linkup(struct bnx2 *bp)
> }
>
> if (!(bmcr & BMCR_ANENABLE)) {
> - return 0;
> + return;
> }
>
> bnx2_read_phy(bp, bp->mii_adv, &local_adv); @@ -1188,11
> +1186,9 @@ bnx2_5706s_linkup(struct bnx2 *bp)
> bp->duplex = DUPLEX_HALF;
> }
> }
> -
> - return 0;
> }
>
> -static int
> +static void
> bnx2_copper_linkup(struct bnx2 *bp)
> {
> u32 bmcr;
> @@ -1264,8 +1260,6 @@ bnx2_copper_linkup(struct bnx2 *bp)
> if (ext_status & EXT_STATUS_MDIX)
> bp->phy_flags |= BNX2_PHY_FLAG_MDIX;
> }
> -
> - return 0;
> }
>
> static void
> --
> 2.1.4
Acked-by: Sony Chacko <sony.chacko@...gic.com>
Thanks,
Sony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists