* [PATCH -next] xfs: remove "%Lu" which doesn't meet C standard
@ 2022-08-23 1:55 Zeng Heng
2022-08-23 14:27 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Zeng Heng @ 2022-08-23 1:55 UTC (permalink / raw)
To: djwong; +Cc: linux-xfs, linux-kernel, zengheng4
The "%Lu" specifier, which represents long long unsigned,
doesn't meet C language standard, and even more,
it makes people easily mistake with "%lu", which represent
long unsigned. So replace "%Lu" with "llu".
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
fs/xfs/xfs_inode.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 28493c8e9bb2..b3eeeae3afe1 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -3119,7 +3119,7 @@ xfs_iflush(
if (XFS_TEST_ERROR(dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC),
mp, XFS_ERRTAG_IFLUSH_1)) {
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
- "%s: Bad inode %Lu magic number 0x%x, ptr "PTR_FMT,
+ "%s: Bad inode %llu magic number 0x%x, ptr "PTR_FMT,
__func__, ip->i_ino, be16_to_cpu(dip->di_magic), dip);
goto flush_out;
}
@@ -3129,7 +3129,7 @@ xfs_iflush(
ip->i_df.if_format != XFS_DINODE_FMT_BTREE,
mp, XFS_ERRTAG_IFLUSH_3)) {
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
- "%s: Bad regular inode %Lu, ptr "PTR_FMT,
+ "%s: Bad regular inode %llu, ptr "PTR_FMT,
__func__, ip->i_ino, ip);
goto flush_out;
}
@@ -3140,7 +3140,7 @@ xfs_iflush(
ip->i_df.if_format != XFS_DINODE_FMT_LOCAL,
mp, XFS_ERRTAG_IFLUSH_4)) {
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
- "%s: Bad directory inode %Lu, ptr "PTR_FMT,
+ "%s: Bad directory inode %llu, ptr "PTR_FMT,
__func__, ip->i_ino, ip);
goto flush_out;
}
@@ -3158,7 +3158,7 @@ xfs_iflush(
if (XFS_TEST_ERROR(ip->i_forkoff > mp->m_sb.sb_inodesize,
mp, XFS_ERRTAG_IFLUSH_6)) {
xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
- "%s: bad inode %Lu, forkoff 0x%x, ptr "PTR_FMT,
+ "%s: bad inode %llu, forkoff 0x%x, ptr "PTR_FMT,
__func__, ip->i_ino, ip->i_forkoff, ip);
goto flush_out;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH -next] xfs: remove "%Lu" which doesn't meet C standard
2022-08-23 1:55 [PATCH -next] xfs: remove "%Lu" which doesn't meet C standard Zeng Heng
@ 2022-08-23 14:27 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2022-08-23 14:27 UTC (permalink / raw)
To: Zeng Heng; +Cc: linux-xfs, linux-kernel
On Tue, Aug 23, 2022 at 09:55:17AM +0800, Zeng Heng wrote:
> The "%Lu" specifier, which represents long long unsigned,
> doesn't meet C language standard, and even more,
> it makes people easily mistake with "%lu", which represent
> long unsigned. So replace "%Lu" with "llu".
>
> Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Yesss finally fixing this
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_inode.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 28493c8e9bb2..b3eeeae3afe1 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -3119,7 +3119,7 @@ xfs_iflush(
> if (XFS_TEST_ERROR(dip->di_magic != cpu_to_be16(XFS_DINODE_MAGIC),
> mp, XFS_ERRTAG_IFLUSH_1)) {
> xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
> - "%s: Bad inode %Lu magic number 0x%x, ptr "PTR_FMT,
> + "%s: Bad inode %llu magic number 0x%x, ptr "PTR_FMT,
> __func__, ip->i_ino, be16_to_cpu(dip->di_magic), dip);
> goto flush_out;
> }
> @@ -3129,7 +3129,7 @@ xfs_iflush(
> ip->i_df.if_format != XFS_DINODE_FMT_BTREE,
> mp, XFS_ERRTAG_IFLUSH_3)) {
> xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
> - "%s: Bad regular inode %Lu, ptr "PTR_FMT,
> + "%s: Bad regular inode %llu, ptr "PTR_FMT,
> __func__, ip->i_ino, ip);
> goto flush_out;
> }
> @@ -3140,7 +3140,7 @@ xfs_iflush(
> ip->i_df.if_format != XFS_DINODE_FMT_LOCAL,
> mp, XFS_ERRTAG_IFLUSH_4)) {
> xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
> - "%s: Bad directory inode %Lu, ptr "PTR_FMT,
> + "%s: Bad directory inode %llu, ptr "PTR_FMT,
> __func__, ip->i_ino, ip);
> goto flush_out;
> }
> @@ -3158,7 +3158,7 @@ xfs_iflush(
> if (XFS_TEST_ERROR(ip->i_forkoff > mp->m_sb.sb_inodesize,
> mp, XFS_ERRTAG_IFLUSH_6)) {
> xfs_alert_tag(mp, XFS_PTAG_IFLUSH,
> - "%s: bad inode %Lu, forkoff 0x%x, ptr "PTR_FMT,
> + "%s: bad inode %llu, forkoff 0x%x, ptr "PTR_FMT,
> __func__, ip->i_ino, ip->i_forkoff, ip);
> goto flush_out;
> }
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-23 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-23 1:55 [PATCH -next] xfs: remove "%Lu" which doesn't meet C standard Zeng Heng
2022-08-23 14:27 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox