From 30f4f34c3cd17585f5367a875e60abbecc63ab20 Mon Sep 17 00:00:00 2001 From: Gian-Carlo DeFazio Date: Tue, 22 Feb 2022 12:23:30 -0800 Subject: [PATCH] LU-15584 utils: ppc64le __le64_to_cpu type mismatch Cast values returned by __le64_to_cpu to long long unsigned int. This is to match print format strings that use %llx. This mismatch was resulting in a build failure for ppc64le. Build log message: llog_reader.c:921:42: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'long unsigned int' Lustre-change: https://review.whamcloud.com/46588 Lustre-commit: 131f559c5a241f15b8a91009968dfbd9a5dcddeb Fixes: 80447caf980 LU-14926 utils: print unlink and setattr recs in llog_reader Signed-off-by: Gian-Carlo DeFazio Change-Id: I939b94626d2707b6ff644324c5c2798218331c4d Reviewed-by: Andreas Dilger Reviewed-by: Olaf Faaland-LLNL Signed-off-by: Etienne AUJAMES Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48307 Reviewed-by: Olaf Faaland Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Andreas Dilger --- lustre/utils/llog_reader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/utils/llog_reader.c b/lustre/utils/llog_reader.c index d86923a..60fc711 100644 --- a/lustre/utils/llog_reader.c +++ b/lustre/utils/llog_reader.c @@ -927,7 +927,7 @@ static void print_unlink_rec(struct llog_unlink_rec *lur) { printf("unlink record id:0x%x target %llx:%x:%x\n", __le32_to_cpu(lur->lur_hdr.lrh_id), - __le64_to_cpu(lur->lur_oid), + (unsigned long long)__le64_to_cpu(lur->lur_oid), __le32_to_cpu(lur->lur_oseq), __le32_to_cpu(lur->lur_count)); } @@ -944,7 +944,7 @@ static void print_setattr64_rec(struct llog_setattr64_rec *lsr) printf("setattr64 record id:0x%x target "DFID" valid %llx uid %u:%u gid %u:%u\n", __le32_to_cpu(lsr->lsr_hdr.lrh_id), PFID(&lsr->lsr_oi.oi_fid), - __le64_to_cpu(lsr->lsr_valid), + (unsigned long long)__le64_to_cpu(lsr->lsr_valid), __le32_to_cpu(lsr->lsr_uid_h), __le32_to_cpu(lsr->lsr_uid), __le32_to_cpu(lsr->lsr_gid_h), @@ -956,7 +956,7 @@ static void print_setattr64_rec_v2(struct llog_setattr64_rec_v2 *lsr) printf("setattr64 v2 record id:0x%x target "DFID" valid %llx uid %u:%u gid %u:%u prj %u\n", __le32_to_cpu(lsr->lsr_hdr.lrh_id), PFID(&lsr->lsr_oi.oi_fid), - __le64_to_cpu(lsr->lsr_valid), + (unsigned long long)__le64_to_cpu(lsr->lsr_valid), __le32_to_cpu(lsr->lsr_uid_h), __le32_to_cpu(lsr->lsr_uid), __le32_to_cpu(lsr->lsr_gid_h), -- 1.8.3.1