[lustre-devel] [PATCH 453/622] lustre: uapi: fix building fail against Power9 little endian

James Simmons jsimmons at infradead.org
Thu Feb 27 13:15:21 PST 2020


From: Gu Zheng <gzheng at ddn.com>

We use "%ll[dux]" for __u64 variable as an input/output modifier,
this may cause building error on some architectures which use "long"
for 64-bit types, for example, Power9 little endian.
Here add necessary typecasting (long long/unsigned long long) to
make the build correct.

WC-bug-id: https://jira.whamcloud.com/browse/LU-12705
Lustre-commit: 4eddf36ac360 ("LU-12705 build: fix building fail against Power9 little endian")
Signed-off-by: Gu Zheng <gzheng at ddn.com>
Reviewed-on: https://review.whamcloud.com/36007
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Li Xi <lixi at ddn.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 include/uapi/linux/lustre/lustre_user.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/lustre/lustre_user.h b/include/uapi/linux/lustre/lustre_user.h
index 3016b73..695ceb2 100644
--- a/include/uapi/linux/lustre/lustre_user.h
+++ b/include/uapi/linux/lustre/lustre_user.h
@@ -512,7 +512,7 @@ struct lu_extent {
 };
 
 #define DEXT "[%#llx, %#llx)"
-#define PEXT(ext) (ext)->e_start, (ext)->e_end
+#define PEXT(ext) (unsigned long long)(ext)->e_start, (unsigned long long)(ext)->e_end
 
 static inline bool lu_extent_is_overlapped(struct lu_extent *e1,
 					    struct lu_extent *e2)
-- 
1.8.3.1



More information about the lustre-devel mailing list