]> git.baikalelectronics.ru Git - kernel.git/commit
vfio/pci: Make vfio_pci_regops->rw() return ssize_t
authorYishai Hadas <yishaih@nvidia.com>
Wed, 21 Jul 2021 13:05:48 +0000 (10:05 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 2 Aug 2021 21:23:42 +0000 (15:23 -0600)
commitd8736bc913d8525b8f366120394785d4f0edad44
tree389676dfbb3ccdd32302cfc93837b77dbb39ae4d
parent0c8dace303f5d8b2acc1dd2525998d317f9c4302
vfio/pci: Make vfio_pci_regops->rw() return ssize_t

The only implementation of this in IGD returns a -ERRNO which is
implicitly cast through a size_t and then casted again and returned as a
ssize_t in vfio_pci_rw().

Fix the vfio_pci_regops->rw() return type to be ssize_t so all is
consistent.

Fixes: a9c9230383fc ("vfio/pci: Add infrastructure for additional device specific regions")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Link: https://lore.kernel.org/r/0-v3-5db12d1bf576+c910-vfio_rw_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci_igd.c
drivers/vfio/pci/vfio_pci_private.h