From: Jeff Kirsher <jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Cc: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-wireless
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH net-next] drivers/net: Remove boolean comparisons to true/false
Date: Thu, 09 Feb 2012 13:28:55 -0800 [thread overview]
Message-ID: <1328822935.2242.1.camel@jtkirshe-mobl> (raw)
In-Reply-To: <1328822243.29329.11.camel@joe2Laptop>
[-- Attachment #1: Type: text/plain, Size: 3145 bytes --]
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-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
> ---
> 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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-02-09 21:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 10:27 [net-next 0/7][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-02-09 10:27 ` [net-next 1/7] e1000e: remove test that is always false Jeff Kirsher
2012-02-09 10:27 ` [net-next 2/7] e1000e: remove unnecessary returns from void functions Jeff Kirsher
2012-02-09 10:27 ` [net-next 3/7] e1000e: remove unnecessary parentheses Jeff Kirsher
2012-02-09 10:27 ` [net-next 4/7] e1000e: use true/false for bool autoneg_false Jeff Kirsher
2012-02-09 13:15 ` David Laight
2012-02-09 18:34 ` David Miller
[not found] ` <20120209.133413.349832435589531136.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-02-09 21:17 ` [PATCH net-next] drivers/net: Remove boolean comparisons to true/false Joe Perches
2012-02-09 21:28 ` Jeff Kirsher [this message]
2012-02-09 22:36 ` Allan, Bruce W
2012-02-09 23:08 ` Joe Perches
2012-02-10 6:46 ` Julia Lawall
2012-02-10 9:32 ` David Laight
2012-02-10 9:50 ` Arend van Spriel
[not found] ` <AE90C24D6B3A694183C094C60CF0A2F6026B6E65-CgBM+Bx2aUAnGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2012-02-10 13:04 ` Eric Dumazet
2012-02-13 5:50 ` David Miller
2012-02-09 10:28 ` [net-next 6/7] e1000e: replace '1' with 'true' for boolean get_link_status Jeff Kirsher
2012-02-09 10:28 ` [net-next 7/7] igb: fix warning about unused function Jeff Kirsher
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=1328822935.2242.1.camel@jtkirshe-mobl \
--to=jeffrey.t.kirsher-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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