From patchwork Thu Mar 3 18:39:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivo van Doorn X-Patchwork-Id: 606901 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p23Imj2g021009 for ; Thu, 3 Mar 2011 18:49:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758683Ab1CCSsT (ORCPT ); Thu, 3 Mar 2011 13:48:19 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:35605 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630Ab1CCSsT (ORCPT ); Thu, 3 Mar 2011 13:48:19 -0500 Received: by wyg36 with SMTP id 36so1356532wyg.19 for ; Thu, 03 Mar 2011 10:48:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=QJVBWfRE5aa28xcw8gRjti5bIpe17hcUwM7d7kdYUwQ=; b=dY7ibiWhteRmEQkgJiKgm7ul2/UAAPBKPS8/Zrx+J+ra8uOUjNOwY0MqVDdBNIRCTv zHuxBiSwNOfhelXNYBIEWQMVije1DOEgt2yF/OZzpZUOsQuqSsZR7jkrnOSP7PanBkMU 5spj8B0dAktsGxH4orEMw+SG2N8xhJdDRpeGw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=CyFsoRdxTJnYAhVAWphgpM75WqI0dchsejXH54jYhxUjB1EPE2VYa5qqe/6MTaoMiQ sPOjgYu8zJpb71eA8++2XtOSRO6iV0VRjlzLFm9PjRzOpas3bXRtZ89jEA4XaSqrwDv1 NO33AbbfSETqqpK1tNcOu516Hmw4S6q3aKlqw= Received: by 10.227.153.21 with SMTP id i21mr1295024wbw.50.1299178097600; Thu, 03 Mar 2011 10:48:17 -0800 (PST) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id j49sm738659wer.14.2011.03.03.10.48.15 (version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 10:48:16 -0800 (PST) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 02/19] rt2x00: Make use of unlikely during tx status processing Date: Thu, 3 Mar 2011 19:39:27 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.x86_64; KDE/4.4.5; x86_64; ; ) Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com References: <201103031938.56423.IvDoorn@gmail.com> In-Reply-To: <201103031938.56423.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201103031939.28091.IvDoorn@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Mar 2011 18:49:18 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index a768deb..9dbb598 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -726,7 +726,7 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) while (kfifo_get(&rt2x00dev->txstatus_fifo, &status)) { qid = rt2x00_get_field32(status, TX_STA_FIFO_PID_QUEUE); - if (qid >= QID_RX) { + if (unlikely(qid >= QID_RX)) { /* * Unknown queue, this shouldn't happen. Just drop * this tx status. @@ -747,7 +747,7 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) break; } - if (rt2x00queue_empty(queue)) { + if (unlikely(rt2x00queue_empty(queue))) { /* * The queue is empty. Stop processing here * and drop the tx status.