diff mbox

[net-next,06/10] ixgbe: cleanup some log messages

Message ID 1377707813.1928.30.camel@joe-AO722
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Joe Perches Aug. 28, 2013, 4:36 p.m. UTC
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(-)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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)) {