From: Joe Perches > Sent: 18 February 2016 04:59 > On Wed, 2016-02-17 at 19:38 -0800, Jeff Kirsher wrote: > > From: Mitch Williams <mitch.a.willi...@intel.com> > > > > Mr. Spock would certainly raise an eyebrow to see us using bitwise > > operators, when we should clearly be relying on logic. Fascinating. > > I think it read better before this change. > > Spock might have looked at the type of the > variable before raising that eyebrow. > > clean_complete is bool so it's not actually a > bitwise operation,
Except that, of course, you may well want a bitwise operation in order to remove slow conditional instructions. Hopefully gcc generates a bit-wise 'and' provided that i40e_clean_tx_irq() returns a 'bool'. David > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c > b/drivers/net/ethernet/intel/i40e/i40e_txrx.c > [] > > @@ -1996,7 +1996,8 @@ int i40e_napi_poll(struct napi_struct *napi, int > > budget) > > * budget and be more aggressive about cleaning up the Tx descriptors. > > */ > > i40e_for_each_ring(ring, q_vector->tx) { > > - clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit); > > + clean_complete = clean_complete && > > + i40e_clean_tx_irq(ring, vsi->work_limit); > > etc...