]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] bfa: fix compilation warning in powerpc
authorJing Huang <huangj@Brocade.com>
Tue, 13 Apr 2010 19:22:29 +0000 (12:22 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 1 May 2010 19:12:11 +0000 (14:12 -0500)
Fix the compilation warning in powerpc. The same change also fixes endian
issue we found in powerpc test. This patch has been tested in x86 and
powerpc platform. it is created using scsi-misc-2.6.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/bfa/bfa_os_inc.h

index 4eb1330d5b30372e1f203bed7e2d5238d4c860ce..bd1cd3ee3022ad2a9b5f0ccb32bf7b82b1530941 100644 (file)
@@ -176,12 +176,12 @@ int bfa_os_MWB(void *);
 #define bfa_os_addr_t char __iomem *
 #define bfa_os_panic()
 
-#define bfa_os_reg_read(_raddr) bfa_os_wtole(readl(_raddr))
-#define bfa_os_reg_write(_raddr, _val) writel(bfa_os_wtole((_val)), (_raddr))
+#define bfa_os_reg_read(_raddr) readl(_raddr)
+#define bfa_os_reg_write(_raddr, _val) writel((_val), (_raddr))
 #define bfa_os_mem_read(_raddr, _off)                                   \
-       bfa_os_ntohl(readl(((_raddr) + (_off))))
+       bfa_os_swap32(readl(((_raddr) + (_off))))
 #define bfa_os_mem_write(_raddr, _off, _val)                            \
-       writel(bfa_os_htonl((_val)), ((_raddr) + (_off)))
+       writel(bfa_os_swap32((_val)), ((_raddr) + (_off)))
 
 #define BFA_TRC_TS(_trcm)                                              \
                        ({                                              \