Skip to contentSkip to conversation

ixgbe: fix whitespace

PATCH Applied Stephen Hemminger 3 participants 3 messages Jan 13, 2016 – Feb 10, 2016 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: fix whitespace

Normally, I ignore random minor whitespace issues, but this driver seems to have some authors that don't understand the conventions of putting whitespace after keywords.

---
 drivers/net/ixgbe/ixgbe_bypass.c |  4 ++--
 drivers/net/ixgbe/ixgbe_ethdev.c | 50 ++++++++++++++++++++--------------------
 drivers/net/ixgbe/ixgbe_fdir.c   |  2 +-
 drivers/net/ixgbe/ixgbe_pf.c     |  2 +-
 drivers/net/ixgbe/ixgbe_rxtx.c   | 26 ++++++++++-----------
 5 files changed, 42 insertions(+), 42 deletions(-)
drivers/net/ixgbe/ixgbe_bypass.c +2 -2
index 832f415..4ff7719 100644
@@ -46,7 +46,7 @@
 			    __func__, __LINE__);            \
 		return retval;                            \
 	}                                                   \
-} while(0)
+} while (0)
 
 #define	FUNC_PTR_OR_RET(func) do {                          \
 	if ((func) == NULL) {                               \
@@ -54,7 +54,7 @@
 			    __func__, __LINE__);            \
 		return;                                     \
 	}                                                   \
-} while(0)
+} while (0)
 
 
 /**
drivers/net/ixgbe/ixgbe_ethdev.c +25 -25

180 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_fdir.c +1 -1
index e03219b..15b3611 100644
@@ -768,7 +768,7 @@ ixgbe_atr_compute_hash_82599(union ixgbe_atr_input *atr_input,
 	 *
 	 *    hi_hash_dword[31:0]  ^= Stream[351:320];
 	 *
-	 *    if(key[0])
+	 *    if (key[0])
 	 *        hash[15:0] ^= Stream[15:0];
 	 *
 	 *    for (i = 0; i < 16; i++) {
drivers/net/ixgbe/ixgbe_pf.c +1 -1
index 2ffbd1f..d60fd60 100644
@@ -286,7 +286,7 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)
 	 * enable vlan filtering and allow all vlan tags through
 	 */
         vlanctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
-        vlanctrl |= IXGBE_VLNCTRL_VFE ; /* enable vlan filters */
+        vlanctrl |= IXGBE_VLNCTRL_VFE; /* enable vlan filters */
         IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlanctrl);
 
         /* VFTA - enable all vlan filters */
drivers/net/ixgbe/ixgbe_rxtx.c +13 -13
index 52a263c..5971af0 100644
@@ -108,7 +108,7 @@ rte_rxmbuf_alloc(struct rte_mempool *mp)
  */
 #define rte_ixgbe_prefetch(p)   rte_prefetch0(p)
 #else
-#define rte_ixgbe_prefetch(p)   do {} while(0)
+#define rte_ixgbe_prefetch(p)   do {} while (0)
 #endif
 
 /*********************************************************************
@@ -2858,7 +2858,7 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)
 		pbsize = (uint16_t)(NIC_RX_BUFFER_SIZE / nb_tcs);
 		break;
 	}
-	for (i = 0 ; i < nb_tcs; i++) {
+	for (i = 0; i < nb_tcs; i++) {
 		uint32_t rxpbsize = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i));
 		rxpbsize &= (~(0x3FF << IXGBE_RXPBSIZE_SHIFT));
 		/* clear 10 bits. */
@@ -2904,7 +2904,7 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)
 
 	/* VLNCTRL: enable vlan filtering and allow all vlan tags through */
 	vlanctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
-	vlanctrl |= IXGBE_VLNCTRL_VFE ; /* enable vlan filters */
+	vlanctrl |= IXGBE_VLNCTRL_VFE; /* enable vlan filters */
 	IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlanctrl);
 
 	/* VFTA - enable all vlan filters */
@@ -3161,7 +3161,7 @@ ixgbe_dcb_rx_hw_config(struct ixgbe_hw *hw,
 
 	/* VLNCTRL: enable vlan filtering and allow all vlan tags through */
 	vlanctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
-	vlanctrl |= IXGBE_VLNCTRL_VFE ; /* enable vlan filters */
+	vlanctrl |= IXGBE_VLNCTRL_VFE; /* enable vlan filters */
 	IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlanctrl);
 
 	/* VFTA - enable all vlan filters */
@@ -3301,7 +3301,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 	nb_tcs = dcb_config->num_tcs.pfc_tcs;
 	/* Unpack map */
 	ixgbe_dcb_unpack_map_cee(dcb_config, IXGBE_DCB_RX_CONFIG, map);
-	if(nb_tcs == ETH_4_TCS) {
+	if (nb_tcs == ETH_4_TCS) {
 		/* Avoid un-configured priority mapping to TC0 */
 		uint8_t j = 4;
 		uint8_t mask = 0xFF;
@@ -3337,11 +3337,11 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 		break;
 	}
 
-	if(config_dcb_rx) {
+	if (config_dcb_rx) {
 		/* Set RX buffer size */
 		pbsize = (uint16_t)(rx_buffer_size / nb_tcs);
 		uint32_t rxpbsize = pbsize << IXGBE_RXPBSIZE_SHIFT;
-		for (i = 0 ; i < nb_tcs; i++) {
+		for (i = 0; i < nb_tcs; i++) {
 			IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpbsize);
 		}
 		/* zero alloc all unused TCs */
@@ -3349,7 +3349,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 			IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), 0);
 		}
 	}
-	if(config_dcb_tx) {
+	if (config_dcb_tx) {
 		/* Only support an equally distributed Tx packet buffer strategy. */
 		uint32_t txpktsize = IXGBE_TXPBSIZE_MAX / nb_tcs;
 		uint32_t txpbthresh = (txpktsize / DCB_TX_PB) - IXGBE_TXPKT_SIZE_MAX;
@@ -3370,7 +3370,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 	ixgbe_dcb_calculate_tc_credits_cee(hw, dcb_config,max_frame,
 				IXGBE_DCB_RX_CONFIG);
 
-	if(config_dcb_rx) {
+	if (config_dcb_rx) {
 		/* Unpack CEE standard containers */
 		ixgbe_dcb_unpack_refill_cee(dcb_config, IXGBE_DCB_RX_CONFIG, refill);
 		ixgbe_dcb_unpack_max_cee(dcb_config, max);
@@ -3380,7 +3380,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 		ixgbe_dcb_hw_arbite_rx_config(hw,refill,max,bwgid,tsa,map);
 	}
 
-	if(config_dcb_tx) {
+	if (config_dcb_tx) {
 		/* Unpack CEE standard containers */
 		ixgbe_dcb_unpack_refill_cee(dcb_config, IXGBE_DCB_TX_CONFIG, refill);
 		ixgbe_dcb_unpack_max_cee(dcb_config, max);
@@ -3394,7 +3394,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 	ixgbe_dcb_config_tc_stats_82599(hw, dcb_config);
 
 	/* Check if the PFC is supported */
-	if(dev->data->dev_conf.dcb_capability_en & ETH_DCB_PFC_SUPPORT) {
+	if (dev->data->dev_conf.dcb_capability_en & ETH_DCB_PFC_SUPPORT) {
 		pbsize = (uint16_t)(rx_buffer_size / nb_tcs);
 		for (i = 0; i < nb_tcs; i++) {
 			/*
@@ -3408,7 +3408,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
 			tc->pfc = ixgbe_dcb_pfc_enabled;
 		}
 		ixgbe_dcb_unpack_pfc_cee(dcb_config, map, &pfc_en);
-		if(dcb_config->num_tcs.pfc_tcs == ETH_4_TCS)
+		if (dcb_config->num_tcs.pfc_tcs == ETH_4_TCS)
 			pfc_en &= 0x0F;
 		ret = ixgbe_dcb_config_pfc(hw, pfc_en, map);
 	}
@@ -3483,7 +3483,7 @@ ixgbe_vmdq_rx_hw_configure(struct rte_eth_dev *dev)
 
 	/* VLNCTRL: enable vlan filtering and allow all vlan tags through */
 	vlanctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
-	vlanctrl |= IXGBE_VLNCTRL_VFE ; /* enable vlan filters */
+	vlanctrl |= IXGBE_VLNCTRL_VFE; /* enable vlan filters */
 	IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlanctrl);
 
 	/* VFTA - enable all vlan filters */
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, January 13, 2016 12:54 PM
To: Zhang, Helin <[email protected]>; Ananyev, Konstantin <[email protected]>
Cc: [email protected]; Stephen Hemminger <[email protected]>
Subject: [PATCH] ixgbe: fix whitespace

Normally, I ignore random minor whitespace issues, but this driver seems to have some authors that don't understand the conventions of putting whitespace after keywords.

#2 lore raw
Quoted 9 lines · Helin

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, January 13, 2016 12:54 PM
To: Zhang, Helin <[email protected]>; Ananyev, Konstantin <[email protected]>
Cc: [email protected]; Stephen Hemminger <[email protected]>
Subject: [PATCH] ixgbe: fix whitespace

Quoted 5 lines

Normally, I ignore random minor whitespace issues, but this driver seems to have some authors that don't understand the conventions of putting whitespace after keywords.

Pushed to dpdk-next-net/rel_16_04, including an additional 11 other whitespace fixes called out by checkpatch.

/Bruce