On Thu, Oct 23, 2025 at 08:09:28PM -0300, Jason Gunthorpe wrote:
> Remove the fallback through the ioctl callback, no drivers use this now.
> 
> Signed-off-by: Jason Gunthorpe <[email protected]>
> ---
>  drivers/vfio/vfio_main.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
> index a390163ce706c4..f056e82ba35075 100644
> --- a/drivers/vfio/vfio_main.c
> +++ b/drivers/vfio/vfio_main.c
> @@ -1297,13 +1297,13 @@ static long vfio_device_fops_unl_ioctl(struct file 
> *filep,
>               break;
>  
>       case VFIO_DEVICE_GET_REGION_INFO:
> -             if (!device->ops->get_region_info)
> -                     goto ioctl_fallback;
> -             ret = device->ops->get_region_info(device, uptr);
> +             if (unlikely(!device->ops->get_region_info))
> +                     ret = -EINVAL;

Nit: Let's also add a warn/err log here highliting that the device
doesn't populate the get_region_info op?

> +             else
> +                     ret = device->ops->get_region_info(device, uptr);
>               break;
>  
>       default:
> -ioctl_fallback:
>               if (unlikely(!device->ops->ioctl))
>                       ret = -EINVAL;
>               else

Reviewed-by: Pranjal Shrivastava <[email protected]>

Thanks,
Praan

Reply via email to