diff mbox series

[RFC] net: macb: Remove dead code

Message ID 1569226782-19635-1-git-send-email-shubhrajyoti.datta@xilinx.com
State RFC
Delegated to: David Miller
Headers show
Series [RFC] net: macb: Remove dead code | expand

Commit Message

Shubhrajyoti Datta Sept. 23, 2019, 8:19 a.m. UTC
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>
---
 drivers/net/ethernet/cadence/macb_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--
2.1.1

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

Comments

David Miller Sept. 25, 2019, noon UTC | #1
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Date: Mon, 23 Sep 2019 13:49:42 +0530

> 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>

Applied.
diff mbox series

Patch

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