diff options
author | Jing Huang <huangj@brocade.com> | 2010-10-19 04:10:50 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-26 01:17:14 +0400 |
commit | ba816ea8e2eacbf3d198ad1859f413c2d6213434 (patch) | |
tree | 92399b02434b350fe4c767c0cb4f1790b7fee763 /drivers/scsi/bfa/bfa_os_inc.h | |
parent | 6a18b1675fdf08a6dc861e39c3f94309a03e7f16 (diff) | |
download | linux-ba816ea8e2eacbf3d198ad1859f413c2d6213434.tar.xz |
[SCSI] bfa: replace endian swap macros with the ones provided by linux
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_os_inc.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_os_inc.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/scsi/bfa/bfa_os_inc.h b/drivers/scsi/bfa/bfa_os_inc.h index a79a443f5f4a..d928dcaa5080 100644 --- a/drivers/scsi/bfa/bfa_os_inc.h +++ b/drivers/scsi/bfa/bfa_os_inc.h @@ -65,16 +65,6 @@ do { \ ((_x) & 0x00ff00) | \ (((_x) & 0xff0000) >> 16)) -#define bfa_swap_8b(_x) \ - ((((_x) & 0xff00000000000000ull) >> 56) \ - | (((_x) & 0x00ff000000000000ull) >> 40) \ - | (((_x) & 0x0000ff0000000000ull) >> 24) \ - | (((_x) & 0x000000ff00000000ull) >> 8) \ - | (((_x) & 0x00000000ff000000ull) << 8) \ - | (((_x) & 0x0000000000ff0000ull) << 24) \ - | (((_x) & 0x000000000000ff00ull) << 40) \ - | (((_x) & 0x00000000000000ffull) << 56)) - #define bfa_os_swap32(_x) \ ((((_x) & 0xff) << 24) | \ (((_x) & 0x0000ff00) << 8) | \ @@ -92,32 +82,15 @@ do { \ (((u64)(_x) & (u64)0xff00000000000000ull) >> 32))) #ifndef __BIGENDIAN -#define bfa_os_htons(_x) ((u16)((((_x) & 0xff00) >> 8) | \ - (((_x) & 0x00ff) << 8))) -#define bfa_os_htonl(_x) bfa_os_swap32(_x) -#define bfa_os_htonll(_x) bfa_swap_8b(_x) #define bfa_os_hton3b(_x) bfa_swap_3b(_x) -#define bfa_os_wtole(_x) (_x) #define bfa_os_sgaddr(_x) (_x) - #else - -#define bfa_os_htons(_x) (_x) -#define bfa_os_htonl(_x) (_x) #define bfa_os_hton3b(_x) (_x) -#define bfa_os_htonll(_x) (_x) -#define bfa_os_wtole(_x) bfa_os_swap32(_x) #define bfa_os_sgaddr(_x) bfa_os_swap_sgaddr(_x) - #endif -#define bfa_os_ntohs(_x) bfa_os_htons(_x) -#define bfa_os_ntohl(_x) bfa_os_htonl(_x) -#define bfa_os_ntohll(_x) bfa_os_htonll(_x) #define bfa_os_ntoh3b(_x) bfa_os_hton3b(_x) - #define bfa_os_u32(__pa64) ((__pa64) >> 32) - #define bfa_os_addr_t void __iomem * #define bfa_os_reg_read(_raddr) readl(_raddr) |