DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bnxt: fix to remove unused function parameters
@ 2021-04-23  5:19 Kalesh A P
  2021-04-24 19:06 ` Ajit Khaparde
  0 siblings, 1 reply; 2+ messages in thread
From: Kalesh A P @ 2021-04-23  5:19 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, ajit.khaparde

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

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

Fixes: ec77c6298301 ("net/bnxt: add stats context allocation")
Fixes: 200b64ba0be8 ("net/bnxt: free statistics context")
Cc: stable@dpdk.org

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>
---
 drivers/net/bnxt/bnxt_hwrm.c | 10 ++++------
 drivers/net/bnxt/bnxt_hwrm.h |  4 ----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index cb2064d..931ecea 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1899,8 +1899,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 };
@@ -1923,8 +1922,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 };
@@ -2594,7 +2592,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;
@@ -2621,7 +2619,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;
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 0c2e32c..61b3050 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -168,10 +168,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);
 
-- 
2.10.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bnxt: fix to remove unused function parameters
  2021-04-23  5:19 [dpdk-dev] [PATCH] net/bnxt: fix to remove unused function parameters Kalesh A P
@ 2021-04-24 19:06 ` Ajit Khaparde
  0 siblings, 0 replies; 2+ messages in thread
From: Ajit Khaparde @ 2021-04-24 19:06 UTC (permalink / raw)
  To: Kalesh A P; +Cc: dpdk-dev, Ferruh Yigit

[-- Attachment #1: Type: text/plain, Size: 3605 bytes --]

On Thu, Apr 22, 2021 at 9:57 PM Kalesh A P
<kalesh-anakkur.purayil@broadcom.com> wrote:
>
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> 1. Clean up unused function parameters.
> 2. Declare no external referenced function as static and remove
>    their prototye from the header file.
>
> Fixes: ec77c6298301 ("net/bnxt: add stats context allocation")
> Fixes: 200b64ba0be8 ("net/bnxt: free statistics context")
> Cc: stable@dpdk.org
>
> 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>
Fixed typo - s/prototye/prototype during merge.

Patch applied to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_hwrm.c | 10 ++++------
>  drivers/net/bnxt/bnxt_hwrm.h |  4 ----
>  2 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index cb2064d..931ecea 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -1899,8 +1899,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 };
> @@ -1923,8 +1922,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 };
> @@ -2594,7 +2592,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;
> @@ -2621,7 +2619,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;
> diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
> index 0c2e32c..61b3050 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.h
> +++ b/drivers/net/bnxt/bnxt_hwrm.h
> @@ -168,10 +168,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);
>
> --
> 2.10.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-24 19:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23  5:19 [dpdk-dev] [PATCH] net/bnxt: fix to remove unused function parameters Kalesh A P
2021-04-24 19:06 ` Ajit Khaparde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).