From 131f559c5a241f15b8a91009968dfbd9a5dcddeb 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' Fixes: 80447caf980 LU-14926 utils: print unlink and setattr recs in llog_reader Signed-off-by: Gian-Carlo DeFazio Change-Id: I939b94626d2707b6ff644324c5c2798218331c4d Reviewed-on: https://review.whamcloud.com/46588 Reviewed-by: Andreas Dilger Tested-by: jenkins Reviewed-by: Olaf Faaland-LLNL Tested-by: Maloo --- 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 b03d5df..1f574c0 100644 --- a/lustre/utils/llog_reader.c +++ b/lustre/utils/llog_reader.c @@ -920,7 +920,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)); } @@ -937,7 +937,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), @@ -949,7 +949,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