Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] io_uring: Delete useless variable ‘id’ in io_prep_async_work
@ 2021-01-05 13:53 Ye Bin
  2021-01-05 18:34 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Ye Bin @ 2021-01-05 13:53 UTC (permalink / raw)
  To: axboe, viro, io-uring, linux-fsdevel, linux-kernel; +Cc: Ye Bin

Fix follow warning:
fs/io_uring.c:1523:22: warning: variable ‘id’ set but not used
[-Wunused-but-set-variable]
  struct io_identity *id;
                        ^~
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 fs/io_uring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index ca46f314640b..7880cfe01e4b 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1520,10 +1520,8 @@ static void io_prep_async_work(struct io_kiocb *req)
 {
 	const struct io_op_def *def = &io_op_defs[req->opcode];
 	struct io_ring_ctx *ctx = req->ctx;
-	struct io_identity *id;
 
 	io_req_init_async(req);
-	id = req->work.identity;
 
 	if (req->flags & REQ_F_FORCE_ASYNC)
 		req->work.flags |= IO_WQ_WORK_CONCURRENT;
-- 
2.16.2.dirty


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

* Re: [PATCH] io_uring: Delete useless variable ‘id’ in io_prep_async_work
  2021-01-05 13:53 [PATCH] io_uring: Delete useless variable ‘id’ in io_prep_async_work Ye Bin
@ 2021-01-05 18:34 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-01-05 18:34 UTC (permalink / raw)
  To: Ye Bin, viro, io-uring, linux-fsdevel, linux-kernel

On 1/5/21 6:53 AM, Ye Bin wrote:
> Fix follow warning:
> fs/io_uring.c:1523:22: warning: variable ‘id’ set but not used
> [-Wunused-but-set-variable]
>   struct io_identity *id;
>                         ^~

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2021-01-05 18:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 13:53 [PATCH] io_uring: Delete useless variable ‘id’ in io_prep_async_work Ye Bin
2021-01-05 18:34 ` 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).