]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
i40e/i40evf: use logical operator
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 6 Nov 2015 23:26:11 +0000 (15:26 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 29 Feb 2016 15:55:58 +0000 (08:55 -0700)
BugLink: http://bugs.launchpad.net/bugs/1536474
We shouldn't be using a bitwise operator here; it's not a bitwise
operation. Use a logical operator instead. Why doesn't c have a
logical-or-and-assign operator?

Change-ID: Id84f3ca884910bed7073c84b1e16a102e958d0de
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 44cdb791ae7bc40e0331b78a73992be44079a3ec)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c

index 7b99d7754ff81c94e2163d7f3b466d2f27153c7e..aff38e15c150716bfd1eb1ec9f34476a426abc80 100644 (file)
@@ -1908,7 +1908,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
         */
        i40e_for_each_ring(ring, q_vector->tx) {
                clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit);
-               arm_wb |= ring->arm_wb;
+               arm_wb = arm_wb || ring->arm_wb;
                ring->arm_wb = false;
        }
 
index 7a013556903b4057cf713bec240bce1943911036..1d34d70ccade1a6e8548a401a8fe203b43fc82ba 100644 (file)
@@ -1332,7 +1332,7 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
         */
        i40e_for_each_ring(ring, q_vector->tx) {
                clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit);
-               arm_wb |= ring->arm_wb;
+               arm_wb = arm_wb || ring->arm_wb;
                ring->arm_wb = false;
        }