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 4E290423F2; Mon, 16 Jan 2023 18:51:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C92D42D0E; Mon, 16 Jan 2023 18:51:35 +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 8351342D20 for ; Mon, 16 Jan 2023 18:51:33 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id gz9-20020a17090b0ec900b002290bda1b07so6895678pjb.1 for ; Mon, 16 Jan 2023 09:51:33 -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=59Aogq+s0p9pGvj/Aco1hOP4rz8YiSbMdje8y2YRMF9gHboyG5zOq/jLNzi6AvzWpz uyJ9K1niyqXd4fktQj+MNG40U4T18U9MHoM9LPDB/Mjl7ulcsGelj1vuW6Y3okd141eE 1hmhBDhRB5kWU1d4/q8ElNom158/UB2eF9/sxN1SR/CeLpphq29RoMIOrEin79jP1ISk Rvr6hZNEKvAa27CyfmbdvOOZqwZhXwQuBm5gzp3LbusLnlh5EsRuIlhvpWSEzWNyA8Dk mBOUdofpchjogWjU8uwwKgsoRDAXQ4wrpzIIB7RaHVsujmPgd6qbAszD5fZbKZTT5uV3 POng== 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=SKWIGGNj33paQNfTdbIMRO6/xNRIXPUjfdQxytoLJ4oXhKC1udm3BTIX1qVcyOcRdi uTwXAuG5ayjnHXcK+ZFk09aWcQI97xQhzSav4TQU920pfVb1DbPuwXPeA6wGs5CdrBpl lwwqYGPt5JBwxSGbnGHoPqM9PrZ9oq84dhl1U3syo7E6ZtU/kNvNvVFLQ6lnvydcP9dm pcmiKxS9wmsINcPhWLtVAT0u5krWHDFtD+Fr8ONB2nAo4FadArwQG/kl62rI8VoEDBWF faFvnQ1yiTc/zOo172tCiddp/TXwky78Zuu6Lv5xXTKmGCJNCWRFFdXzFpwnhfO5NsUX vAGw== X-Gm-Message-State: AFqh2krf4fFLtPAZYevpQuHfTjfMQcoo3NmuvkbJNIduBgwZWt1dE/ZT LMy5gmdy2DzqDnpmi8VD+Hg4W1CVxQqVt9+uVqE= X-Google-Smtp-Source: AMrXdXvZf3vjRqGuifiXeBgy6fVdVoNPybh4LqxU/WMTTp1nT/Ql/obcPPT7NB/u3VyLQ33R+MJVrA== X-Received: by 2002:a17:902:e045:b0:192:b40b:e41 with SMTP id x5-20020a170902e04500b00192b40b0e41mr19951653plx.61.1673891492465; Mon, 16 Jan 2023 09:51:32 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id k15-20020a170902d58f00b001947c22185bsm5035795plh.184.2023.01.16.09.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:51:32 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Simei Su , Wenjun Wu , Anatoly Burakov Subject: [PATCH v2 3/7] net/e1000: fix whitespace Date: Mon, 16 Jan 2023 09:51:23 -0800 Message-Id: <20230116175127.87346-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116175127.87346-1-stephen@networkplumber.org> References: <20230116172732.84976-1-stephen@networkplumber.org> <20230116175127.87346-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