Skip to content

Commit

Permalink
net/bnxt: remove unused function parameters
Browse files Browse the repository at this point in the history
[ upstream commit 91f7a2d ]

1. Clean up unused function parameters.
2. Declare no external referenced function as static and remove
   their prototype from the header file.

Fixes: ec77c62 ("net/bnxt: add stats context allocation")
Fixes: 200b64b ("net/bnxt: free statistics context")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
Kalesh AP authored and steevenlee committed Jun 8, 2021
1 parent 5396d57 commit 52d2337
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 4 additions & 6 deletions drivers/net/bnxt/bnxt_hwrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1771,8 +1771,7 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
return rc;
}

int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
unsigned int idx __rte_unused)
static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
{
int rc;
struct hwrm_stat_ctx_alloc_input req = {.req_type = 0 };
Expand All @@ -1795,8 +1794,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
return rc;
}

int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
unsigned int idx __rte_unused)
static int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
{
int rc;
struct hwrm_stat_ctx_free_input req = {.req_type = 0 };
Expand Down Expand Up @@ -2461,7 +2459,7 @@ bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
bp->grp_info[i].fw_stats_ctx = -1;
}
if (cpr->hw_stats_ctx_id != HWRM_NA_SIGNATURE) {
rc = bnxt_hwrm_stat_ctx_free(bp, cpr, i);
rc = bnxt_hwrm_stat_ctx_free(bp, cpr);
cpr->hw_stats_ctx_id = HWRM_NA_SIGNATURE;
if (rc)
return rc;
Expand All @@ -2488,7 +2486,7 @@ int bnxt_alloc_all_hwrm_stat_ctxs(struct bnxt *bp)
cpr = rxq->cp_ring;
}

rc = bnxt_hwrm_stat_ctx_alloc(bp, cpr, i);
rc = bnxt_hwrm_stat_ctx_alloc(bp, cpr);

if (rc)
return rc;
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/bnxt/bnxt_hwrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx);
int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx);

int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr);
int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp,
struct bnxt_cp_ring_info *cpr, unsigned int idx);
int bnxt_hwrm_stat_ctx_free(struct bnxt *bp,
struct bnxt_cp_ring_info *cpr, unsigned int idx);
int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
struct rte_eth_stats *stats, uint8_t rx);

Expand Down

0 comments on commit 52d2337

Please sign in to comment.