From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: ext4: use PRIino format for i_ino Date: Wed, 04 Mar 2026 08:15:04 +1000 Message-ID: In-Reply-To: <20260302-iino-u64-v2-7-e5388800dae0@kernel.org> References: <20260302-iino-u64-v2-0-e5388800dae0@kernel.org> <20260302-iino-u64-v2-7-e5388800dae0@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review The largest individual filesystem patch (19 files, ~620 lines of diff). The format string changes are mechanical, but the arithmetic changes deserve attention: ```c - *group = (*group + parent->i_ino) % ngroups; + *group = (*group + (unsigned int)parent->i_ino) % ngroups; ``` This cast to `unsigned int` prevents a u64 modulo on 32-bit (which would require `div_u64()`). Since ext4 inode numbers fit in 32 bits, this is correct. However, using `(u32)` would be more idiomatic in kernel code. ```c - goal = (((inode->i_ino - 1) / EXT4_INODES_PER_GROUP(inode->i_sb)) * + goal = (div_u64(inode->i_ino - 1, EXT4_INODES_PER_GROUP(inode->i_sb)) * ``` Correct -- `div_u64()` is needed because 64-bit division by 32-bit value requires a helper on 32-bit arches. ```c - int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + int hash = (unsigned int)ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; ``` Same pattern as above, correct for ext4. The `__field(ino_t, ...)` to `__field(u64, ...)` changes in ext4 trace events are also correct. The type change from `unsigned long` to `kino_t` for the `ino` parameter in `__ext4_grp_locked_error()` is correct. ### PATCHES 8-58: Filesystem-specific PRIino conversions These are all mechanical format string conversions. I sampled several (nfsd, lockd, nfs, f2fs, jbd2, locks, proc, 9p, affs, afs, befs, cachefiles, ceph, drm/amdgpu, fsnotify, net, uprobes, dma-buf, fscrypt, fsverity, iomap, and the VFS core). They all follow the same pattern of replacing `%lu`/`%lx` with `"%" PRIino "u"`/`"%" PRIino "x"` and changing local variable types from `unsigned long` to `kino_t` where appropriate. The drm/amdgpu patch (050) is a good example of the minimal changes needed: ```c - seq_printf(m, " imported from ino:%lu", file_inode(dma_buf->file)->i_ino); + seq_printf(m, " imported from ino:%" PRIino "u", file_inode(dma_buf->file)->i_ino); ``` **No issues found in the sampled patches.** --- Generated by Claude Code Patch Reviewer