linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: gregkh@suse.de
Cc: "Roland Vossen" <rvossen@broadcom.com>,
	linux-wireless@vger.kernel.org, devel@linuxdriverproject.org,
	"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 04/19] staging: brcm80211: fixed build issue for big endian platforms
Date: Mon, 18 Jul 2011 16:29:50 +0200	[thread overview]
Message-ID: <1310999405-10062-5-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1310999405-10062-1-git-send-email-arend@broadcom.com>

From: Roland Vossen <rvossen@broadcom.com>

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.

Cc: linux-wireless@vger.kernel.org
Cc: devel@linuxdriverproject.org
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 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 <linux/delay.h>
 #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 6275160..55db3cd 100644
--- a/drivers/staging/brcm80211/brcmsmac/types.h
+++ b/drivers/staging/brcm80211/brcmsmac/types.h
@@ -304,11 +304,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)); \
@@ -321,10 +321,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; \
-- 
1.7.4.1



  parent reply	other threads:[~2011-07-18 14:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 14:29 [PATCH 00/19] checkpatch changes and brcmfmac cleanup Arend van Spriel
2011-07-18 14:29 ` [PATCH 01/19] staging: brcm80211: fix for checkpatch warnings in phy directory Arend van Spriel
2011-07-18 14:29 ` [PATCH 02/19] staging: brcm80211: resolved checkpatch warnings in LCN phy Arend van Spriel
2011-07-18 14:29 ` [PATCH 03/19] staging: brcm80211: resolved checkpatch warnings in N phy Arend van Spriel
2011-07-18 14:29 ` Arend van Spriel [this message]
2011-07-18 14:29 ` [PATCH 05/19] staging: brcm80211: remove MIPS specific 'sync' instruction in fullmac Arend van Spriel
2011-07-18 14:29 ` [PATCH 06/19] staging: brcm80211: removed R_REG and OR_REG macro's from fullmac Arend van Spriel
2011-07-18 14:29 ` [PATCH 07/19] staging: brcm80211: removed global variable from sdio fullmac Arend van Spriel
2011-07-18 14:29 ` [PATCH 08/19] staging: brcm80211: replace simple_strtoul usage in brcmsmac Arend van Spriel
2011-07-18 14:29 ` [PATCH 09/19] staging: brcm80211: remove private timeout functions in fullmac Arend van Spriel
2011-07-18 14:29 ` [PATCH 10/19] staging: brcm80211: move brcmf_mmc_suspend to sdio layer " Arend van Spriel
2011-07-18 14:29 ` [PATCH 11/19] staging: brcm80211: remove global wait queue head sdioh_spinwait_sleep Arend van Spriel
2011-07-18 14:29 ` [PATCH 12/19] staging: brcm80211: remove code for unsupported chip Arend van Spriel
2011-07-18 19:42   ` Dan Carpenter
2011-07-18 21:18     ` Franky Lin
2011-07-18 21:34       ` Pavel Roskin
2011-07-18 22:23         ` Franky Lin
2011-07-19  5:44         ` Dan Carpenter
2011-07-19 12:36           ` Pavel Roskin
2011-07-18 14:29 ` [PATCH 13/19] staging: brcm80211: get rid of sd debug message macro in fullmac Arend van Spriel
2011-07-18 14:30 ` [PATCH 14/19] staging: brcm80211: remove structure sdio_hc in brcmfmac Arend van Spriel
2011-07-18 14:30 ` [PATCH 15/19] staging: brcm80211: remove SDLX_MSG from brcmfmac Arend van Spriel
2011-07-18 14:30 ` [PATCH 16/19] staging: brcm80211: remove BRCMF_SD_* debug macros " Arend van Spriel
2011-07-18 14:30 ` [PATCH 17/19] staging: brcm80211: absorb brcmf_sdcard_attach into brcmf_sdio_probe Arend van Spriel
2011-07-18 14:30 ` [PATCH 18/19] staging: brcm80211: absorb brcmf_sdcard_detach into brcmf_sdio_remove Arend van Spriel
2011-07-18 14:30 ` [PATCH 19/19] staging: brcm80211: replace simple_strtoul usage in brcmfmac Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310999405-10062-5-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rvossen@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).