[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <804857E1F29AAC47BF68C404FC60A1842709C1@ORSMSX102.amr.corp.intel.com>
Date: Thu, 9 Feb 2012 22:36:16 +0000
From: "Allan, Bruce W" <bruce.w.allan@...el.com>
To: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
Joe Perches <joe@...ches.com>
CC: David Miller <davem@...emloft.net>,
"David.Laight@...LAB.COM" <David.Laight@...LAB.COM>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
linux-wireless <linux-wireless@...r.kernel.org>
Subject: RE: [PATCH net-next] drivers/net: Remove boolean comparisons to
true/false
> -----Original Message-----
> From: netdev-owner@...r.kernel.org [mailto:netdev-
> owner@...r.kernel.org] On Behalf Of Jeff Kirsher
> Sent: Thursday, February 09, 2012 1:29 PM
> To: Joe Perches
> Cc: David Miller; David.Laight@...LAB.COM; netdev@...r.kernel.org;
> linux-wireless
> Subject: Re: [PATCH net-next] drivers/net: Remove boolean comparisons
> to true/false
>
> On Thu, 2012-02-09 at 13:17 -0800, Joe Perches wrote:
> > Booleans should not be compared to true or false
> > but be directly tested or tested with !.
> >
> > Done via cocci script:
> >
> > @@
> > bool t;
> > @@
> > - t == true
> > + t
> > @@
> > bool t;
> > @@
> > - t != true
> > + !t
> > @@
> > bool t;
> > @@
> > - t == false
> > + !t
> > @@
> > bool t;
> > @@
> > - t != false
> > + t
> >
> > Signed-off-by: Joe Perches <joe@...ches.com>
> > ---
> > drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 3 +--
> > drivers/net/ethernet/brocade/bna/bfa_cee.c | 8 ++++----
> > drivers/net/ethernet/brocade/bna/bfa_ioc.c | 2 +-
> > drivers/net/ethernet/intel/ixgb/ixgb_ee.c | 12
> > +++++-------
> > drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 4 ++--
> > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
> > drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 2 +-
> > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +-
> > drivers/net/phy/broadcom.c | 6 ++----
> > drivers/net/wireless/ath/ath5k/ani.c | 8 ++++----
> > drivers/net/wireless/ath/ath9k/ani.c | 6 +++---
> > drivers/net/wireless/ath/ath9k/hw-ops.h | 2 +-
> > drivers/net/wireless/ath/ath9k/hw.c | 5 ++---
> > drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 16
> > +++++++---------
> > drivers/net/wireless/brcm80211/brcmsmac/main.c | 4 ++--
> > .../net/wireless/brcm80211/brcmsmac/phy/phy_n.c | 2 +-
> > drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 4 ++--
> > drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 2 +-
> > drivers/net/wireless/mwl8k.c | 5 ++---
> > drivers/net/wireless/rtlwifi/efuse.c | 2 +-
> > drivers/net/wireless/rtlwifi/ps.c | 3 +--
> > drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 4 ++--
> > drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 8 ++++----
> > drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 9 ++++-----
> > drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 3 +--
> > drivers/net/wireless/rtlwifi/rtl8192ce/rf.c | 2 +-
> > drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 3 +--
> > drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 2 +-
> > drivers/net/wireless/rtlwifi/rtl8192de/dm.c | 2 +-
> > drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 9 ++++-----
> > drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 11 +++++----
> --
> > drivers/net/wireless/rtlwifi/rtl8192de/rf.c | 2 +-
> > drivers/net/wireless/rtlwifi/rtl8192se/fw.c | 6 +++---
> > drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 10 +++++----
> -
> > drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 13
> > ++++++-------
> > drivers/net/wireless/rtlwifi/rtl8192se/rf.c | 2 +-
> > 36 files changed, 85 insertions(+), 101 deletions(-)
>
> The ixgbe changes look fine, and I do not see any issues with the
> changes.
>
> Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Has the cocci script been (or will it be) added to ./scripts/coccinelle?
Powered by blists - more mailing lists