Hi Jonathan,

On Thu, Sep 18, 2025 at 09:45:16PM +0000, Jonathan Cavitt wrote:
> We do not need a case switch to check cap_type_id in intel_vgpu_ioctl
> for various reasons (it's impossible to hit the default case in the
> current code, there's only one valid case to check, the error handling
> code overlaps in both cases, etc.).  Simplify the case switch into a
> single if statement.  This has the additional effect of simplifying the
> error handling code.
> 
> Note that it is still currently impossible for
> 'if (cap_type_id == VFIO_REGION_INFO_CAP_SPARSE_MMAP)'
> to fail, but we should still guard against the possibility of this
> changing in the future.
> 
> Signed-off-by: Jonathan Cavitt <[email protected]>
> Cc: Andi Shyti <[email protected]>

Reviewed-by: Andi Shyti <[email protected]>

Thanks,
Andi

Reply via email to