Skip to content

Commit

Permalink
ixgbe: add braces around else condition in ixgbe_qv_lock_* calls
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Phil Schmitt <[email protected]>
Signed-off-by: Aaron Brown <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jacob-keller authored and davem330 committed Jan 18, 2014
1 parent 0113e34 commit 78d820e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 78d820e

Please sign in to comment.