History

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.

Jean Sacren committed 11 years ago

Commit ed17f7e1 parent 554f4541 file · +4 −5Browse files

Unified · Split

drivers/net/ethernet/intel/i40evf/i40evf_main.c+4−5
@@ -306,15 +306,14 @@ static irqreturn_t i40evf_msix_aq(int irq, void *data) · 305 unmodified lines
306306 struct i40evf_adapter *adapter = netdev_priv(netdev);
307307 struct i40e_hw *hw = &adapter->hw;
308308 u32 val;
309− u32 ena_mask;
310309
311310 /* handle non-queue interrupts */
312− val = rd32(hw, I40E_VFINT_ICR01);
313− ena_mask = rd32(hw, I40E_VFINT_ICR0_ENA1);
311+ rd32(hw, I40E_VFINT_ICR01);
312+ rd32(hw, I40E_VFINT_ICR0_ENA1);
314313
315314
316− val = rd32(hw, I40E_VFINT_DYN_CTL01);
317− val = val | I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
315+ val = rd32(hw, I40E_VFINT_DYN_CTL01) |
316+ I40E_VFINT_DYN_CTL01_CLEARPBA_MASK;
318317 wr32(hw, I40E_VFINT_DYN_CTL01, val);
319318
320319 /* schedule work on the private workqueue */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t