Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <shubhrajyoti.datta@xilinx.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Shubhrajyoti Datta and committed by
David S. Miller
99dcb843 b0ce902f

+2 -3
+2 -3
drivers/net/ethernet/cadence/macb_main.c
··· 165 165 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT 166 166 static struct macb_dma_desc_64 *macb_64b_desc(struct macb *bp, struct macb_dma_desc *desc) 167 167 { 168 - if (bp->hw_dma_cap & HW_DMA_CAP_64B) 169 - return (struct macb_dma_desc_64 *)((void *)desc + sizeof(struct macb_dma_desc)); 170 - return NULL; 168 + return (struct macb_dma_desc_64 *)((void *)desc 169 + + sizeof(struct macb_dma_desc)); 171 170 } 172 171 #endif 173 172