Skip to contentSkip to conversation

linux-next: build warning after merge of the block tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Apr 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced this 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;
| ^

Introduced by commit

16b217ed7bb3 ("io_uring: store SCM state in io_fixed_file->file_ptr")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:

Quoted 8 lines

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;
| ^

Introduced by commit

16b217ed7bb3 ("io_uring: store SCM state in io_fixed_file->file_ptr")

Thanks, looks like I forgot to amend. Will fix it up.

Signature · 1 line
Jens Axboe
#2 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 4 lines · On Thu, 21 Apr 2022 12:02:03 +1000 Stephen Rothwell <[email protected]>…

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:

Quoted 8 lines

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;
| ^

Introduced by commit

16b217ed7bb3 ("io_uring: store SCM state in io_fixed_file->file_ptr")

This become a build failure for i386 defconfig, so I added the following patch.

From: Stephen Rothwell <[email protected]>
Date: Thu, 21 Apr 2022 15:34:32 +1000
Subject: [PATCH] fix up for "io_uring: store SCM state in
io_fixed_file->file_ptr"

---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/io_uring.c +1 -1
index 1f6004ba0463..9ace35873810 100644
@@ -8989,9 +8989,9 @@ static void io_free_file_tables(struct io_file_table *table)
 
 static void __io_sqe_files_unregister(struct io_ring_ctx *ctx)
 {
+#if !defined(IO_URING_SCM_ALL)
 	int i;
 
-#if !defined(IO_URING_SCM_ALL)
 	for (i = 0; i < ctx->nr_user_files; i++) {
 		struct file *file = io_file_from_index(ctx, i);
 
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell