diff options
author | Skanda Guruanand <skanda.kashyap@gmail.com> | 2017-04-15 20:48:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-18 07:27:15 -0400 |
commit | 54094ee81262b4b9700e786e88fe5bda4edb51fc (patch) | |
tree | 10a1e6a179a430f1e655166f0e648d2a0c24d2da | |
parent | 983ca9b321a99c30f81d519b05837245f3180299 (diff) |
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: Skanda Guruanand <skanda.kashyap@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index 60b827eeefe2..df48b8d6fe52 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | |||
@@ -846,10 +846,10 @@ struct luda_type { | |||
846 | #endif | 846 | #endif |
847 | 847 | ||
848 | struct lu_dirpage { | 848 | struct lu_dirpage { |
849 | __u64 ldp_hash_start; | 849 | __le64 ldp_hash_start; |
850 | __u64 ldp_hash_end; | 850 | __le64 ldp_hash_end; |
851 | __u32 ldp_flags; | 851 | __le32 ldp_flags; |
852 | __u32 ldp_pad0; | 852 | __le32 ldp_pad0; |
853 | struct lu_dirent ldp_entries[0]; | 853 | struct lu_dirent ldp_entries[0]; |
854 | }; | 854 | }; |
855 | 855 | ||