> -----Original Message----- > From: Stephen Hemminger <step...@networkplumber.org> > Sent: Tuesday, January 17, 2023 8:15 AM > To: dev@dpdk.org > Cc: Stephen Hemminger <step...@networkplumber.org>; Su, Simei > <simei...@intel.com>; Wu, Wenjun1 <wenjun1...@intel.com>; Burakov, > Anatoly <anatoly.bura...@intel.com> > Subject: [PATCH v3 3/7] net/e1000: fix whitespace > > The style standard is to use blank after keywords. > I.e "if (" not "if(" > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> > --- > drivers/net/e1000/em_ethdev.c | 2 +- > drivers/net/e1000/igb_ethdev.c | 16 ++++++++-------- > drivers/net/e1000/igb_pf.c | 2 +- > drivers/net/e1000/igb_rxtx.c | 6 +++--- > 4 files changed, 13 insertions(+), 13 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..e89bfa248fb0 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -735,7 +735,7 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev) > /* for secondary processes, we don't initialise any further as primary > * has already done this work. Only check we don't need a different > * RX function */ > - if (rte_eal_process_type() != RTE_PROC_PRIMARY){ > + if (rte_eal_process_type() != RTE_PROC_PRIMARY) { > if (eth_dev->data->scattered_rx) > eth_dev->rx_pkt_burst = ð_igb_recv_scattered_pkts; > return 0; > @@ -927,7 +927,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev) > /* for secondary processes, we don't initialise any further as primary > * has already done this work. Only check we don't need a different > * RX function */ > - if (rte_eal_process_type() != RTE_PROC_PRIMARY){ > + if (rte_eal_process_type() != RTE_PROC_PRIMARY) { > if (eth_dev->data->scattered_rx) > eth_dev->rx_pkt_burst = ð_igb_recv_scattered_pkts; > return 0; > @@ -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); @@ -3498,12 > +3498,12 @@ static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on) > E1000_DEV_PRIVATE_TO_VFTA(dev->data->dev_private); > int i = 0, j = 0, vfta = 0, mask = 1; > > - for (i = 0; i < IGB_VFTA_SIZE; i++){ > + 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) > + for (j = 0; j < 32; j++) { > + 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
Acked-by: Simei Su <simei...@intel.com> Thanks Simei