Skip to content

Commit

Permalink
bnxt_en: remove redundant debug register dma mem allocation
Browse files Browse the repository at this point in the history
hwrm_dbg_resp_addr and hwrm_dbg_resp_dma_addr are never used
and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YueHaibing authored and David S. Miller committed Jul 16, 2018
1 parent 6e85d7a commit 48559af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
13 changes: 0 additions & 13 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3012,13 +3012,6 @@ static void bnxt_free_hwrm_resources(struct bnxt *bp)
bp->hwrm_cmd_resp_dma_addr);

bp->hwrm_cmd_resp_addr = NULL;
if (bp->hwrm_dbg_resp_addr) {
dma_free_coherent(&pdev->dev, HWRM_DBG_REG_BUF_SIZE,
bp->hwrm_dbg_resp_addr,
bp->hwrm_dbg_resp_dma_addr);

bp->hwrm_dbg_resp_addr = NULL;
}
}

static int bnxt_alloc_hwrm_resources(struct bnxt *bp)
Expand All @@ -3030,12 +3023,6 @@ static int bnxt_alloc_hwrm_resources(struct bnxt *bp)
GFP_KERNEL);
if (!bp->hwrm_cmd_resp_addr)
return -ENOMEM;
bp->hwrm_dbg_resp_addr = dma_alloc_coherent(&pdev->dev,
HWRM_DBG_REG_BUF_SIZE,
&bp->hwrm_dbg_resp_dma_addr,
GFP_KERNEL);
if (!bp->hwrm_dbg_resp_addr)
netdev_warn(bp->dev, "fail to alloc debug register dma mem\n");

return 0;
}
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1287,9 +1287,6 @@ struct bnxt {
dma_addr_t hwrm_short_cmd_req_dma_addr;
void *hwrm_cmd_resp_addr;
dma_addr_t hwrm_cmd_resp_dma_addr;
void *hwrm_dbg_resp_addr;
dma_addr_t hwrm_dbg_resp_dma_addr;
#define HWRM_DBG_REG_BUF_SIZE 128

struct rx_port_stats *hw_rx_port_stats;
struct tx_port_stats *hw_tx_port_stats;
Expand Down

0 comments on commit 48559af

Please sign in to comment.