Skip to content

Commit 78b0f58

Browse files
henryZedchinner
authored andcommitted
xfs: clean up "%Ld/%Lu" which doesn't meet C standard
The "%Ld" specifier, which represents long long unsigned, doesn't meet C language standard, and even more, it makes people easily mistake with "%ld", which represent long unsigned. So replace "%Ld" with "lld". Do the same with "%Lu". Signed-off-by: Zeng Heng <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent 5617104 commit 78b0f58

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ xfs_check_block(
294294
else
295295
thispa = XFS_BMBT_PTR_ADDR(mp, block, j, dmxr);
296296
if (*thispa == *pp) {
297-
xfs_warn(mp, "%s: thispa(%d) == pp(%d) %Ld",
297+
xfs_warn(mp, "%s: thispa(%d) == pp(%d) %lld",
298298
__func__, j, i,
299299
(unsigned long long)be64_to_cpu(*thispa));
300300
xfs_err(mp, "%s: ptrs are equal in node\n",

fs/xfs/libxfs/xfs_inode_fork.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ xfs_iformat_local(
7878
*/
7979
if (unlikely(size > XFS_DFORK_SIZE(dip, ip->i_mount, whichfork))) {
8080
xfs_warn(ip->i_mount,
81-
"corrupt inode %Lu (bad size %d for local fork, size = %zd).",
81+
"corrupt inode %llu (bad size %d for local fork, size = %zd).",
8282
(unsigned long long) ip->i_ino, size,
8383
XFS_DFORK_SIZE(dip, ip->i_mount, whichfork));
8484
xfs_inode_verifier_error(ip, -EFSCORRUPTED,
@@ -192,7 +192,7 @@ xfs_iformat_btree(
192192
XFS_DFORK_SIZE(dip, mp, whichfork) ||
193193
ifp->if_nextents > ip->i_nblocks) ||
194194
level == 0 || level > XFS_BM_MAXLEVELS(mp, whichfork)) {
195-
xfs_warn(mp, "corrupt inode %Lu (btree).",
195+
xfs_warn(mp, "corrupt inode %llu (btree).",
196196
(unsigned long long) ip->i_ino);
197197
xfs_inode_verifier_error(ip, -EFSCORRUPTED,
198198
"xfs_iformat_btree", dfp, size,

fs/xfs/xfs_inode.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,7 +3119,7 @@ xfs_iflush(
31193119
if (XFS_TEST_ERROR(dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC),
31203120
mp, XFS_ERRTAG_IFLUSH_1)) {
31213121
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
3122-
"%s: Bad inode %Lu magic number 0x%x, ptr "PTR_FMT,
3122+
"%s: Bad inode %llu magic number 0x%x, ptr "PTR_FMT,
31233123
__func__, ip->i_ino, be16_to_cpu(dip->di_magic), dip);
31243124
goto flush_out;
31253125
}
@@ -3129,7 +3129,7 @@ xfs_iflush(
31293129
ip->i_df.if_format != XFS_DINODE_FMT_BTREE,
31303130
mp, XFS_ERRTAG_IFLUSH_3)) {
31313131
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
3132-
"%s: Bad regular inode %Lu, ptr "PTR_FMT,
3132+
"%s: Bad regular inode %llu, ptr "PTR_FMT,
31333133
__func__, ip->i_ino, ip);
31343134
goto flush_out;
31353135
}
@@ -3140,7 +3140,7 @@ xfs_iflush(
31403140
ip->i_df.if_format != XFS_DINODE_FMT_LOCAL,
31413141
mp, XFS_ERRTAG_IFLUSH_4)) {
31423142
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
3143-
"%s: Bad directory inode %Lu, ptr "PTR_FMT,
3143+
"%s: Bad directory inode %llu, ptr "PTR_FMT,
31443144
__func__, ip->i_ino, ip);
31453145
goto flush_out;
31463146
}
@@ -3158,7 +3158,7 @@ xfs_iflush(
31583158
if (XFS_TEST_ERROR(ip->i_forkoff > mp->m_sb.sb_inodesize,
31593159
mp, XFS_ERRTAG_IFLUSH_6)) {
31603160
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
3161-
"%s: bad inode %Lu, forkoff 0x%x, ptr "PTR_FMT,
3161+
"%s: bad inode %llu, forkoff 0x%x, ptr "PTR_FMT,
31623162
__func__, ip->i_ino, ip->i_forkoff, ip);
31633163
goto flush_out;
31643164
}

fs/xfs/xfs_inode_item_recover.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,15 @@ xlog_recover_inode_commit_pass2(
321321
*/
322322
if (XFS_IS_CORRUPT(mp, !xfs_verify_magic16(bp, dip->di_magic))) {
323323
xfs_alert(mp,
324-
"%s: Bad inode magic number, dip = "PTR_FMT", dino bp = "PTR_FMT", ino = %Ld",
324+
"%s: Bad inode magic number, dip = "PTR_FMT", dino bp = "PTR_FMT", ino = %lld",
325325
__func__, dip, bp, in_f->ilf_ino);
326326
error = -EFSCORRUPTED;
327327
goto out_release;
328328
}
329329
ldip = item->ri_buf[1].i_addr;
330330
if (XFS_IS_CORRUPT(mp, ldip->di_magic != XFS_DINODE_MAGIC)) {
331331
xfs_alert(mp,
332-
"%s: Bad inode log record, rec ptr "PTR_FMT", ino %Ld",
332+
"%s: Bad inode log record, rec ptr "PTR_FMT", ino %lld",
333333
__func__, item, in_f->ilf_ino);
334334
error = -EFSCORRUPTED;
335335
goto out_release;

fs/xfs/xfs_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ int xfs_stats_format(struct xfsstats __percpu *stats, char *buf)
7474
defer_relog += per_cpu_ptr(stats, i)->s.defer_relog;
7575
}
7676

77-
len += scnprintf(buf + len, PATH_MAX-len, "xpc %Lu %Lu %Lu\n",
77+
len += scnprintf(buf + len, PATH_MAX-len, "xpc %llu %llu %llu\n",
7878
xs_xstrat_bytes, xs_write_bytes, xs_read_bytes);
7979
len += scnprintf(buf + len, PATH_MAX-len, "defer_relog %llu\n",
8080
defer_relog);

0 commit comments

Comments
 (0)