Skip to content

Commit 48559af

Browse files
YueHaibingdavem330
authored andcommitted
bnxt_en: remove redundant debug register dma mem allocation
hwrm_dbg_resp_addr and hwrm_dbg_resp_dma_addr are never used and can be removed. Signed-off-by: YueHaibing <[email protected]> Acked-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6e85d7a commit 48559af

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,13 +3012,6 @@ static void bnxt_free_hwrm_resources(struct bnxt *bp)
30123012
bp->hwrm_cmd_resp_dma_addr);
30133013

30143014
bp->hwrm_cmd_resp_addr = NULL;
3015-
if (bp->hwrm_dbg_resp_addr) {
3016-
dma_free_coherent(&pdev->dev, HWRM_DBG_REG_BUF_SIZE,
3017-
bp->hwrm_dbg_resp_addr,
3018-
bp->hwrm_dbg_resp_dma_addr);
3019-
3020-
bp->hwrm_dbg_resp_addr = NULL;
3021-
}
30223015
}
30233016

30243017
static int bnxt_alloc_hwrm_resources(struct bnxt *bp)
@@ -3030,12 +3023,6 @@ static int bnxt_alloc_hwrm_resources(struct bnxt *bp)
30303023
GFP_KERNEL);
30313024
if (!bp->hwrm_cmd_resp_addr)
30323025
return -ENOMEM;
3033-
bp->hwrm_dbg_resp_addr = dma_alloc_coherent(&pdev->dev,
3034-
HWRM_DBG_REG_BUF_SIZE,
3035-
&bp->hwrm_dbg_resp_dma_addr,
3036-
GFP_KERNEL);
3037-
if (!bp->hwrm_dbg_resp_addr)
3038-
netdev_warn(bp->dev, "fail to alloc debug register dma mem\n");
30393026

30403027
return 0;
30413028
}

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,9 +1287,6 @@ struct bnxt {
12871287
dma_addr_t hwrm_short_cmd_req_dma_addr;
12881288
void *hwrm_cmd_resp_addr;
12891289
dma_addr_t hwrm_cmd_resp_dma_addr;
1290-
void *hwrm_dbg_resp_addr;
1291-
dma_addr_t hwrm_dbg_resp_dma_addr;
1292-
#define HWRM_DBG_REG_BUF_SIZE 128
12931290

12941291
struct rx_port_stats *hw_rx_port_stats;
12951292
struct tx_port_stats *hw_tx_port_stats;

0 commit comments

Comments
 (0)