From: Shubhrajyoti Datta Date: Mon, 23 Sep 2019 08:33:51 +0000 (+0530) Subject: net: macb: Remove dead code X-Git-Tag: v5.15~5389^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99dcb8432af062fffd5eb81692966a0de9ccc072;p=platform%2Fkernel%2Flinux-starfive.git net: macb: Remove dead code 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 Reviewed-by: Claudiu Beznea Signed-off-by: David S. Miller --- 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