]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40evf: clean up local variable initialization
authorJean Sacren <sakiwit@gmail.com>
Tue, 13 Oct 2015 07:06:30 +0000 (01:06 -0600)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:33:14 +0000 (08:33 -0800)
Orabug: 22342532

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: Jean Sacren <sakiwit@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit ed17f7e5d7918adb487debe49fadf57fd2b98d1c)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index f358366efe0018d0cafdf66f982a07ca6cc2f5cb..d962164dfb0fbf579a150223b8d594ecb073b51f 100644 (file)
@@ -306,15 +306,14 @@ static irqreturn_t i40evf_msix_aq(int irq, void *data)
        struct i40evf_adapter *adapter = netdev_priv(netdev);
        struct i40e_hw *hw = &adapter->hw;
        u32 val;
-       u32 ena_mask;
 
        /* handle non-queue interrupts */
-       val = rd32(hw, I40E_VFINT_ICR01);
-       ena_mask = rd32(hw, I40E_VFINT_ICR0_ENA1);
+       rd32(hw, I40E_VFINT_ICR01);
+       rd32(hw, I40E_VFINT_ICR0_ENA1);
 
 
-       val = rd32(hw, I40E_VFINT_DYN_CTL01);
-       val = val | I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
+       val = rd32(hw, I40E_VFINT_DYN_CTL01) |
+             I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
        wr32(hw, I40E_VFINT_DYN_CTL01, val);
 
        /* schedule work on the private workqueue */