From patchwork Fri Nov 14 05:13:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yalin" X-Patchwork-Id: 5303131 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F28089F2ED for ; Fri, 14 Nov 2014 05:14:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F76220149 for ; Fri, 14 Nov 2014 05:14:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 13B7D20148 for ; Fri, 14 Nov 2014 05:14:13 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3FFFC266532; Fri, 14 Nov 2014 06:14:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id EBAAE2664FE; Fri, 14 Nov 2014 06:14:00 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 369B226650F; Fri, 14 Nov 2014 06:13:59 +0100 (CET) Received: from cnbjrel01.sonyericsson.com (cnbjrel01.sonyericsson.com [219.141.167.165]) by alsa0.perex.cz (Postfix) with ESMTP id 689C62664CF for ; Fri, 14 Nov 2014 06:13:50 +0100 (CET) From: "Wang, Yalin" To: "'perex@perex.cz'" , "'tiwai@suse.de'" , "'joe@perches.com'" , "'alsa-devel@alsa-project.org'" , "'linux-kernel@vger.kernel.org'" Date: Fri, 14 Nov 2014 13:13:45 +0800 Thread-Topic: [PATCH] 6fire: Convert byte_rev_table uses to bitrev8 Thread-Index: Ac//ycOD9bcU0tYhTmyRn6gG/G9r+w== Message-ID: <35FD53F367049845BC99AC72306C23D103E010D1829C@CNBJMBX05.corpusers.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Subject: [alsa-devel] [PATCH] 6fire: Convert byte_rev_table uses to bitrev8 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Use the inline function instead of directly indexing the array. This allows some architectures with hardware instructions for bit reversals to eliminate the array. Signed-off-by: Joe Perches Signed-off-by: Yalin Wang --- sound/usb/6fire/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index 3b02e54..2e39c3f 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c @@ -316,7 +316,7 @@ static int usb6fire_fw_fpga_upload( while (c != end) { for (i = 0; c != end && i < FPGA_BUFSIZE; i++, c++) - buffer[i] = byte_rev_table[(u8) *c]; + buffer[i] = bitrev8((u8) *c); ret = usb6fire_fw_fpga_write(device, buffer, i); if (ret < 0) {