All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alvin Zhang <alvinx.zhang@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, Alvin Zhang <alvinx.zhang@intel.com>, stable@dpdk.org
Subject: [PATCH] net/iavf: fix pointer of meter data
Date: Thu, 11 Nov 2021 10:49:43 +0800	[thread overview]
Message-ID: <20211111024943.7612-1-alvinx.zhang@intel.com> (raw)

This patch fixes coverity issue by directly passing the address
of the meter data to subfunction.

Coverity issue: 373858

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 55d8a11..5e0888e 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -1261,10 +1261,9 @@ struct rss_attr_type {
 static int
 iavf_hash_parse_action(struct iavf_pattern_match_item *match_item,
 		       const struct rte_flow_action actions[],
-		       uint64_t pattern_hint, void **meta,
+		       uint64_t pattern_hint, struct iavf_rss_meta *rss_meta,
 		       struct rte_flow_error *error)
 {
-	struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
 	struct virtchnl_proto_hdrs *proto_hdrs;
 	enum rte_flow_action_type action_type;
 	const struct rte_flow_action_rss *rss;
@@ -1378,7 +1377,7 @@ struct rss_attr_type {
 		goto error;
 
 	ret = iavf_hash_parse_action(pattern_match_item, actions, phint,
-				     (void **)&rss_meta_ptr, error);
+				     rss_meta_ptr, error);
 
 error:
 	if (!ret && meta)
-- 
1.8.3.1


             reply	other threads:[~2021-11-11  2:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  2:49 Alvin Zhang [this message]
2021-11-11  6:31 ` [PATCH v2] net/iavf: fix pointer of meter data Alvin Zhang
2021-11-11 13:12   ` Zhang, Qi Z
2021-11-11 17:21   ` Ferruh Yigit
2021-11-11 23:53     ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211111024943.7612-1-alvinx.zhang@intel.com \
    --to=alvinx.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.