From: Helmut Schaa Date: Sat, 9 Oct 2010 11:34:43 +0000 (+0200) Subject: rt2x00: Use unlikely for error case in rt2x00queue_write_tx_frame X-Git-Tag: MMI-PSA29.97-13-9~21994^2~78^2^2~62 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c6084d5fa2e70a436ab944066146de01819f5493;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git rt2x00: Use unlikely for error case in rt2x00queue_write_tx_frame This is an error condition that is not supposed to happen. Hence, it is safe to add unlikely to this check. Signed-off-by: Helmut Schaa Signed-off-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 4436ff72c864..83630f16dc64 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c @@ -489,7 +489,8 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, if (unlikely(rt2x00queue_full(queue))) return -ENOBUFS; - if (test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) { + if (unlikely(test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, + &entry->flags))) { ERROR(queue->rt2x00dev, "Arrived at non-free entry in the non-full queue %d.\n" "Please file bug report to %s.\n",