From: Joe Perches <joe@perches.com>
To: "Skidmore, Donald C" <donald.c.skidmore@intel.com>,
Bruce Allan <bruce.w.allan@intel.com>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"gospo@redhat.com" <gospo@redhat.com>,
"sassmann@redhat.com" <sassmann@redhat.com>
Subject: Re: [net-next 06/10] ixgbe: cleanup some log messages
Date: Wed, 28 Aug 2013 09:36:53 -0700 [thread overview]
Message-ID: <1377707813.1928.30.camel@joe-AO722> (raw)
In-Reply-To: <F6FB0E698C9B3143BDF729DF222866466FD4530B@ORSMSX110.amr.corp.intel.com>
On Wed, 2013-08-28 at 16:19 +0000, Skidmore, Donald C wrote:
> > -----Original Message-----
> > From: Joe Perches [mailto:joe@perches.com]
[]
> > At some point it might be nice to remove the remaining bool direct
> > comparisons to true/false
> >
> > $ git grep -E -n "(==|!=)\s*(true|false)" drivers/net/ethernet/intel
> > drivers/net/ethernet/intel/e1000e/netdev.c:4871:
> > (hw->mac.autoneg == true) &&
> > drivers/net/ethernet/intel/e1000e/phy.c:2651: * Assumes semaphore is
> > already acquired. When page_set==true, assumes
> > drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c:763: if (hw-
> > >phy.reset_disable == false) {
[etc...]
> Thanks for pointing this out Joe.
Just a bit of code style ocd... ;)
> I'll [] talk with the e1000e owner about doing it with their driver.
I believe the e1000e driver isn't using a bool
comparison as autoneg is a u8, but it could still use
hw->mac.autoneg
for consistency with the other tests in the same driver.
Maybe:
---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 2fead50..be9c033 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -4869,7 +4869,7 @@ static void e1000_watchdog_task(struct work_struct *work)
*/
if ((hw->phy.type == e1000_phy_igp_3 ||
hw->phy.type == e1000_phy_bm) &&
- (hw->mac.autoneg == true) &&
+ hw->mac.autoneg &&
(adapter->link_speed == SPEED_10 ||
adapter->link_speed == SPEED_100) &&
(adapter->link_duplex == HALF_DUPLEX)) {
next prev parent reply other threads:[~2013-08-28 16:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 10:33 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-08-28 10:33 ` [net-next 01/10] ixgbe: disable link when adapter goes down Jeff Kirsher
2013-08-28 10:33 ` [net-next 02/10] ixgbe: Check return value on eeprom reads Jeff Kirsher
2013-08-28 10:33 ` [net-next 03/10] ixgbe: fix incorrect limit value in ring transverse Jeff Kirsher
2013-08-28 10:33 ` [net-next 04/10] ixgbe: fix link test when connected to 1Gbps link partner Jeff Kirsher
2013-08-28 18:28 ` Sergei Shtylyov
2013-08-28 20:24 ` Tantilov, Emil S
2013-08-28 20:38 ` Sergei Shtylyov
2013-08-28 10:33 ` [net-next 05/10] ixgbe: zero out mailbox buffer on init Jeff Kirsher
2013-08-28 10:33 ` [net-next 06/10] ixgbe: cleanup some log messages Jeff Kirsher
2013-08-28 14:49 ` Joe Perches
2013-08-28 16:19 ` Skidmore, Donald C
2013-08-28 16:36 ` Joe Perches [this message]
2013-08-28 10:33 ` [net-next 07/10] ixgbe: fix SFF data dumps of SFP+ modules from an offset Jeff Kirsher
2013-08-29 1:00 ` Ben Hutchings
2013-08-28 10:33 ` [net-next 08/10] ixgbe: add 1Gbps support for QSFP+ Jeff Kirsher
2013-08-28 10:33 ` [net-next 09/10] ixgbe: include QSFP PHY types in ixgbe_is_sfp() Jeff Kirsher
2013-08-28 10:33 ` [net-next 10/10] ixgbe: add support for older QSFP active DA cables 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=1377707813.1928.30.camel@joe-AO722 \
--to=joe@perches.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=donald.c.skidmore@intel.com \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.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