ublk: remove unused req argument from ublk_sub_req_ref()
Subsystems (2)
PATCH 1/1 ublk: remove unused req argument from ublk_sub_req_ref()
Since commit b749965edda8 ("ublk: remove ublk_commit_and_fetch()"), ublk_sub_req_ref() no longer uses its struct request *req argument. So drop the argument from ublk_sub_req_ref(), and from ublk_need_complete_req(), which only passes it to ublk_sub_req_ref().
--- drivers/block/ublk_drv.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/block/ublk_drv.c +4 -5
@@ -712,11 +712,11 @@ static inline void ublk_put_req_ref(struct ublk_io *io, struct request *req) {if (refcount_dec_and_test (&io->ref))__ublk_complete_rq (req); } -static inline bool ublk_sub_req_ref (struct ublk_io *io,struct request *req) +static inline bool ublk_sub_req_ref (struct ublk_io *io) {unsigned sub_refs =UBLK_REFCOUNT_INIT - io->task_registered_buffers; io->task_registered_buffers =0 ;return refcount_sub_and_test (sub_refs, &io->ref);
@@ -2241,15 +2241,14 @@ static int ublk_check_commit_and_fetch(const struct ublk_queue *ubq,return 0 ; }static bool ublk_need_complete_req (const struct ublk_queue *ubq, -struct ublk_io *io, -struct request *req) +struct ublk_io *io) {if (ublk_need_req_ref (ubq)) -return ublk_sub_req_ref (io, req); +return ublk_sub_req_ref (io);return true; }static bool ublk_get_data (const struct ublk_queue *ubq,struct ublk_io *io,struct request *req)
@@ -2357,11 +2356,11 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,if (ret) goto out; io->res = ub_cmd->result; req =ublk_fill_io_cmd (io, cmd); ret =ublk_config_io_buf (ubq, io, cmd, ub_cmd->addr, &buf_idx); - compl =ublk_need_complete_req (ubq, io, req); + compl =ublk_need_complete_req (ubq, io);/* can't touch 'ublk_io' any more */ if (buf_idx !=UBLK_INVALID_BUF_IDX )io_buffer_unregister_bvec (cmd, buf_idx, issue_flags);if (req_op (req) ==REQ_OP_ZONE_APPEND )
Signature · 1 line
2.45.2
Quoted 6 lines · Caleb Sander Mateos
Since commit
b749965edda8("ublk: removeublk_commit_and_fetch()"),ublk_sub_req_ref()no longer uses its struct request *req argument. So drop the argument fromublk_sub_req_ref(), and fromublk_need_complete_req(), which only passes it toublk_sub_req_ref().
Applied, thanks!
[1/1] ublk: remove unused req argument from ublk_sub_req_ref()
commit: 01ceec076ba10cb6c9f5642f996203170412cd78
Best regards,
Signature · 1 line
Jens Axboe
Quoted 6 lines · Caleb Sander Mateos
Since commit
b749965edda8("ublk: removeublk_commit_and_fetch()"),ublk_sub_req_ref()no longer uses its struct request *req argument. So drop the argument fromublk_sub_req_ref(), and fromublk_need_complete_req(), which only passes it toublk_sub_req_ref().Signed-off-by Caleb Sander Mateos <[email protected]>
Thanks,
Ming