Netdev List
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <shubhrajyoti.datta@gmail.com>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Cc: <Nicolas.Ferre@microchip.com>, <shubhrajyoti.datta@xilinx.com>
Subject: Re: [PATCHv1] net: macb: Remove dead code
Date: Mon, 23 Sep 2019 11:40:45 +0000	[thread overview]
Message-ID: <57bd88d3-95d8-56c0-67ca-1539e24313d2@microchip.com> (raw)
In-Reply-To: <1569227631-32617-1-git-send-email-shubhrajyoti.datta@gmail.com>



On 23.09.2019 11:33, shubhrajyoti.datta@gmail.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> 
> macb_64b_desc is always called when HW_DMA_CAP_64B is defined.
> So the return NULL can never be reached. Remove the dead code.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>

> ---
>  drivers/net/ethernet/cadence/macb_main.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 35b59b5..8e8d557 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -165,9 +165,8 @@ static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx
>  #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
>  static struct macb_dma_desc_64 *macb_64b_desc(struct macb *bp, struct macb_dma_desc *desc)
>  {
> -	if (bp->hw_dma_cap & HW_DMA_CAP_64B)
> -		return (struct macb_dma_desc_64 *)((void *)desc + sizeof(struct macb_dma_desc));
> -	return NULL;
> +	return (struct macb_dma_desc_64 *)((void *)desc
> +		+ sizeof(struct macb_dma_desc));
>  }
>  #endif
>  
> 

      reply	other threads:[~2019-09-23 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23  8:33 [PATCHv1] net: macb: Remove dead code shubhrajyoti.datta
2019-09-23 11:40 ` Claudiu.Beznea [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57bd88d3-95d8-56c0-67ca-1539e24313d2@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shubhrajyoti.datta@gmail.com \
    --cc=shubhrajyoti.datta@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox