summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2014-01-17 01:21:36 -0800
committerDavid S. Miller <davem@davemloft.net>2014-01-17 18:56:59 -0800
commit78d820e848f6a905cb88492cb717787be1f2b43d (patch)
tree2c220a16636af827d51e80b1ae0d0afcf9143b62
parent0113e34bec17578516eaa457b4a0ea255b0c1276 (diff)
ixgbe: add braces around else condition in ixgbe_qv_lock_* calls
This patch adds braces around the ixgbe_qv_lock_* calls which previously only had braces around the if portion. Kernel style guidelines for this require parenthesis around all conditions if they are required around one. In addition the comment while not illegal C syntax makes the code look wrong at a cursory glance. This patch corrects the style and adds braces so that the full if-else block is uniform. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 3a4373f689eb..0186ea2969fe 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -424,9 +424,10 @@ static inline bool ixgbe_qv_lock_napi(struct ixgbe_q_vector *q_vector)
#ifdef BP_EXTENDED_STATS
q_vector->tx.ring->stats.yields++;
#endif
- } else
+ } else {
/* we don't care if someone yielded */
q_vector->state = IXGBE_QV_STATE_NAPI;
+ }
spin_unlock_bh(&q_vector->lock);
return rc;
}
@@ -458,9 +459,10 @@ static inline bool ixgbe_qv_lock_poll(struct ixgbe_q_vector *q_vector)
#ifdef BP_EXTENDED_STATS
q_vector->rx.ring->stats.yields++;
#endif
- } else
+ } else {
/* preserve yield marks */
q_vector->state |= IXGBE_QV_STATE_POLL;
+ }
spin_unlock_bh(&q_vector->lock);
return rc;
}