Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54094ee8 authored by Skanda Guruanand's avatar Skanda Guruanand Committed by Greg Kroah-Hartman
Browse files

staging: lustre: Fix sparse endianness warnings cast to restricted __le64 and __le32



The struct lu_dirpage elements in lustre_idl.h file are modified to
__le64 and __le32 types since the  elements are always converted from
litte endian to processor native format in mdc_request.c file.

Following warnings are removed by this fix.

drivers/staging/lustre/lustre/mdc/mdc_request.c:958:42: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:959:42: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:962:42: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:963:42: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:985:50: warning: cast to restricted __le32
drivers/staging/lustre/lustre/mdc/mdc_request.c:1193:24: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:1328:25: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:1329:23: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:1332:25: warning: cast to restricted __le64
drivers/staging/lustre/lustre/mdc/mdc_request.c:1333:23: warning: cast to restricted __le64

Signed-off-by: default avatarSkanda Guruanand <skanda.kashyap@gmail.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 983ca9b3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -846,10 +846,10 @@ struct luda_type {
#endif

struct lu_dirpage {
	__u64	    ldp_hash_start;
	__u64	    ldp_hash_end;
	__u32	    ldp_flags;
	__u32	    ldp_pad0;
	__le64	    ldp_hash_start;
	__le64	    ldp_hash_end;
	__le32	    ldp_flags;
	__le32	    ldp_pad0;
	struct lu_dirent ldp_entries[0];
};