[patch 2/3] fs/cifs/cifssmb.c: fix the rest of sparse warnings

domen at coderock.org domen at coderock.org
Mon Jun 20 21:55:37 GMT 2005


From: Alexey Dobriyan <adobriyan at mail.ru>



Fix those that weren't brought by le'ifying in posix_acl_xattr.h

Signed-off-by: Alexey Dobriyan <adobriyan at mail.ru>
Signed-off-by: Domen Puncer <domen at coderock.org>
---
 cifssmb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Index: quilt/fs/cifs/cifssmb.c
===================================================================
--- quilt.orig/fs/cifs/cifssmb.c
+++ quilt/fs/cifs/cifssmb.c
@@ -1865,7 +1865,7 @@ static __u16 convert_ace_to_cifs_ace(str
 	/* Probably no need to le convert -1 on any arch but can not hurt */
 		cifs_ace->cifs_uid = cpu_to_le64(-1);
 	} else 
-		cifs_ace->cifs_uid = (__u64)le32_to_cpu(local_ace->e_id);
+		cifs_ace->cifs_uid = cpu_to_le64((__u64)le32_to_cpu(local_ace->e_id));
         /*cFYI(1,("perm %d tag %d id %d",ace->e_perm,ace->e_tag,ace->e_id));*/
 	return rc;
 }
@@ -1892,9 +1892,9 @@ static __u16 ACL_to_cifs_posix(char * pa
 	}
 	cifs_acl->version = cpu_to_le16(1);
 	if(acl_type == ACL_TYPE_ACCESS) 
-		cifs_acl->access_entry_count = count;
+		cifs_acl->access_entry_count = cpu_to_le16(count);
 	else if(acl_type == ACL_TYPE_DEFAULT)
-		cifs_acl->default_entry_count = count;
+		cifs_acl->default_entry_count = cpu_to_le16(count);
 	else {
 		cFYI(1,("unknown ACL type %d",acl_type));
 		return 0;

--


More information about the samba-technical mailing list