public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: ublk_drv: Remove unused function
@ 2023-10-19  3:04 Jiapeng Chong
  2023-10-19  3:13 ` Ming Lei
  2023-10-19 11:31 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2023-10-19  3:04 UTC (permalink / raw)
  To: ming.lei; +Cc: axboe, linux-block, linux-kernel, Jiapeng Chong, Abaci Robot

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

drivers/block/ublk_drv.c:1211:20: warning: unused function 'ublk_abort_io_cmds'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6938
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/block/ublk_drv.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index c34474451908..83600b45e12a 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -1208,15 +1208,6 @@ static inline void ublk_forward_io_cmds(struct ublk_queue *ubq,
 		__ublk_rq_task_work(blk_mq_rq_from_pdu(data), issue_flags);
 }
 
-static inline void ublk_abort_io_cmds(struct ublk_queue *ubq)
-{
-	struct llist_node *io_cmds = llist_del_all(&ubq->io_cmds);
-	struct ublk_rq_data *data, *tmp;
-
-	llist_for_each_entry_safe(data, tmp, io_cmds, node)
-		__ublk_abort_rq(ubq, blk_mq_rq_from_pdu(data));
-}
-
 static void ublk_rq_task_work_cb(struct io_uring_cmd *cmd, unsigned issue_flags)
 {
 	struct ublk_uring_cmd_pdu *pdu = ublk_get_uring_cmd_pdu(cmd);
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] block: ublk_drv: Remove unused function
  2023-10-19  3:04 [PATCH] block: ublk_drv: Remove unused function Jiapeng Chong
@ 2023-10-19  3:13 ` Ming Lei
  2023-10-19 11:31 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Ming Lei @ 2023-10-19  3:13 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: axboe, linux-block, linux-kernel, Abaci Robot

On Thu, Oct 19, 2023 at 11:04:44AM +0800, Jiapeng Chong wrote:
> The function are defined in the ublk_drv.c file, but not called
> elsewhere, so delete the unused function.
> 
> drivers/block/ublk_drv.c:1211:20: warning: unused function 'ublk_abort_io_cmds'.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6938
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Fixes: b4e1353f4651 ("ublk: simplify aborting request")

Reviewed-by: Ming Lei <ming.lei@rehdat.com>


Thanks,
Ming


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

* Re: [PATCH] block: ublk_drv: Remove unused function
  2023-10-19  3:04 [PATCH] block: ublk_drv: Remove unused function Jiapeng Chong
  2023-10-19  3:13 ` Ming Lei
@ 2023-10-19 11:31 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2023-10-19 11:31 UTC (permalink / raw)
  To: ming.lei, Jiapeng Chong; +Cc: linux-block, linux-kernel, Abaci Robot


On Thu, 19 Oct 2023 11:04:44 +0800, Jiapeng Chong wrote:
> The function are defined in the ublk_drv.c file, but not called
> elsewhere, so delete the unused function.
> 
> drivers/block/ublk_drv.c:1211:20: warning: unused function 'ublk_abort_io_cmds'.
> 
> 

Applied, thanks!

[1/1] block: ublk_drv: Remove unused function
      commit: 411957553bca681f6c6a64f419c352bb7d87c2a5

Best regards,
-- 
Jens Axboe




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

end of thread, other threads:[~2023-10-19 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-19  3:04 [PATCH] block: ublk_drv: Remove unused function Jiapeng Chong
2023-10-19  3:13 ` Ming Lei
2023-10-19 11:31 ` Jens Axboe

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