Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250715154244.1626810-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Caleb Sander Mateos and committed by
Jens Axboe
01ceec07 e56828f4

+4 -5
+4 -5
drivers/block/ublk_drv.c
··· 714 714 __ublk_complete_rq(req); 715 715 } 716 716 717 - static inline bool ublk_sub_req_ref(struct ublk_io *io, struct request *req) 717 + static inline bool ublk_sub_req_ref(struct ublk_io *io) 718 718 { 719 719 unsigned sub_refs = UBLK_REFCOUNT_INIT - io->task_registered_buffers; 720 720 ··· 2243 2243 } 2244 2244 2245 2245 static bool ublk_need_complete_req(const struct ublk_queue *ubq, 2246 - struct ublk_io *io, 2247 - struct request *req) 2246 + struct ublk_io *io) 2248 2247 { 2249 2248 if (ublk_need_req_ref(ubq)) 2250 - return ublk_sub_req_ref(io, req); 2249 + return ublk_sub_req_ref(io); 2251 2250 return true; 2252 2251 } 2253 2252 ··· 2358 2359 io->res = ub_cmd->result; 2359 2360 req = ublk_fill_io_cmd(io, cmd); 2360 2361 ret = ublk_config_io_buf(ubq, io, cmd, ub_cmd->addr, &buf_idx); 2361 - compl = ublk_need_complete_req(ubq, io, req); 2362 + compl = ublk_need_complete_req(ubq, io); 2362 2363 2363 2364 /* can't touch 'ublk_io' any more */ 2364 2365 if (buf_idx != UBLK_INVALID_BUF_IDX)