ublk: don't cast registered buffer index to int
authorCaleb Sander Mateos <csander@purestorage.com>
Sat, 1 Mar 2025 19:03:16 +0000 (12:03 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Mar 2025 14:14:09 +0000 (07:14 -0700)
commit9e12d09cfdaf89db894abdad392bb8dcd6c0f464
treec594f62174799b703ccc549c02a58db6aa905b67
parent6e83a442fbbb5f136c50feb7d137017610bc0738
ublk: don't cast registered buffer index to int

io_buffer_register_bvec() takes index as an unsigned int argument, but
ublk_register_io_buf() casts ub_cmd->addr (a u64) to int. Remove the
misleading cast and instead pass index as an unsigned value to
ublk_register_io_buf() and ublk_unregister_io_buf().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250301190317.950208-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c