linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] io_uring: Remove unused function req_ref_put
@ 2022-01-13 16:20 Jiapeng Chong
  2022-01-13 19:44 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2022-01-13 16:20 UTC (permalink / raw)
  To: axboe; +Cc: asml.silence, io-uring, linux-kernel, Jiapeng Chong, Abaci Robot

Fix the following clang warnings:

fs/io_uring.c:1195:20: warning: unused function 'req_ref_put'
[-Wunused-function].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 fs/io_uring.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index de9c9de90655..fa3277844d2e 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1192,12 +1192,6 @@ static inline bool req_ref_put_and_test(struct io_kiocb *req)
 	return atomic_dec_and_test(&req->refs);
 }
 
-static inline void req_ref_put(struct io_kiocb *req)
-{
-	WARN_ON_ONCE(!(req->flags & REQ_F_REFCOUNT));
-	WARN_ON_ONCE(req_ref_put_and_test(req));
-}
-
 static inline void req_ref_get(struct io_kiocb *req)
 {
 	WARN_ON_ONCE(!(req->flags & REQ_F_REFCOUNT));
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] io_uring: Remove unused function req_ref_put
  2022-01-13 16:20 [PATCH] io_uring: Remove unused function req_ref_put Jiapeng Chong
@ 2022-01-13 19:44 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-01-13 19:44 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: asml.silence, io-uring, linux-kernel, Abaci Robot

On 1/13/22 9:20 AM, Jiapeng Chong wrote:
> Fix the following clang warnings:
> 
> fs/io_uring.c:1195:20: warning: unused function 'req_ref_put'
> [-Wunused-function].
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

This was introduced by:

aa43477b0402 ("io_uring: poll rework")

so I added a Fixes line for that. Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2022-01-13 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 16:20 [PATCH] io_uring: Remove unused function req_ref_put Jiapeng Chong
2022-01-13 19:44 ` 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).