From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <sthemmin@microsoft.com>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 2/5] kni: remove (redundant) parenthesis
Date: Thu, 14 Dec 2017 15:32:18 -0800 [thread overview]
Message-ID: <20171214233221.30928-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20171214233221.30928-1-stephen@networkplumber.org>
From: Stephen Hemminger <sthemmin@microsoft.com>
Don't need parens on simple if expression
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 4 ++--
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_common.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index 99338c5c8071..089fd4962a07 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -2993,7 +2993,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
case e1000_i211:
/* Enable EEE for internal copper PHY devices */
err = e1000_set_eee_i350(hw);
- if ((!err) &&
+ if (!err &&
(adapter->flags & IGB_FLAG_EEE))
adapter->eee_advert =
MDIO_EEE_100TX | MDIO_EEE_1000T;
@@ -4988,7 +4988,7 @@ static void igb_update_itr(struct igb_q_vector *q_vector,
itrval = bulk_latency;
} else if ((packets < 10) || ((bytes/packets) > 1200)) {
itrval = bulk_latency;
- } else if ((packets > 35)) {
+ } else if (packets > 35) {
itrval = lowest_latency;
}
} else if (bytes/packets > 2000) {
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_common.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_common.c
index 2c861de5d6e7..1a1cfe574cd1 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_common.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_common.c
@@ -2415,7 +2415,7 @@ s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw)
static s32 ixgbe_negotiate_fc(struct ixgbe_hw *hw, u32 adv_reg, u32 lp_reg,
u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm)
{
- if ((!(adv_reg)) || (!(lp_reg)))
+ if (!adv_reg || !lp_reg)
return IXGBE_ERR_FC_NOT_NEGOTIATED;
if ((adv_reg & adv_sym) && (lp_reg & lp_sym)) {
@@ -3279,7 +3279,7 @@ s32 ixgbe_set_vfta_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind,
vfta_changed = true;
}
} else {
- if ((vfta & targetbit)) {
+ if (vfta & targetbit) {
vfta &= ~targetbit;
vfta_changed = true;
}
@@ -3392,7 +3392,7 @@ s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind,
if (bits) {
IXGBE_WRITE_REG(hw, IXGBE_VLVF(vlvf_index),
(IXGBE_VLVF_VIEN | vlan));
- if ((!vlan_on) && (vfta_changed != NULL)) {
+ if (!vlan_on && (vfta_changed != NULL)) {
/* someone wants to clear the vfta entry
* but some pools/VFs are still using it.
* Ignore it. */
--
2.11.0
next prev parent reply other threads:[~2017-12-14 23:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 23:32 [dpdk-dev] [PATCH 0/5] remove double parenthesis Stephen Hemminger
2017-12-14 23:32 ` [dpdk-dev] [PATCH 1/5] bnx2x: remove (redundant) parenthesis Stephen Hemminger
2017-12-14 23:32 ` Stephen Hemminger [this message]
2017-12-14 23:32 ` [dpdk-dev] [PATCH 3/5] ethdev: " Stephen Hemminger
2017-12-14 23:32 ` [dpdk-dev] [PATCH 4/5] distributor: remove (unnecessary) parenthesis Stephen Hemminger
2017-12-14 23:32 ` [dpdk-dev] [PATCH 5/5] loadbalancer: " Stephen Hemminger
2018-01-05 21:09 ` [dpdk-dev] [PATCH 0/5] remove double parenthesis 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=20171214233221.30928-3-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=sthemmin@microsoft.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).