mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH next] drm/xe/xe_sriov_vfio: Fix return value in xe_sriov_vfio_migration_supported()
@ 2025-12-05 11:39 Dan Carpenter
  2025-12-05 12:05 ` Michal Wajdeczko
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-12-05 11:39 UTC (permalink / raw)
  To: Michał Winiarski
  Cc: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
	David Airlie, Simona Vetter, Michal Wajdeczko, intel-xe,
	dri-devel, linux-kernel, kernel-janitors

The xe_sriov_vfio_migration_supported() function is type bool so
returning -EPERM means returning true.  Return false instead.

Fixes: 17f22465c5a5 ("drm/xe/pf: Export helpers for VFIO")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/xe/xe_sriov_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_sriov_vfio.c b/drivers/gpu/drm/xe/xe_sriov_vfio.c
index e9a7615bb5c5..3da81af97b8b 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vfio.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vfio.c
@@ -21,7 +21,7 @@ EXPORT_SYMBOL_FOR_MODULES(xe_sriov_vfio_get_pf, "xe-vfio-pci");
 bool xe_sriov_vfio_migration_supported(struct xe_device *xe)
 {
 	if (!IS_SRIOV_PF(xe))
-		return -EPERM;
+		return false;
 
 	return xe_sriov_pf_migration_supported(xe);
 }
-- 
2.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH next] drm/xe/xe_sriov_vfio: Fix return value in xe_sriov_vfio_migration_supported()
  2025-12-05 11:39 [PATCH next] drm/xe/xe_sriov_vfio: Fix return value in xe_sriov_vfio_migration_supported() Dan Carpenter
@ 2025-12-05 12:05 ` Michal Wajdeczko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Wajdeczko @ 2025-12-05 12:05 UTC (permalink / raw)
  To: Dan Carpenter, Michał Winiarski
  Cc: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
	David Airlie, Simona Vetter, intel-xe, dri-devel, linux-kernel,
	kernel-janitors



On 12/5/2025 12:39 PM, Dan Carpenter wrote:
> The xe_sriov_vfio_migration_supported() function is type bool so
> returning -EPERM means returning true.  Return false instead.
> 
> Fixes: 17f22465c5a5 ("drm/xe/pf: Export helpers for VFIO")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_sriov_vfio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vfio.c b/drivers/gpu/drm/xe/xe_sriov_vfio.c
> index e9a7615bb5c5..3da81af97b8b 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vfio.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_vfio.c
> @@ -21,7 +21,7 @@ EXPORT_SYMBOL_FOR_MODULES(xe_sriov_vfio_get_pf, "xe-vfio-pci");
>  bool xe_sriov_vfio_migration_supported(struct xe_device *xe)
>  {
>  	if (!IS_SRIOV_PF(xe))
> -		return -EPERM;
> +		return false;
>  
>  	return xe_sriov_pf_migration_supported(xe);
>  }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-05 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-05 11:39 [PATCH next] drm/xe/xe_sriov_vfio: Fix return value in xe_sriov_vfio_migration_supported() Dan Carpenter
2025-12-05 12:05 ` Michal Wajdeczko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®