On Mon, 2026-03-02 at 15:24 -0500, Jeff Layton wrote:
> Convert hfsplus i_ino format strings to use the PRIino format
> macro in preparation for the widening of i_ino via kino_t.
>
> Also correct signed format specifiers to unsigned, since inode
> numbers are unsigned values.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> fs/hfsplus/attributes.c | 10 +++++-----
> fs/hfsplus/catalog.c | 2 +-
> fs/hfsplus/dir.c | 6 +++---
> fs/hfsplus/extents.c | 6 +++---
> fs/hfsplus/inode.c | 8 ++++----
> fs/hfsplus/super.c | 6 +++---
> fs/hfsplus/xattr.c | 10 +++++-----
> 7 files changed, 24 insertions(+), 24 deletions(-)
>
> diff --git a/fs/hfsplus/attributes.c b/fs/hfsplus/attributes.c
> index 4b79cd606276e31c20fa18ef3a099596f50e8a0f..d0b3f58166a057c0a5bf2e41cf6fc839798c0ded 100644
> --- a/fs/hfsplus/attributes.c
> +++ b/fs/hfsplus/attributes.c
> @@ -203,7 +203,7 @@ int hfsplus_create_attr_nolock(struct inode *inode, const char *name,
> int entry_size;
> int err;
>
> - hfs_dbg("name %s, ino %ld\n",
> + hfs_dbg("name %s, ino %" PRIino "u\n",
> name ? name : NULL, inode->i_ino);
>
> if (name) {
> @@ -255,7 +255,7 @@ int hfsplus_create_attr(struct inode *inode,
> hfsplus_attr_entry *entry_ptr;
> int err;
>
> - hfs_dbg("name %s, ino %ld\n",
> + hfs_dbg("name %s, ino %" PRIino "u\n",
> name ? name : NULL, inode->i_ino);
>
> if (!HFSPLUS_SB(sb)->attr_tree) {
> @@ -337,7 +337,7 @@ int hfsplus_delete_attr_nolock(struct inode *inode, const char *name,
> struct super_block *sb = inode->i_sb;
> int err;
>
> - hfs_dbg("name %s, ino %ld\n",
> + hfs_dbg("name %s, ino %" PRIino "u\n",
> name ? name : NULL, inode->i_ino);
>
> if (name) {
> @@ -367,7 +367,7 @@ int hfsplus_delete_attr(struct inode *inode, const char *name)
> struct super_block *sb = inode->i_sb;
> struct hfs_find_data fd;
>
> - hfs_dbg("name %s, ino %ld\n",
> + hfs_dbg("name %s, ino %" PRIino "u\n",
> name ? name : NULL, inode->i_ino);
>
> if (!HFSPLUS_SB(sb)->attr_tree) {
> @@ -436,7 +436,7 @@ int hfsplus_replace_attr(struct inode *inode,
> hfsplus_attr_entry *entry_ptr;
> int err = 0;
>
> - hfs_dbg("name %s, ino %ld\n",
> + hfs_dbg("name %s, ino %" PRIino "u\n",
> name ? name : NULL, inode->i_ino);
>
> if (!HFSPLUS_SB(sb)->attr_tree) {
> diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
> index 02c1eee4a4b86059ceaab7a7c68ab65adba6fa26..d422f117c60dee6fd8ece0d01d4ce66e04421e4a 100644
> --- a/fs/hfsplus/catalog.c
> +++ b/fs/hfsplus/catalog.c
> @@ -441,7 +441,7 @@ int hfsplus_rename_cat(u32 cnid,
> int entry_size, type;
> int err;
>
> - hfs_dbg("cnid %u - ino %lu, name %s - ino %lu, name %s\n",
> + hfs_dbg("cnid %u - ino %" PRIino "u, name %s - ino %" PRIino "u, name %s\n",
> cnid, src_dir->i_ino, src_name->name,
> dst_dir->i_ino, dst_name->name);
> err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &src_fd);
> diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
> index d559bf8625f853d50fd316d157cf8afe22069565..e701b11437f09172f88d68b4e4f5998591572b38 100644
> --- a/fs/hfsplus/dir.c
> +++ b/fs/hfsplus/dir.c
> @@ -313,7 +313,7 @@ static int hfsplus_link(struct dentry *src_dentry, struct inode *dst_dir,
> if (!S_ISREG(inode->i_mode))
> return -EPERM;
>
> - hfs_dbg("src_dir->i_ino %lu, dst_dir->i_ino %lu, inode->i_ino %lu\n",
> + hfs_dbg("src_dir->i_ino %" PRIino "u, dst_dir->i_ino %" PRIino "u, inode->i_ino %" PRIino "u\n",
> src_dir->i_ino, dst_dir->i_ino, inode->i_ino);
>
> mutex_lock(&sbi->vh_mutex);
> @@ -385,7 +385,7 @@ static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)
> if (HFSPLUS_IS_RSRC(inode))
> return -EPERM;
>
> - hfs_dbg("dir->i_ino %lu, inode->i_ino %lu\n",
> + hfs_dbg("dir->i_ino %" PRIino "u, inode->i_ino %" PRIino "u\n",
> dir->i_ino, inode->i_ino);
>
> mutex_lock(&sbi->vh_mutex);
> @@ -393,7 +393,7 @@ static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)
> if (inode->i_ino == cnid &&
> atomic_read(&HFSPLUS_I(inode)->opencnt)) {
> str.name = name;
> - str.len = sprintf(name, "temp%lu", inode->i_ino);
> + str.len = sprintf(name, "temp%" PRIino "u", inode->i_ino);
> res = hfsplus_rename_cat(inode->i_ino,
> dir, &dentry->d_name,
> sbi->hidden_dir, &str);
> diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
> index 8e886514d27f1e5d4d94be75142f197669e62234..1dbfdf44f954f2768852678d1e386a91758848f9 100644
> --- a/fs/hfsplus/extents.c
> +++ b/fs/hfsplus/extents.c
> @@ -275,7 +275,7 @@ int hfsplus_get_block(struct inode *inode, sector_t iblock,
> mutex_unlock(&hip->extents_lock);
>
> done:
> - hfs_dbg("ino %lu, iblock %llu - dblock %u\n",
> + hfs_dbg("ino %" PRIino "u, iblock %llu - dblock %u\n",
> inode->i_ino, (long long)iblock, dblock);
>
> mask = (1 << sbi->fs_shift) - 1;
> @@ -476,7 +476,7 @@ int hfsplus_file_extend(struct inode *inode, bool zeroout)
> goto out;
> }
>
> - hfs_dbg("ino %lu, start %u, len %u\n", inode->i_ino, start, len);
> + hfs_dbg("ino %" PRIino "u, start %u, len %u\n", inode->i_ino, start, len);
>
> if (hip->alloc_blocks <= hip->first_blocks) {
> if (!hip->first_blocks) {
> @@ -545,7 +545,7 @@ void hfsplus_file_truncate(struct inode *inode)
> u32 alloc_cnt, blk_cnt, start;
> int res;
>
> - hfs_dbg("ino %lu, phys_size %llu -> i_size %llu\n",
> + hfs_dbg("ino %" PRIino "u, phys_size %llu -> i_size %llu\n",
> inode->i_ino, (long long)hip->phys_size, inode->i_size);
>
> if (inode->i_size > hip->phys_size) {
> diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
> index 922ff41df042a83d47364f2d941c45dabda29afb..f61397db976e8b15fa186c3b31af71e55f9e26a6 100644
> --- a/fs/hfsplus/inode.c
> +++ b/fs/hfsplus/inode.c
> @@ -230,7 +230,7 @@ static int hfsplus_get_perms(struct inode *inode,
> inode->i_flags &= ~S_APPEND;
> return 0;
> bad_type:
> - pr_err("invalid file type 0%04o for inode %lu\n", mode, inode->i_ino);
> + pr_err("invalid file type 0%04o for inode %" PRIino "u\n", mode, inode->i_ino);
> return -EIO;
> }
>
> @@ -328,7 +328,7 @@ int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
> struct hfsplus_vh *vhdr = sbi->s_vhdr;
> int error = 0, error2;
>
> - hfs_dbg("inode->i_ino %lu, start %llu, end %llu\n",
> + hfs_dbg("inode->i_ino %" PRIino "u, start %llu, end %llu\n",
> inode->i_ino, start, end);
>
> error = file_write_and_wait_range(file, start, end);
> @@ -639,7 +639,7 @@ int hfsplus_cat_write_inode(struct inode *inode)
> hfsplus_cat_entry entry;
> int res = 0;
>
> - hfs_dbg("inode->i_ino %lu\n", inode->i_ino);
> + hfs_dbg("inode->i_ino %" PRIino "u\n", inode->i_ino);
>
> if (HFSPLUS_IS_RSRC(inode))
> main_inode = HFSPLUS_I(inode)->rsrc_inode;
> @@ -716,7 +716,7 @@ int hfsplus_cat_write_inode(struct inode *inode)
> if (!res) {
> res = hfs_btree_write(tree);
> if (res) {
> - pr_err("b-tree write err: %d, ino %lu\n",
> + pr_err("b-tree write err: %d, ino %" PRIino "u\n",
> res, inode->i_ino);
> }
> }
> diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
> index 7229a8ae89f9469109b1c3a317ee9b7705a83f8b..b76865e2eac5260b681fc46b297f1665f1bc10da 100644
> --- a/fs/hfsplus/super.c
> +++ b/fs/hfsplus/super.c
> @@ -156,7 +156,7 @@ static int hfsplus_system_write_inode(struct inode *inode)
> int err = hfs_btree_write(tree);
>
> if (err) {
> - pr_err("b-tree write err: %d, ino %lu\n",
> + pr_err("b-tree write err: %d, ino %" PRIino "u\n",
> err, inode->i_ino);
> return err;
> }
> @@ -169,7 +169,7 @@ static int hfsplus_write_inode(struct inode *inode,
> {
> int err;
>
> - hfs_dbg("ino %lu\n", inode->i_ino);
> + hfs_dbg("ino %" PRIino "u\n", inode->i_ino);
>
> err = hfsplus_ext_write_extent(inode);
> if (err)
> @@ -184,7 +184,7 @@ static int hfsplus_write_inode(struct inode *inode,
>
> static void hfsplus_evict_inode(struct inode *inode)
> {
> - hfs_dbg("ino %lu\n", inode->i_ino);
> + hfs_dbg("ino %" PRIino "u\n", inode->i_ino);
> truncate_inode_pages_final(&inode->i_data);
> clear_inode(inode);
> if (HFSPLUS_IS_RSRC(inode)) {
> diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c
> index 9904944cbd54e3d326591fa65a5ed678f38ca583..ef9121843482e81961fa541c53c906ab04d6fc33 100644
> --- a/fs/hfsplus/xattr.c
> +++ b/fs/hfsplus/xattr.c
> @@ -277,7 +277,7 @@ int __hfsplus_setxattr(struct inode *inode, const char *name,
> u16 folder_finderinfo_len = sizeof(DInfo) + sizeof(DXInfo);
> u16 file_finderinfo_len = sizeof(FInfo) + sizeof(FXInfo);
>
> - hfs_dbg("ino %lu, name %s, value %p, size %zu\n",
> + hfs_dbg("ino %" PRIino "u, name %s, value %p, size %zu\n",
> inode->i_ino, name ? name : NULL,
> value, size);
>
> @@ -447,7 +447,7 @@ int hfsplus_setxattr(struct inode *inode, const char *name,
> NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + 1;
> int res;
>
> - hfs_dbg("ino %lu, name %s, prefix %s, prefixlen %zu, "
> + hfs_dbg("ino %" PRIino "u, name %s, prefix %s, prefixlen %zu, "
> "value %p, size %zu\n",
> inode->i_ino, name ? name : NULL,
> prefix ? prefix : NULL, prefixlen,
> @@ -607,7 +607,7 @@ ssize_t hfsplus_getxattr(struct inode *inode, const char *name,
> int res;
> char *xattr_name;
>
> - hfs_dbg("ino %lu, name %s, prefix %s\n",
> + hfs_dbg("ino %" PRIino "u, name %s, prefix %s\n",
> inode->i_ino, name ? name : NULL,
> prefix ? prefix : NULL);
>
> @@ -717,7 +717,7 @@ ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size)
> size_t strbuf_size;
> int xattr_name_len;
>
> - hfs_dbg("ino %lu\n", inode->i_ino);
> + hfs_dbg("ino %" PRIino "u\n", inode->i_ino);
>
> if (!is_xattr_operation_supported(inode))
> return -EOPNOTSUPP;
> @@ -819,7 +819,7 @@ static int hfsplus_removexattr(struct inode *inode, const char *name)
> int is_xattr_acl_deleted;
> int is_all_xattrs_deleted;
>
> - hfs_dbg("ino %lu, name %s\n",
> + hfs_dbg("ino %" PRIino "u, name %s\n",
> inode->i_ino, name ? name : NULL);
>
> if (!HFSPLUS_SB(inode->i_sb)->attr_tree)
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Thanks,
Slava.