In i40evf_msix_aq(), the first two lines of rd32() are mainly to clear the registers. If we initialize 'val' at this point, it will be overwritten immediately. We shall simply discard the return value here. When we initialize 'val', we might as well include the mask in one step.
Unified · Split
| @@ -306,15 +306,14 @@ static irqreturn_t i40evf_msix_aq(int irq, void *data) · 305 unmodified lines | |||
| 306 | struct i40evf_adapter *adapter = netdev_priv(netdev); | 306 | struct i40evf_adapter *adapter = netdev_priv(netdev); |
| 307 | struct i40e_hw *hw = &adapter->hw; | 307 | struct i40e_hw *hw = &adapter->hw; |
| 308 | u32 val; | 308 | u32 val; |
| 309 | u32 ena_mask; | ||
| 310 | 309 | ||
| 311 | /* handle non-queue interrupts */ | 310 | /* handle non-queue interrupts */ |
| 312 | val = rd32(hw, I40E_VFINT_ICR01); | 311 | rd32(hw, I40E_VFINT_ICR01); |
| 313 | ena_mask = rd32(hw, I40E_VFINT_ICR0_ENA1); | 312 | rd32(hw, I40E_VFINT_ICR0_ENA1); |
| 314 | 313 | ||
| 315 | 314 | ||
| 316 | val = rd32(hw, I40E_VFINT_DYN_CTL01); | 315 | val = rd32(hw, I40E_VFINT_DYN_CTL01) | |
| 317 | val = val | I40E_VFINT_DYN_CTL01_CLEARPBA_MASK; | 316 | I40E_VFINT_DYN_CTL01_CLEARPBA_MASK; |
| 318 | wr32(hw, I40E_VFINT_DYN_CTL01, val); | 317 | wr32(hw, I40E_VFINT_DYN_CTL01, val); |
| 319 | 318 | ||
| 320 | /* schedule work on the private workqueue */ | 319 | /* schedule work on the private workqueue */ |