diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2012-04-13 00:08:31 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-04-14 02:05:00 -0700 |
commit | 04499ec4ee945dfad9f0afbdd8d6f8ba12dac6d6 (patch) | |
tree | 15d4cd43517c8afb20b777607830ca1093341b95 /drivers/net/ethernet/intel/e1000e/80003es2lan.c | |
parent | 6ad651456e3c8f3ea77056bc05c85e46ab8ead5a (diff) | |
download | op-kernel-dev-04499ec4ee945dfad9f0afbdd8d6f8ba12dac6d6.zip op-kernel-dev-04499ec4ee945dfad9f0afbdd8d6f8ba12dac6d6.tar.gz |
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>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/80003es2lan.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/80003es2lan.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c index bac9dda..fbc84d4 100644 --- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c +++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c @@ -228,9 +228,7 @@ static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw) /* FWSM register */ mac->has_fwsm = true; /* ARC supported; valid only if manageability features are enabled. */ - mac->arc_subsystem_valid = - (er32(FWSM) & E1000_FWSM_MODE_MASK) - ? true : false; + mac->arc_subsystem_valid = !!(er32(FWSM) & E1000_FWSM_MODE_MASK); /* Adaptive IFS not supported */ mac->adaptive_ifs = false; |