diff mbox series

io_uring: Delete useless variable ‘id’ in io_prep_async_work

Message ID 20210105135340.51287-1-yebin10@huawei.com (mailing list archive)
State New, archived
Headers show
Series io_uring: Delete useless variable ‘id’ in io_prep_async_work | expand

Commit Message

yebin (H) Jan. 5, 2021, 1:53 p.m. UTC
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(-)

Comments

Jens Axboe Jan. 5, 2021, 6:34 p.m. UTC | #1
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.
diff mbox series

Patch

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;