Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1181186

RE: [PATCH] bnx2:Make various functions to have a return type of void in the file bnx2.c

From Sony Chacko <sony.chacko@qlogic.com>
Newsgroups linux.kernel
Subject RE: [PATCH] bnx2:Make various functions to have a return type of void in the file bnx2.c
Date 2015-07-10 05:30 +0200
Message-ID <pKxaF-wP-7@gated-at.bofh.it> (permalink)
References <pKxaG-wP-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> -----Original Message-----
> From: Nicholas Krause [mailto:xerofoify@gmail.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@gmail.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@qlogic.com>

Thanks,
Sony

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

RE: [PATCH] bnx2:Make various functions to have a return type of  void in the file bnx2.c Sony Chacko <sony.chacko@qlogic.com> - 2015-07-10 05:30 +0200

csiph-web