linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] io_uring: remove set but not used variable 'ret'
@ 2019-05-25 12:29 YueHaibing
  2019-05-25 14:50 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-05-25 12:29 UTC (permalink / raw)
  To: viro, axboe; +Cc: linux-kernel, linux-block, linux-fsdevel, YueHaibing

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(-)

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);
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] io_uring: remove set but not used variable 'ret'
  2019-05-25 12:29 [PATCH -next] io_uring: remove set but not used variable 'ret' YueHaibing
@ 2019-05-25 14:50 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-05-25 14:50 UTC (permalink / raw)
  To: YueHaibing, viro; +Cc: linux-kernel, linux-block, linux-fsdevel

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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-25 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-25 12:29 [PATCH -next] io_uring: remove set but not used variable 'ret' YueHaibing
2019-05-25 14:50 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).