Commit 06355592 authored by Alex Williamson's avatar Alex Williamson
Browse files

vfio/type1: Use consistent types for page counts



Page count should more consistently be an unsigned long when passed as
an argument while functions returning a number of pages should use a
signed long to allow for -errno.

vaddr_get_pfns() can therefore be upgraded to return long, though in
practice it's currently limited by the batch capacity.  In fact, the
batch indexes are noted to never hold negative values, so while it
doesn't make sense to bloat the structure with unsigned longs in this
case, it does make sense to specify these as unsigned.

No change in behavior expected.

Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
Reviewed-by: default avatarMitchell Augustin <mitchell.augustin@canonical.com>
Tested-by: default avatarMitchell Augustin <mitchell.augustin@canonical.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20250218222209.1382449-5-alex.williamson@redhat.com


Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent eb996eec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment