From patchwork Mon Aug 8 13:58:22 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: 1044882 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p78E0AFY008563 for ; Mon, 8 Aug 2011 14:12:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753812Ab1HHOA4 (ORCPT ); Mon, 8 Aug 2011 10:00:56 -0400 Received: from mms2.broadcom.com ([216.31.210.18]:1778 "EHLO mms2.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753163Ab1HHN7d (ORCPT ); Mon, 8 Aug 2011 09:59:33 -0400 Received: from [10.9.200.133] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Mon, 08 Aug 2011 07:04:44 -0700 X-Server-Uuid: D3C04415-6FA8-4F2C-93C1-920E106A2031 Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB02.corp.ad.broadcom.com (10.9.200.133) with Microsoft SMTP Server id 8.2.247.2; Mon, 8 Aug 2011 06:59:05 -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 7194F74D03; Mon, 8 Aug 2011 06:59:21 -0700 (PDT) Received: from arend-laptop (unknown [10.176.68.34]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id 428AC20523; Mon, 8 Aug 2011 06:59:13 -0700 (PDT) Received: from arend by arend-laptop with local (Exim 4.74) ( envelope-from ) id 1QqQMK-0004PI-CO; Mon, 08 Aug 2011 15:59:12 +0200 From: "Arend van Spriel" To: gregkh@suse.de cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org, "Roland Vossen" , "Arend van Spriel" Subject: [PATCHv2 38/82] staging: brcm80211: fixed build issue for big endian platforms Date: Mon, 8 Aug 2011 15:58:22 +0200 Message-ID: <1312811946-16713-39-git-send-email-arend@broadcom.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1312811946-16713-1-git-send-email-arend@broadcom.com> References: <1312811946-16713-1-git-send-email-arend@broadcom.com> MIME-Version: 1.0 X-WSS-ID: 622133763W42726950-01-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 (demeter1.kernel.org [140.211.167.41]); Mon, 08 Aug 2011 14:12:58 +0000 (UTC) From: Roland Vossen Driver now builds for big endian mips platform, possibly also for other big endian platforms. A change was made to the R_REG and W_REG macro's. These macro's perform an xor (^) operation for endianess swap purposes. Gcc complained because an xor operation is not allowed on a pointer type. Fixed this by casting the pointer to an unsigned long. Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel --- drivers/staging/brcm80211/brcmsmac/dma.h | 1 + drivers/staging/brcm80211/brcmsmac/types.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/dma.h b/drivers/staging/brcm80211/brcmsmac/dma.h index 3ff109f..334f2eb 100644 --- a/drivers/staging/brcm80211/brcmsmac/dma.h +++ b/drivers/staging/brcm80211/brcmsmac/dma.h @@ -17,6 +17,7 @@ #ifndef _BRCM_DMA_H_ #define _BRCM_DMA_H_ +#include #include "types.h" /* forward structure declarations */ /* DMA structure: diff --git a/drivers/staging/brcm80211/brcmsmac/types.h b/drivers/staging/brcm80211/brcmsmac/types.h index e0880a0..ab97718 100644 --- a/drivers/staging/brcm80211/brcmsmac/types.h +++ b/drivers/staging/brcm80211/brcmsmac/types.h @@ -305,11 +305,11 @@ do { \ switch (sizeof(*(r))) { \ case sizeof(u8): \ __osl_v = \ - readb((u8 *)((r)^3)); \ + readb((u8 *)((unsigned long)(r)^3)); \ break; \ case sizeof(u16): \ __osl_v = \ - readw((u16 *)((r)^2)); \ + readw((u16 *)((unsigned long)(r)^2)); \ break; \ case sizeof(u32): \ __osl_v = readl((u32 *)(r)); \ @@ -322,10 +322,10 @@ do { \ switch (sizeof(*(r))) { \ case sizeof(u8): \ writeb((u8)(v), \ - (u8 *)((r)^3)); break; \ + (u8 *)((unsigned long)(r)^3)); break; \ case sizeof(u16): \ writew((u16)(v), \ - (u16 *)((r)^2)); break; \ + (u16 *)((unsigned long)(r)^2)); break; \ case sizeof(u32): \ writel((u32)(v), \ (u32 *)(r)); break; \