diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-25 04:45:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:26 -0400 |
commit | 8b5ac31e27135a6f2c210c40d03bf8f1b3a86b77 (patch) | |
tree | 8f045767452fe3bbffcef0aa6af29f8c4b998780 /include | |
parent | b7bbf8fa6ba329b3552b75a0716f5fbc6f839499 (diff) |
include: use get/put_unaligned_* helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/reiserfs_fs.h | 4 | ||||
-rw-r--r-- | include/linux/smb_fs.h | 19 | ||||
-rw-r--r-- | include/net/ieee80211_radiotap.h | 2 |
3 files changed, 10 insertions, 15 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 4aacaeecb56f..e9963af16cda 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -526,8 +526,8 @@ struct item_head { | |||
526 | ** p is the array of __u32, i is the index into the array, v is the value | 526 | ** p is the array of __u32, i is the index into the array, v is the value |
527 | ** to store there. | 527 | ** to store there. |
528 | */ | 528 | */ |
529 | #define get_block_num(p, i) le32_to_cpu(get_unaligned((p) + (i))) | 529 | #define get_block_num(p, i) get_unaligned_le32((p) + (i)) |
530 | #define put_block_num(p, i, v) put_unaligned(cpu_to_le32(v), (p) + (i)) | 530 | #define put_block_num(p, i, v) put_unaligned_le32((v), (p) + (i)) |
531 | 531 | ||
532 | // | 532 | // |
533 | // in old version uniqueness field shows key type | 533 | // in old version uniqueness field shows key type |
diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 2c5cd55f44ff..923cd8a247b1 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h | |||
@@ -43,18 +43,13 @@ static inline struct smb_inode_info *SMB_I(struct inode *inode) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | /* macro names are short for word, double-word, long value (?) */ | 45 | /* macro names are short for word, double-word, long value (?) */ |
46 | #define WVAL(buf,pos) \ | 46 | #define WVAL(buf, pos) (get_unaligned_le16((u8 *)(buf) + (pos))) |
47 | (le16_to_cpu(get_unaligned((__le16 *)((u8 *)(buf) + (pos))))) | 47 | #define DVAL(buf, pos) (get_unaligned_le32((u8 *)(buf) + (pos))) |
48 | #define DVAL(buf,pos) \ | 48 | #define LVAL(buf, pos) (get_unaligned_le64((u8 *)(buf) + (pos))) |
49 | (le32_to_cpu(get_unaligned((__le32 *)((u8 *)(buf) + (pos))))) | 49 | |
50 | #define LVAL(buf,pos) \ | 50 | #define WSET(buf, pos, val) put_unaligned_le16((val), (u8 *)(buf) + (pos)) |
51 | (le64_to_cpu(get_unaligned((__le64 *)((u8 *)(buf) + (pos))))) | 51 | #define DSET(buf, pos, val) put_unaligned_le32((val), (u8 *)(buf) + (pos)) |
52 | #define WSET(buf,pos,val) \ | 52 | #define LSET(buf, pos, val) put_unaligned_le64((val), (u8 *)(buf) + (pos)) |
53 | put_unaligned(cpu_to_le16((u16)(val)), (__le16 *)((u8 *)(buf) + (pos))) | ||
54 | #define DSET(buf,pos,val) \ | ||
55 | put_unaligned(cpu_to_le32((u32)(val)), (__le32 *)((u8 *)(buf) + (pos))) | ||
56 | #define LSET(buf,pos,val) \ | ||
57 | put_unaligned(cpu_to_le64((u64)(val)), (__le64 *)((u8 *)(buf) + (pos))) | ||
58 | 53 | ||
59 | /* where to find the base of the SMB packet proper */ | 54 | /* where to find the base of the SMB packet proper */ |
60 | #define smb_base(buf) ((u8 *)(((u8 *)(buf))+4)) | 55 | #define smb_base(buf) ((u8 *)(((u8 *)(buf))+4)) |
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index dfd8bf66ce27..d364fd594ea4 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -262,7 +262,7 @@ static inline int ieee80211_get_radiotap_len(unsigned char *data) | |||
262 | struct ieee80211_radiotap_header *hdr = | 262 | struct ieee80211_radiotap_header *hdr = |
263 | (struct ieee80211_radiotap_header *)data; | 263 | (struct ieee80211_radiotap_header *)data; |
264 | 264 | ||
265 | return le16_to_cpu(get_unaligned(&hdr->it_len)); | 265 | return get_unaligned_le16(&hdr->it_len); |
266 | } | 266 | } |
267 | 267 | ||
268 | #endif /* IEEE80211_RADIOTAP_H */ | 268 | #endif /* IEEE80211_RADIOTAP_H */ |