patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Junfeng Guo <junfeng.guo@intel.com>
To: qi.z.zhang@intel.com, qiming.yang@intel.com
Cc: dev@dpdk.org, stable@dpdk.org, ferruh.yigit@intel.com,
	junfeng.guo@intel.com, Bruce Allan <bruce.w.allan@intel.com>,
	Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Subject: [dpdk-stable] [PATCH v3 2/8] net/ice/base: cleanup some code style
Date: Fri, 10 Jul 2020 10:14:06 +0800
Message-ID: <20200710021412.3403562-3-junfeng.guo@intel.com> (raw)
In-Reply-To: <20200710021412.3403562-1-junfeng.guo@intel.com>

From: Qi Zhang <qi.z.zhang@intel.com>

Cleanup code style issue reported by kernel checkpatch.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h |  6 ++++--
 drivers/net/ice/base/ice_common.c     |  2 --
 drivers/net/ice/base/ice_flow.c       | 12 ++++++------
 drivers/net/ice/base/ice_sched.c      |  3 +--
 4 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 9ee5b4eb5..e17369f5e 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -2794,8 +2794,10 @@ struct ice_aq_desc {
 		struct ice_aqc_get_link_status get_link_status;
 		struct ice_aqc_event_lan_overflow lan_overflow;
 		struct ice_aqc_get_link_topo get_link_topo;
-		struct ice_aqc_set_health_status_config set_health_status_config;
-		struct ice_aqc_get_supported_health_status_codes get_supported_health_status_codes;
+		struct ice_aqc_set_health_status_config
+			set_health_status_config;
+		struct ice_aqc_get_supported_health_status_codes
+			get_supported_health_status_codes;
 		struct ice_aqc_get_health_status get_health_status;
 		struct ice_aqc_clear_health_status clear_health_status;
 	} params;
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 1683daf28..21044b071 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -193,14 +193,12 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode,
 	ice_debug(hw, ICE_DBG_LINK, "   module_type[2] = 0x%x\n",
 		  pcaps->module_type[2]);
 
-
 	if (status == ICE_SUCCESS && report_mode == ICE_AQC_REPORT_TOPO_CAP) {
 		pi->phy.phy_type_low = LE64_TO_CPU(pcaps->phy_type_low);
 		pi->phy.phy_type_high = LE64_TO_CPU(pcaps->phy_type_high);
 		ice_memcpy(pi->phy.link_info.module_type, &pcaps->module_type,
 			   sizeof(pi->phy.link_info.module_type),
 			   ICE_NONDMA_TO_NONDMA);
-
 	}
 
 	return status;
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 984fa90ce..9a17d956b 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -805,16 +805,16 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
 		}
 		if ((hdrs & ICE_FLOW_SEG_HDR_IPV4) &&
 		    (hdrs & ICE_FLOW_SEG_HDR_IPV_OTHER)) {
-			src = !i ?
-				(const ice_bitmap_t *)ice_ptypes_ipv4_ofos_all :
-				(const ice_bitmap_t *)ice_ptypes_ipv4_il;
+			src = i ?
+				(const ice_bitmap_t *)ice_ptypes_ipv4_il :
+				(const ice_bitmap_t *)ice_ptypes_ipv4_ofos_all;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
 		} else if ((hdrs & ICE_FLOW_SEG_HDR_IPV6) &&
 			   (hdrs & ICE_FLOW_SEG_HDR_IPV_OTHER)) {
-			src = !i ?
-				(const ice_bitmap_t *)ice_ptypes_ipv6_ofos_all :
-				(const ice_bitmap_t *)ice_ptypes_ipv6_il;
+			src = i ?
+				(const ice_bitmap_t *)ice_ptypes_ipv6_il :
+				(const ice_bitmap_t *)ice_ptypes_ipv6_ofos_all;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
 		} else if ((hdrs & ICE_FLOW_SEG_HDR_IPV4) &&
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 91847110b..8ee4b708e 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -5334,7 +5334,7 @@ void ice_sched_replay_agg(struct ice_hw *hw)
 
 	ice_acquire_lock(&pi->sched_lock);
 	LIST_FOR_EACH_ENTRY(agg_info, &hw->agg_list, ice_sched_agg_info,
-			    list_entry) {
+			    list_entry)
 		/* replay aggregator (re-create aggregator node) */
 		if (!ice_cmp_bitmap(agg_info->tc_bitmap,
 				    agg_info->replay_tc_bitmap,
@@ -5363,7 +5363,6 @@ void ice_sched_replay_agg(struct ice_hw *hw)
 				ice_info(hw, "Replay agg bw [id=%d] failed\n",
 					 agg_info->agg_id);
 		}
-	}
 	ice_release_lock(&pi->sched_lock);
 }
 
-- 
2.25.1


  parent reply	other threads:[~2020-07-10  2:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200701054951.2393-1-qi.z.zhang@intel.com>
2020-07-01  5:49 ` [dpdk-stable] [PATCH v2 1/8] net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist Qi Zhang
2020-07-01  5:49 ` [dpdk-stable] [PATCH v2 7/8] net/ice/base: clear and free XLT entries on reset Qi Zhang
2020-07-10  2:14 ` [dpdk-stable] [PATCH v3 0/8] update base code batch 3 Junfeng Guo
2020-07-10  2:14   ` [dpdk-stable] [PATCH v3 1/8] net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist Junfeng Guo
2020-07-10  2:14   ` Junfeng Guo [this message]
2020-07-10  2:14   ` [dpdk-stable] [PATCH v3 3/8] net/ice/base: move LLDP function to common module Junfeng Guo
2020-07-10  2:14   ` [dpdk-stable] [PATCH v3 4/8] net/ice/base: clean code in flow director module Junfeng Guo
2020-07-10  2:14   ` [dpdk-stable] [PATCH v3 5/8] net/ice/base: add capability list AQ function Junfeng Guo
2020-07-10  2:14   ` [dpdk-stable] [PATCH v3 6/8] net/ice/base: split capability parse into separate functions Junfeng Guo
2020-07-10  2:14   ` [dpdk-stable] [PATCH v3 7/8] net/ice/base: clear and free XLT entries on reset Junfeng Guo
2020-07-10  2:14   ` [dpdk-stable] [PATCH v3 8/8] net/ice/base: update version Junfeng Guo
2020-07-10  4:05   ` [dpdk-stable] [PATCH v3 0/8] update base code batch 3 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=20200710021412.3403562-3-junfeng.guo@intel.com \
    --to=junfeng.guo@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/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 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

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


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