mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
6ad651456e
commit
04499ec4ee
6 changed files with 31 additions and 35 deletions
|
@ -681,7 +681,7 @@ static s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
|
|||
return ret_val;
|
||||
}
|
||||
|
||||
if ((nvm_data & NVM_WORD0F_PAUSE_MASK) == 0)
|
||||
if (!(nvm_data & NVM_WORD0F_PAUSE_MASK))
|
||||
hw->fc.requested_mode = e1000_fc_none;
|
||||
else if ((nvm_data & NVM_WORD0F_PAUSE_MASK) == NVM_WORD0F_ASM_DIR)
|
||||
hw->fc.requested_mode = e1000_fc_tx_pause;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue