Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed17f7e5 authored by Jean Sacren's avatar Jean Sacren Committed by Jeff Kirsher
Browse files

i40evf: clean up local variable initialization



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.

Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 554f4544
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -306,15 +306,14 @@ static irqreturn_t i40evf_msix_aq(int irq, void *data)
	struct i40evf_adapter *adapter = netdev_priv(netdev);
	struct i40evf_adapter *adapter = netdev_priv(netdev);
	struct i40e_hw *hw = &adapter->hw;
	struct i40e_hw *hw = &adapter->hw;
	u32 val;
	u32 val;
	u32 ena_mask;


	/* handle non-queue interrupts */
	/* handle non-queue interrupts */
	val = rd32(hw, I40E_VFINT_ICR01);
	rd32(hw, I40E_VFINT_ICR01);
	ena_mask = rd32(hw, I40E_VFINT_ICR0_ENA1);
	rd32(hw, I40E_VFINT_ICR0_ENA1);




	val = rd32(hw, I40E_VFINT_DYN_CTL01);
	val = rd32(hw, I40E_VFINT_DYN_CTL01) |
	val = val | I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
	      I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
	wr32(hw, I40E_VFINT_DYN_CTL01, val);
	wr32(hw, I40E_VFINT_DYN_CTL01, val);


	/* schedule work on the private workqueue */
	/* schedule work on the private workqueue */