e1000e: cleanup boolean logic
authorBruce Allan <bruce.w.allan@intel.com>
Fri, 13 Apr 2012 00:08:31 +0000 (00:08 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 14 Apr 2012 09:05:00 +0000 (02:05 -0700)
commit04499ec4ee945dfad9f0afbdd8d6f8ba12dac6d6
tree15d4cd43517c8afb20b777607830ca1093341b95
parent6ad651456e3c8f3ea77056bc05c85e46ab8ead5a
e1000e: cleanup boolean logic

Replace occurrences of 'if (<bool expr> == <1|0>)' with
'if ([!]<bool expr>)'

Replace occurrences of '<bool var> = (<non-bool expr>) ? true : false'
with '<bool var> = <non-bool expr>'.

Replace occurrence of '<bool var> = <non-bool expr>' with
'<bool var> = !!<non-bool expr>'

While the latter replacement is not really necessary, it is done here for
consistency and clarity.  No functional changes.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/80003es2lan.c
drivers/net/ethernet/intel/e1000e/82571.c
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/mac.c
drivers/net/ethernet/intel/e1000e/manage.c
drivers/net/ethernet/intel/e1000e/phy.c