lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 23 Sep 2019 11:40:45 +0000
From:   <Claudiu.Beznea@...rochip.com>
To:     <shubhrajyoti.datta@...il.com>, <davem@...emloft.net>,
        <netdev@...r.kernel.org>
CC:     <Nicolas.Ferre@...rochip.com>, <shubhrajyoti.datta@...inx.com>
Subject: Re: [PATCHv1] net: macb: Remove dead code



On 23.09.2019 11:33, shubhrajyoti.datta@...il.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.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@...inx.com>

Reviewed-by: Claudiu Beznea <claudiu.beznea@...rochip.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
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ