mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
ublk: return unsigned from ublk_{,un}map_io()
ublk_map_io() and ublk_unmap_io() never return negative values, and their return values are stored in variables of type unsigned. Clarify that they can't fail by making their return types unsigned. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
6b0a29933f
commit
727a440278
@@ -963,8 +963,9 @@ static inline bool ublk_need_unmap_req(const struct request *req)
|
||||
(req_op(req) == REQ_OP_READ || req_op(req) == REQ_OP_DRV_IN);
|
||||
}
|
||||
|
||||
static int ublk_map_io(const struct ublk_queue *ubq, const struct request *req,
|
||||
const struct ublk_io *io)
|
||||
static unsigned int ublk_map_io(const struct ublk_queue *ubq,
|
||||
const struct request *req,
|
||||
const struct ublk_io *io)
|
||||
{
|
||||
const unsigned int rq_bytes = blk_rq_bytes(req);
|
||||
|
||||
@@ -986,7 +987,7 @@ static int ublk_map_io(const struct ublk_queue *ubq, const struct request *req,
|
||||
return rq_bytes;
|
||||
}
|
||||
|
||||
static int ublk_unmap_io(bool need_map,
|
||||
static unsigned int ublk_unmap_io(bool need_map,
|
||||
const struct request *req,
|
||||
const struct ublk_io *io)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user