Skip to contentSkip to conversation

block: ublk_drv: Remove unused function

PATCH Applied Jiapeng Chong 3 participants 3 messages Oct 19, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: ublk_drv: Remove unused function

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'.

---
 drivers/block/ublk_drv.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/block/ublk_drv.c +0 -9
index c34474451908..83600b45e12a 100644
@@ -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);
Signature · 1 line
2.20.1.7.g153144c
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jiapeng Chong

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'.

Fixes b4e1353f4651 ("ublk: simplify aborting request")

Thanks,
Ming

maintainer Applied
#2 lore raw
In reply to Jiapeng Chong
Quoted 6 lines · Jiapeng Chong

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,

Signature · 1 line
Jens Axboe