]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix compile warning for 32-bit builds
authorJens Axboe <axboe@kernel.dk>
Mon, 25 Apr 2022 22:43:45 +0000 (16:43 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Apr 2022 22:43:45 +0000 (16:43 -0600)
commitb2babd09baa7838d9d457c1ad29a363a93930123
treee67d2bef11a65ebf22c68e49729ebaecc7a68e13
parent28235a1a40f6adab012b7aa066eee8df99920535
io_uring: fix compile warning for 32-bit builds

If IO_URING_SCM_ALL isn't set, as it would not be on 32-bit builds,
then we trigger a warning:

fs/io_uring.c: In function '__io_sqe_files_unregister':
fs/io_uring.c:8992:13: warning: unused variable 'i' [-Wunused-variable]
 8992 |         int i;
      |             ^

Move the ifdef up to include the 'i' variable declaration.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 8bd895003118 ("io_uring: store SCM state in io_fixed_file->file_ptr")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c