DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Simei Su <simei.su@intel.com>, Wenjun Wu <wenjun1.wu@intel.com>
Subject: [PATCH 3/7] net/e1000: fix whitespace
Date: Mon, 16 Jan 2023 09:27:27 -0800	[thread overview]
Message-ID: <20230116172732.84976-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20230116172732.84976-1-stephen@networkplumber.org>

The style standard is to use blank after keywords.
I.e "if (" not "if("

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/e1000/em_ethdev.c  | 2 +-
 drivers/net/e1000/igb_ethdev.c | 8 ++++----
 drivers/net/e1000/igb_pf.c     | 2 +-
 drivers/net/e1000/igb_rxtx.c   | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 8ee9be12ad19..3cb09538b2df 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -872,7 +872,7 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 			E1000_DEV_PRIVATE_TO_STATS(dev->data->dev_private);
 	int pause_frames;
 
-	if(hw->phy.media_type == e1000_media_type_copper ||
+	if (hw->phy.media_type == e1000_media_type_copper ||
 			(E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) {
 		stats->symerrs += E1000_READ_REG(hw,E1000_SYMERRS);
 		stats->sec += E1000_READ_REG(hw, E1000_SEC);
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 8858f975f8cc..5c35b8349063 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1683,7 +1683,7 @@ igb_read_stats_registers(struct e1000_hw *hw, struct e1000_hw_stats *stats)
 	uint64_t old_rpthc = stats->rpthc;
 	uint64_t old_hgptc = stats->hgptc;
 
-	if(hw->phy.media_type == e1000_media_type_copper ||
+	if (hw->phy.media_type == e1000_media_type_copper ||
 	    (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)) {
 		stats->symerrs +=
 		    E1000_READ_REG(hw,E1000_SYMERRS);
@@ -3500,10 +3500,10 @@ static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on)
 
 	for (i = 0; i < IGB_VFTA_SIZE; i++){
 		vfta = shadow_vfta->vfta[i];
-		if(vfta){
+		if (vfta){
 			mask = 1;
 			for (j = 0; j < 32; j++){
-				if(vfta & mask)
+				if (vfta & mask)
 					igbvf_set_vfta(hw,
 						(uint16_t)((i<<5)+j), on);
 				mask<<=1;
@@ -3528,7 +3528,7 @@ igbvf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 
 	/*vind is not used in VF driver, set to 0, check ixgbe_set_vfta_vf*/
 	ret = igbvf_set_vfta(hw, vlan_id, !!on);
-	if(ret){
+	if (ret){
 		PMD_INIT_LOG(ERR, "Unable to set VF vlan");
 		return ret;
 	}
diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
index c7588ea57eaa..b1f74eb841d2 100644
--- a/drivers/net/e1000/igb_pf.c
+++ b/drivers/net/e1000/igb_pf.c
@@ -78,7 +78,7 @@ void igb_pf_host_init(struct rte_eth_dev *eth_dev)
 
 	if (hw->mac.type == e1000_i350)
 		nb_queue = 1;
-	else if(hw->mac.type == e1000_82576)
+	else if (hw->mac.type == e1000_82576)
 		/* per datasheet, it should be 2, but 1 seems correct */
 		nb_queue = 1;
 	else
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index f32dee46df82..2d4a1292053e 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -196,13 +196,13 @@ struct igb_tx_queue {
 #ifdef RTE_PMD_USE_PREFETCH
 #define rte_igb_prefetch(p)	rte_prefetch0(p)
 #else
-#define rte_igb_prefetch(p)	do {} while(0)
+#define rte_igb_prefetch(p)	do {} while (0)
 #endif
 
 #ifdef RTE_PMD_PACKET_PREFETCH
 #define rte_packet_prefetch(p) rte_prefetch1(p)
 #else
-#define rte_packet_prefetch(p)	do {} while(0)
+#define rte_packet_prefetch(p)	do {} while (0)
 #endif
 
 /*
@@ -2276,7 +2276,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
 		/* 011b Def_Q ignore, according to VT_CTL.DEF_PL */
 		mrqc |= 0x3 << E1000_MRQC_DEF_Q_SHIFT;
 		E1000_WRITE_REG(hw, E1000_MRQC, mrqc);
-	} else if(RTE_ETH_DEV_SRIOV(dev).active == 0) {
+	} else if (RTE_ETH_DEV_SRIOV(dev).active == 0) {
 		/*
 		 * SRIOV inactive scheme
 		 */
-- 
2.39.0


  parent reply	other threads:[~2023-01-16 17:27 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 17:27 [PATCH 0/7] space after keyword cleanups Stephen Hemminger
2023-01-16 17:27 ` [PATCH 1/7] test: fix whitespace Stephen Hemminger
2023-01-16 17:27 ` [PATCH 2/7] testpmd: " Stephen Hemminger
2023-01-16 17:27 ` Stephen Hemminger [this message]
2023-01-16 17:27 ` [PATCH 4/7] i40e: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 5/7] examples: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 6/7] cmdline: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 7/7] ip_frag: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 0/7] space after keyword cleanups Stephen Hemminger
2023-01-16 17:51   ` [PATCH v2 1/7] test: fix whitespace Stephen Hemminger
2023-01-16 17:51   ` [PATCH v2 2/7] testpmd: " Stephen Hemminger
2023-01-16 17:51   ` [PATCH v2 3/7] net/e1000: " Stephen Hemminger
2023-01-16 17:51   ` [PATCH v2 4/7] i40e: " Stephen Hemminger
2023-01-16 17:51   ` [PATCH v2 5/7] examples: " Stephen Hemminger
2023-01-16 17:51   ` [PATCH v2 6/7] cmdline: " Stephen Hemminger
2023-01-16 17:51   ` [PATCH v2 7/7] ip_frag: " Stephen Hemminger
2023-01-17  0:14 ` [PATCH v3 0/7] add space after keywords Stephen Hemminger
2023-01-17  0:14   ` [PATCH v3 1/7] test: fix whitespace Stephen Hemminger
2023-01-17  0:14   ` [PATCH v3 2/7] testpmd: " Stephen Hemminger
2023-01-31  8:21     ` Singh, Aman Deep
2023-01-17  0:14   ` [PATCH v3 3/7] net/e1000: " Stephen Hemminger
2023-01-17  1:21     ` Wu, Wenjun1
2023-01-17  1:26     ` Su, Simei
2023-01-17  0:14   ` [PATCH v3 4/7] i40e: " Stephen Hemminger
2023-01-17  0:26     ` Xing, Beilei
2023-01-17  0:14   ` [PATCH v3 5/7] examples: " Stephen Hemminger
2023-01-17  0:14   ` [PATCH v3 6/7] cmdline: " Stephen Hemminger
2023-01-17  0:14   ` [PATCH v3 7/7] ip_frag: " Stephen Hemminger
2023-01-22 16:00     ` Konstantin Ananyev
2023-03-12 11:28   ` [PATCH v3 0/7] add space after keywords Thomas Monjalon
2023-03-14 18:06     ` Stephen Hemminger
2023-03-14 18:17       ` Thomas Monjalon

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=20230116172732.84976-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=simei.su@intel.com \
    --cc=wenjun1.wu@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).