forked from Minki/linux
i40e: fix shift precedence issue
Add parens to make sure the shift and bitwise precedences don't work backwards for us. Change-ID: I60c10ef4fad6bc654522b9d8a53da2e270a0f268 Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
dda094a312
commit
de78fc5ac1
@ -868,8 +868,9 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
|
||||
* The grst delay value is in 100ms units, and we'll wait a
|
||||
* couple counts longer to be sure we don't just miss the end.
|
||||
*/
|
||||
grst_del = rd32(hw, I40E_GLGEN_RSTCTL) & I40E_GLGEN_RSTCTL_GRSTDEL_MASK
|
||||
>> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT;
|
||||
grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) &
|
||||
I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >>
|
||||
I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT;
|
||||
for (cnt = 0; cnt < grst_del + 2; cnt++) {
|
||||
reg = rd32(hw, I40E_GLGEN_RSTAT);
|
||||
if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK))
|
||||
|
@ -40,7 +40,7 @@ static void i40e_get_pfc_delay(struct i40e_hw *hw, u16 *delay)
|
||||
u32 val;
|
||||
|
||||
val = rd32(hw, I40E_PRTDCB_GENC);
|
||||
*delay = (u16)(val & I40E_PRTDCB_GENC_PFCLDA_MASK >>
|
||||
*delay = (u16)((val & I40E_PRTDCB_GENC_PFCLDA_MASK) >>
|
||||
I40E_PRTDCB_GENC_PFCLDA_SHIFT);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user