DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: haiyue.wang@intel.com, jia.guo@intel.com, dev@dpdk.org,
	ferruh.yigit@intel.com, Qi Zhang <qi.z.zhang@intel.com>,
	Bruce Allan <bruce.w.allan@intel.com>
Subject: [dpdk-dev] [PATCH 7/9] net/ice/base: cleanup style issues
Date: Fri,  8 Jan 2021 12:35:06 +0800
Message-ID: <20210108043508.301227-8-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20210108043508.301227-1-qi.z.zhang@intel.com>

A few style issues reported by checkpatch have snuck into the code,
resolve the style issues.

PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_controlq.h  | 4 ++--
 drivers/net/ice/base/ice_flex_type.h | 4 ++--
 drivers/net/ice/base/ice_flow.c      | 6 +++---
 drivers/net/ice/base/ice_sched.c     | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ice/base/ice_controlq.h b/drivers/net/ice/base/ice_controlq.h
index 161c1bebff..94e8bfcc98 100644
--- a/drivers/net/ice/base/ice_controlq.h
+++ b/drivers/net/ice/base/ice_controlq.h
@@ -15,8 +15,8 @@
 	(&(((struct ice_aq_desc *)((R).desc_buf.va))[i]))
 
 #define ICE_CTL_Q_DESC_UNUSED(R) \
-	(u16)((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
-	      (R)->next_to_clean - (R)->next_to_use - 1)
+	((u16)((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
+	       (R)->next_to_clean - (R)->next_to_use - 1))
 
 /* Defines that help manage the driver vs FW API checks.
  * Take a look at ice_aq_ver_check in ice_controlq.c for actual usage.
diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h
index 9b9503b3ba..53d396daef 100644
--- a/drivers/net/ice/base/ice_flex_type.h
+++ b/drivers/net/ice/base/ice_flex_type.h
@@ -670,8 +670,8 @@ struct ice_xlt1 {
 #define ICE_PF_NUM_S	13
 #define ICE_PF_NUM_M	(0x07 << ICE_PF_NUM_S)
 #define ICE_VSIG_VALUE(vsig, pf_id) \
-	(u16)((((u16)(vsig)) & ICE_VSIG_IDX_M) | \
-	      (((u16)(pf_id) << ICE_PF_NUM_S) & ICE_PF_NUM_M))
+	((u16)((((u16)(vsig)) & ICE_VSIG_IDX_M) | \
+	       (((u16)(pf_id) << ICE_PF_NUM_S) & ICE_PF_NUM_M)))
 #define ICE_DEFAULT_VSIG	0
 
 /* XLT2 Table */
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 15b43061c8..ad31856777 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -3533,9 +3533,9 @@ ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)
  *	     3 for tunneled with outer ipv6
  */
 #define ICE_FLOW_GEN_PROFID(hash, hdr, encap) \
-	(u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \
-	      (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \
-	      (((u64)(encap) << ICE_FLOW_PROF_ENCAP_S) & ICE_FLOW_PROF_ENCAP_M))
+	((u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \
+	       (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \
+	       (((u64)(encap) << ICE_FLOW_PROF_ENCAP_S) & ICE_FLOW_PROF_ENCAP_M)))
 
 static void
 ice_rss_config_xor_word(struct ice_hw *hw, u8 prof_id, u8 src, u8 dst)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 1cce8eaff1..53d76d17ee 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -4289,7 +4289,7 @@ ice_sched_set_node_bw_lmt(struct ice_port_info *pi, struct ice_sched_node *node,
 	ice_sched_rm_unused_rl_prof(hw);
 
 	layer_num = ice_sched_get_rl_prof_layer(pi, rl_type,
-		node->tx_sched_layer);
+						node->tx_sched_layer);
 	if (layer_num >= hw->num_tx_sched_layers)
 		return ICE_ERR_PARAM;
 
-- 
2.26.2


  parent reply	other threads:[~2021-01-08  4:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08  4:34 [dpdk-dev] [PATCH 0/9] ice base update batch 2 Qi Zhang
2021-01-08  4:35 ` [dpdk-dev] [PATCH 1/9] net/ice/base: align add VSI and update VSI AQ command buffer Qi Zhang
2021-01-08  4:35 ` [dpdk-dev] [PATCH 2/9] net/ice/base: remove the deprecated field Qi Zhang
2021-01-08  4:35 ` [dpdk-dev] [PATCH 3/9] net/ice/base: add package PTYPE enable information Qi Zhang
2021-01-08  4:35 ` [dpdk-dev] [PATCH 4/9] net/ice/base: fix for memory handling Qi Zhang
2021-01-08  4:35 ` [dpdk-dev] [PATCH 5/9] net/ice/base: limit forced overrides based on FW version Qi Zhang
2021-01-08  4:35 ` [dpdk-dev] [PATCH 6/9] net/ice/base: support GTPU inner for AVF FDIR Qi Zhang
2021-01-08  4:35 ` Qi Zhang [this message]
2021-01-08  4:35 ` [dpdk-dev] [PATCH 8/9] net/ice/base: updated the add scheduler node counter Qi Zhang
2021-01-08  4:35 ` [dpdk-dev] [PATCH 9/9] net/ice/base: update Copyright date Qi Zhang
2021-01-08  6:05 ` [dpdk-dev] [PATCH 0/9] ice base update batch 2 Yang, Qiming
2021-01-08  8:06   ` Zhang, Qi Z
2021-01-08 18:14     ` Ferruh Yigit

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=20210108043508.301227-8-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=haiyue.wang@intel.com \
    --cc=jia.guo@intel.com \
    --cc=qiming.yang@intel.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git