diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2019-09-23 11:33:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-25 14:59:43 +0300 |
commit | 99dcb8432af062fffd5eb81692966a0de9ccc072 (patch) | |
tree | 6c3951e750d32b04d9f9c4dc2ea52f27b1e20fbe /drivers/net | |
parent | b0ce902febef24f917c33d5a5982030dac53141d (diff) | |
download | linux-99dcb8432af062fffd5eb81692966a0de9ccc072.tar.xz |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 35b59b5edf0f..8e8d557901a9 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 |