Commit 78d820e8 authored by Jacob Keller's avatar Jacob Keller Committed by David S. Miller

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: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0113e34b
...@@ -424,9 +424,10 @@ static inline bool ixgbe_qv_lock_napi(struct ixgbe_q_vector *q_vector) ...@@ -424,9 +424,10 @@ static inline bool ixgbe_qv_lock_napi(struct ixgbe_q_vector *q_vector)
#ifdef BP_EXTENDED_STATS #ifdef BP_EXTENDED_STATS
q_vector->tx.ring->stats.yields++; q_vector->tx.ring->stats.yields++;
#endif #endif
} else } else {
/* we don't care if someone yielded */ /* we don't care if someone yielded */
q_vector->state = IXGBE_QV_STATE_NAPI; q_vector->state = IXGBE_QV_STATE_NAPI;
}
spin_unlock_bh(&q_vector->lock); spin_unlock_bh(&q_vector->lock);
return rc; return rc;
} }
...@@ -458,9 +459,10 @@ static inline bool ixgbe_qv_lock_poll(struct ixgbe_q_vector *q_vector) ...@@ -458,9 +459,10 @@ static inline bool ixgbe_qv_lock_poll(struct ixgbe_q_vector *q_vector)
#ifdef BP_EXTENDED_STATS #ifdef BP_EXTENDED_STATS
q_vector->rx.ring->stats.yields++; q_vector->rx.ring->stats.yields++;
#endif #endif
} else } else {
/* preserve yield marks */ /* preserve yield marks */
q_vector->state |= IXGBE_QV_STATE_POLL; q_vector->state |= IXGBE_QV_STATE_POLL;
}
spin_unlock_bh(&q_vector->lock); spin_unlock_bh(&q_vector->lock);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment