X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fsmb_fs.h;h=923cd8a247b103bfeae72cc2680b55db0636d8ad;hb=7be7585393d311866653564fbcd10a3232773c0b;hp=621a3d3662f328c13c742a96b325307d8dc583e5;hpb=8d5c315059460e665c804d5a9b641f7f0a1e9dd7;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 621a3d3662f..923cd8a247b 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h @@ -10,8 +10,6 @@ #define _LINUX_SMB_FS_H #include -#include -#include /* * ioctl commands @@ -24,11 +22,14 @@ #ifdef __KERNEL__ +#include +#include #include #include #include #include +#include #include static inline struct smb_sb_info *SMB_SB(struct super_block *sb) @@ -42,18 +43,13 @@ 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))))) -#define DVAL(buf,pos) \ - (le32_to_cpu(get_unaligned((u32 *)((u8 *)(buf) + (pos))))) -#define LVAL(buf,pos) \ - (le64_to_cpu(get_unaligned((u64 *)((u8 *)(buf) + (pos))))) -#define WSET(buf,pos,val) \ - put_unaligned(cpu_to_le16((u16)(val)), (u16 *)((u8 *)(buf) + (pos))) -#define DSET(buf,pos,val) \ - put_unaligned(cpu_to_le32((u32)(val)), (u32 *)((u8 *)(buf) + (pos))) -#define LSET(buf,pos,val) \ - put_unaligned(cpu_to_le64((u64)(val)), (u64 *)((u8 *)(buf) + (pos))) +#define WVAL(buf, pos) (get_unaligned_le16((u8 *)(buf) + (pos))) +#define DVAL(buf, pos) (get_unaligned_le32((u8 *)(buf) + (pos))) +#define LVAL(buf, pos) (get_unaligned_le64((u8 *)(buf) + (pos))) + +#define WSET(buf, pos, val) put_unaligned_le16((val), (u8 *)(buf) + (pos)) +#define DSET(buf, pos, val) put_unaligned_le32((val), (u8 *)(buf) + (pos)) +#define LSET(buf, pos, val) put_unaligned_le64((val), (u8 *)(buf) + (pos)) /* where to find the base of the SMB packet proper */ #define smb_base(buf) ((u8 *)(((u8 *)(buf))+4))