public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring: Remove unused function
@ 2024-03-28  2:23 Jiapeng Chong
  2024-03-28 13:43 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2024-03-28  2:23 UTC (permalink / raw)
  To: axboe; +Cc: asml.silence, io-uring, linux-kernel, Jiapeng Chong, Abaci Robot

The function are defined in the io_uring.c file, but not called
elsewhere, so delete the unused function.

io_uring/io_uring.c:646:20: warning: unused function '__io_cq_unlock'.

Reported-by: Abaci Robot <[email protected]>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8660
Signed-off-by: Jiapeng Chong <[email protected]>
---
 io_uring/io_uring.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 585fbc363eaf..8a9584c5c8ce 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -643,12 +643,6 @@ static inline void __io_cq_lock(struct io_ring_ctx *ctx)
 		spin_lock(&ctx->completion_lock);
 }
 
-static inline void __io_cq_unlock(struct io_ring_ctx *ctx)
-{
-	if (!ctx->lockless_cq)
-		spin_unlock(&ctx->completion_lock);
-}
-
 static inline void io_cq_lock(struct io_ring_ctx *ctx)
 	__acquires(ctx->completion_lock)
 {
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] io_uring: Remove unused function
  2024-03-28  2:23 [PATCH] io_uring: Remove unused function Jiapeng Chong
@ 2024-03-28 13:43 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-03-28 13:43 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: asml.silence, io-uring, linux-kernel, Abaci Robot


On Thu, 28 Mar 2024 10:23:24 +0800, Jiapeng Chong wrote:
> The function are defined in the io_uring.c file, but not called
> elsewhere, so delete the unused function.
> 
> io_uring/io_uring.c:646:20: warning: unused function '__io_cq_unlock'.
> 
> 

Applied, thanks!

[1/1] io_uring: Remove unused function
      commit: 976a421d86422abb554b4544ddcad31f1cade3a4

Best regards,
-- 
Jens Axboe




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

end of thread, other threads:[~2024-03-28 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28  2:23 [PATCH] io_uring: Remove unused function Jiapeng Chong
2024-03-28 13:43 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox