[-next] io_uring: remove set but not used variable 'ret'
diff mbox series

Message ID 20190525122904.12792-1-yuehaibing@huawei.com
State New
Headers show
Series
  • [-next] io_uring: remove set but not used variable 'ret'
Related show

Commit Message

Yuehaibing May 25, 2019, 12:29 p.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

fs/io_uring.c: In function io_ring_submit:
fs/io_uring.c:2279:7: warning: variable ret set but not used [-Wunused-but-set-variable]

It's not used since commit f3fafe4103bd ("io_uring: add support for sqe links")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/io_uring.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jens Axboe May 25, 2019, 2:50 p.m. UTC | #1
On 5/25/19 6:29 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> fs/io_uring.c: In function io_ring_submit:
> fs/io_uring.c:2279:7: warning: variable ret set but not used [-Wunused-but-set-variable]
> 
> It's not used since commit f3fafe4103bd ("io_uring: add support for sqe links")

Some of the submission logic in that commit needs to be reworked, so I'm
not going to fold this patch in.

Patch
diff mbox series

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 8ef9d8d3c88b..e2bbd227ab2a 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2276,7 +2276,6 @@  static int io_ring_submit(struct io_ring_ctx *ctx, unsigned int to_submit)
 
 	for (i = 0; i < to_submit; i++) {
 		struct sqe_submit s;
-		int ret;
 
 		if (!io_get_sqring(ctx, &s))
 			break;
@@ -2292,7 +2291,7 @@  static int io_ring_submit(struct io_ring_ctx *ctx, unsigned int to_submit)
 		s.needs_fixed_file = false;
 		submit++;
 
-		ret = io_submit_sqe(ctx, &s, statep, &link);
+		io_submit_sqe(ctx, &s, statep, &link);
 	}
 	io_commit_sqring(ctx);