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

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Caleb Sander Mateos and committed by
Jens Axboe
727a4402 6b0a2993

+4 -3
+4 -3
drivers/block/ublk_drv.c
··· 963 963 (req_op(req) == REQ_OP_READ || req_op(req) == REQ_OP_DRV_IN); 964 964 } 965 965 966 - static int ublk_map_io(const struct ublk_queue *ubq, const struct request *req, 967 - const struct ublk_io *io) 966 + static unsigned int ublk_map_io(const struct ublk_queue *ubq, 967 + const struct request *req, 968 + const struct ublk_io *io) 968 969 { 969 970 const unsigned int rq_bytes = blk_rq_bytes(req); 970 971 ··· 987 986 return rq_bytes; 988 987 } 989 988 990 - static int ublk_unmap_io(bool need_map, 989 + static unsigned int ublk_unmap_io(bool need_map, 991 990 const struct request *req, 992 991 const struct ublk_io *io) 993 992 {