All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] io_uring: remove unneeded variable 'ret'
@ 2021-03-09  6:30 Yang Li
  2021-03-09 20:55 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-03-09  6:30 UTC (permalink / raw)
  To: axboe; +Cc: asml.silence, io-uring, linux-kernel, Yang Li

Fix the following coccicheck warning:
./fs/io_uring.c:8984:5-8: Unneeded variable: "ret". Return "0" on line
8998

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.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 92c25b5..387dbb7 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8981,7 +8981,6 @@ static unsigned long io_uring_nommu_get_unmapped_area(struct file *file,
 
 static int io_sqpoll_wait_sq(struct io_ring_ctx *ctx)
 {
-	int ret = 0;
 	DEFINE_WAIT(wait);
 
 	do {
@@ -8995,7 +8994,7 @@ static int io_sqpoll_wait_sq(struct io_ring_ctx *ctx)
 	} while (!signal_pending(current));
 
 	finish_wait(&ctx->sqo_sq_wait, &wait);
-	return ret;
+	return 0;
 }
 
 static int io_get_ext_arg(unsigned flags, const void __user *argp, size_t *argsz,
-- 
1.8.3.1


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

* Re: [PATCH] io_uring: remove unneeded variable 'ret'
  2021-03-09  6:30 [PATCH] io_uring: remove unneeded variable 'ret' Yang Li
@ 2021-03-09 20:55 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-03-09 20:55 UTC (permalink / raw)
  To: Yang Li; +Cc: asml.silence, io-uring, linux-kernel

On 3/8/21 11:30 PM, Yang Li wrote:
> Fix the following coccicheck warning:
> ./fs/io_uring.c:8984:5-8: Unneeded variable: "ret". Return "0" on line
> 8998

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2021-03-09 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09  6:30 [PATCH] io_uring: remove unneeded variable 'ret' Yang Li
2021-03-09 20:55 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.