Skip to content

Commit

Permalink
[PATCH] smbfs endianness annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 10, 2006
1 parent 2ef1031 commit 6ca1584
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/linux/smb_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ static inline struct smb_inode_info *SMB_I(struct inode *inode)

/* macro names are short for word, double-word, long value (?) */
#define WVAL(buf,pos) \
(le16_to_cpu(get_unaligned((u16 *)((u8 *)(buf) + (pos)))))
(le16_to_cpu(get_unaligned((__le16 *)((u8 *)(buf) + (pos)))))
#define DVAL(buf,pos) \
(le32_to_cpu(get_unaligned((u32 *)((u8 *)(buf) + (pos)))))
(le32_to_cpu(get_unaligned((__le32 *)((u8 *)(buf) + (pos)))))
#define LVAL(buf,pos) \
(le64_to_cpu(get_unaligned((u64 *)((u8 *)(buf) + (pos)))))
(le64_to_cpu(get_unaligned((__le64 *)((u8 *)(buf) + (pos)))))
#define WSET(buf,pos,val) \
put_unaligned(cpu_to_le16((u16)(val)), (u16 *)((u8 *)(buf) + (pos)))
put_unaligned(cpu_to_le16((u16)(val)), (__le16 *)((u8 *)(buf) + (pos)))
#define DSET(buf,pos,val) \
put_unaligned(cpu_to_le32((u32)(val)), (u32 *)((u8 *)(buf) + (pos)))
put_unaligned(cpu_to_le32((u32)(val)), (__le32 *)((u8 *)(buf) + (pos)))
#define LSET(buf,pos,val) \
put_unaligned(cpu_to_le64((u64)(val)), (u64 *)((u8 *)(buf) + (pos)))
put_unaligned(cpu_to_le64((u64)(val)), (__le64 *)((u8 *)(buf) + (pos)))

/* where to find the base of the SMB packet proper */
#define smb_base(buf) ((u8 *)(((u8 *)(buf))+4))
Expand Down

0 comments on commit 6ca1584

Please sign in to comment.