From patchwork Tue May 3 09:35:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 749262 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p439b9t7002628 for ; Tue, 3 May 2011 09:37:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437Ab1ECJhF (ORCPT ); Tue, 3 May 2011 05:37:05 -0400 Received: from mms1.broadcom.com ([216.31.210.17]:2278 "EHLO mms1.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446Ab1ECJhE (ORCPT ); Tue, 3 May 2011 05:37:04 -0400 Received: from [10.9.200.131] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Tue, 03 May 2011 02:39:52 -0700 X-Server-Uuid: 02CED230-5797-4B57-9875-D5D2FEE4708A Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB01.corp.ad.broadcom.com (10.9.200.131) with Microsoft SMTP Server id 8.2.247.2; Tue, 3 May 2011 02:36:12 -0700 Received: from mail-sj1-12.sj.broadcom.com (mail-sj1-12.sj.broadcom.com [10.17.16.106]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 30AC074D0F; Tue, 3 May 2011 02:36:12 -0700 (PDT) Received: from arend-laptop (unknown [10.176.68.140]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id A8D5420508; Tue, 3 May 2011 02:36:10 -0700 (PDT) Received: from arend by arend-laptop with local (Exim 4.74) ( envelope-from ) id 1QHC1Z-00026E-P8; Tue, 03 May 2011 11:36:09 +0200 From: "Arend van Spriel" To: gregkh@suse.de cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org, "Brett Rudley" , "Henry Ptasinski" , "Roland Vossen" Subject: [PATCH 55/61] staging: brcm80211: remove CRC_INNER_LOOP macro Date: Tue, 3 May 2011 11:35:55 +0200 Message-ID: <1304415361-7813-56-git-send-email-arend@broadcom.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1304415361-7813-1-git-send-email-arend@broadcom.com> References: <1304415361-7813-1-git-send-email-arend@broadcom.com> MIME-Version: 1.0 X-WSS-ID: 61A112EC3GO15205471-05-01 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 (demeter2.kernel.org [140.211.167.43]); Tue, 03 May 2011 09:37:09 +0000 (UTC) With the removal of hndcrc16 and hndcrc32 this macro is not needed anymore. Also the crc-ccitt library functions provide an equivalent static inline function for this operation. Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley Cc: Henry Ptasinski Cc: Roland Vossen Signed-off-by: Arend van Spriel --- drivers/staging/brcm80211/util/bcmutils.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c index bcaf911..7337a75 100644 --- a/drivers/staging/brcm80211/util/bcmutils.c +++ b/drivers/staging/brcm80211/util/bcmutils.c @@ -564,16 +564,11 @@ static const u8 crc8_table[256] = { 0xF4, 0x03, 0x4D, 0xBA, 0xD1, 0x26, 0x68, 0x9F }; -#define CRC_INNER_LOOP(n, c, x) \ - ((c) = ((c) >> 8) ^ crc##n##_table[((c) ^ (x)) & 0xff]) - u8 hndcrc8(u8 *pdata, /* pointer to array of data to process */ uint nbytes, /* number of input data bytes to process */ u8 crc /* either CRC8_INIT_VALUE or previous return value */ ) { - /* hard code the crc loop instead of using CRC_INNER_LOOP macro - * to avoid the undefined and unnecessary (u8 >> 8) operation. - */ + /* loop over the buffer data */ while (nbytes-- > 0) crc = crc8_table[(crc ^ *pdata++) & 0xff];