From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1CE4B423F4; Tue, 17 Jan 2023 01:15:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 373E642D25; Tue, 17 Jan 2023 01:15:01 +0100 (CET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id 6DAA642D18 for ; Tue, 17 Jan 2023 01:14:59 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id a14-20020a17090a70ce00b00229a2f73c56so313630pjm.3 for ; Mon, 16 Jan 2023 16:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BUrx+yG5EZIqit2nRTfSrOyBL0uAzgEtxGzE+Gj3T3w=; b=8VgpPK4/BwH1+43/qkfJmKpQU1vHZIV7g6n+oLw4KYeP4ObJL2ac8HxuyYrgV/D82g Yk4kCx5SEuaIRd1VZ+oWGx2Tox7XOd/zUjoPR55LWSc0HXuVOOT39jWzGs/M0sqY1Bss JP4Iqb5yfb2kl8Ub615Dn/230PjxY+/LHq8+Tdzda8B7RE7Ccgr4WMHAMr5z8xXhPsZN CDqlVTfK4NSl+naXW3T2PufoWmNtkcu4WbtZx9JzKKvY7OtDmGPijWSameDwoSXzUVNy tDdX4fG4jVR8EjjNxR+0HJT7EVSCR1cPTXJMi793d4QO5CmQvCO3yJAtRwFYyc3gWdRn W7Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BUrx+yG5EZIqit2nRTfSrOyBL0uAzgEtxGzE+Gj3T3w=; b=PADhmZfKnPjL617/rwc2stiIsdjAzUCTH+IUixeabHvRTnlsTfH4ocosPDeXUVeaot NRb/fvBlozqlm319cLsvgpQxQtz0dnHshWSvtgyj3PiHKaqj/f7KnZAEH7CSMj1J/Os0 4JC6bUj/TtphXG2FRxwoqIjf0P1Bq9muqNhMvieD+txsWAELYrHkR2eabrlJTzmaxHyI Sil21X185HhyiKSFWXZ021SN7L1r1++ZQq5zWLTyFbpu4mDZ1W9JWfiNOfD+HqVmuNBv oWXwknW9Jxp2s/1/pZwZzHIYCIT3NDI+/eLn+GrGft8veUy78UFsihkHz4HlNdE96I3T C1mw== X-Gm-Message-State: AFqh2koxqigIedkkwty7EdLHHlaj8YLiUho/FYuhPuJ3bd2DC9oQv5hy r+5LWsVKSLlNYszrpoYgYmD/wIRX6spiBu1VGus= X-Google-Smtp-Source: AMrXdXvafre1hSOvs8IaF+VMfU3qWIgj80zpoml3d5JR7hesh+8gv94zYVY1ctXkMyC2+L57bworvg== X-Received: by 2002:a17:90a:3f8b:b0:229:32be:5027 with SMTP id m11-20020a17090a3f8b00b0022932be5027mr1071583pjc.18.1673914498354; Mon, 16 Jan 2023 16:14:58 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id z24-20020a630a58000000b004790eb3fee1sm15940614pgk.90.2023.01.16.16.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 16:14:58 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Simei Su , Wenjun Wu , Anatoly Burakov Subject: [PATCH v3 3/7] net/e1000: fix whitespace Date: Mon, 16 Jan 2023 16:14:49 -0800 Message-Id: <20230117001453.94082-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117001453.94082-1-stephen@networkplumber.org> References: <20230116172732.84976-1-stephen@networkplumber.org> <20230117001453.94082-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The style standard is to use blank after keywords. I.e "if (" not "if(" Signed-off-by: Stephen Hemminger --- 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