DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Su, Simei" <simei.su@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Wu, Wenjun1" <wenjun1.wu@intel.com>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: RE: [PATCH v3 3/7] net/e1000: fix whitespace
Date: Tue, 17 Jan 2023 01:26:19 +0000	[thread overview]
Message-ID: <SA1PR11MB66130C80580D7FC81DAE42DE9CC69@SA1PR11MB6613.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230117001453.94082-4-stephen@networkplumber.org>


> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Tuesday, January 17, 2023 8:15 AM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Su, Simei
> <simei.su@intel.com>; Wu, Wenjun1 <wenjun1.wu@intel.com>; Burakov,
> Anatoly <anatoly.burakov@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 <stephen@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 = &eth_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 = &eth_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.su@intel.com>

Thanks
Simei


  parent reply	other threads:[~2023-01-17  1:26 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 ` [PATCH 3/7] net/e1000: " Stephen Hemminger
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 [this message]
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=SA1PR11MB66130C80580D7FC81DAE42DE9CC69@SA1PR11MB6613.namprd11.prod.outlook.com \
    --to=simei.su@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --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).