Message ID | CAH2r5mt5kBDR1oZfDNVu+bd7-jf=zQ6tBm2YjKXKBwdYE+YG=w@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 11/01/2013 11:50 AM, Steve French wrote: > This has a couple of obvious endian errors. I will correct your patch > and remerge into cifs-2.6.git for-next > > Please always remember to run endian checks against cifs builds when > submitting a patch (and make sure sparse is installed) > > e.g. > > make C=1 M=fs/cifs modules CF=-D__CHECK_ENDIAN__ > Didn't know about __CHECK_ENDIAN__, but will do so in the future. Your changes look fine. rtg
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index bc7c978..1a1fdcc 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -630,7 +630,7 @@ get_next_mid64(struct TCP_Server_Info *server) return server->ops->get_next_mid(server); } -static inline __u16 +static inline __le16 get_next_mid(struct TCP_Server_Info *server) { __u16 mid = get_next_mid64(server); diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index f9bb497..9e5ee34 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h @@ -428,7 +428,7 @@ struct smb_hdr { __u16 Tid; __le16 Pid; __u16 Uid; - __u16 Mid; + __le16 Mid; __u8 WordCount; } __attribute__((packed));