[v3,2/4] vfio: fix wrong return value for FreeBSD

Message ID e6c78025127457557cbe19a0cd2a1f1ea325f047.1635430513.git.anatoly.burakov@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v3,1/4] vfio: drop fallback Linux implementation |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Burakov, Anatoly Oct. 28, 2021, 2:15 p.m. UTC
  On FreeBSD, `rte_vfio_clear_group()` was returning 0 even though this
function is not valid for FreeBSD, and is called out to return error in
doxygen comments. Fix the return value to match documentation.

Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/eal/freebsd/eal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Chenbo Xia Nov. 5, 2021, 2:50 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Anatoly Burakov
> Sent: Thursday, October 28, 2021 10:15 PM
> To: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>
> Cc: stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v3 2/4] vfio: fix wrong return value for FreeBSD
> 
> On FreeBSD, `rte_vfio_clear_group()` was returning 0 even though this
> function is not valid for FreeBSD, and is called out to return error in
> doxygen comments. Fix the return value to match documentation.
> 

Fix tag?

/Chenbo

> Cc: stable@dpdk.org
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  lib/eal/freebsd/eal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
> index 9935356ed4..dada210b19 100644
> --- a/lib/eal/freebsd/eal.c
> +++ b/lib/eal/freebsd/eal.c
> @@ -1032,7 +1032,7 @@ int rte_vfio_noiommu_is_enabled(void)
> 
>  int rte_vfio_clear_group(__rte_unused int vfio_group_fd)
>  {
> -	return 0;
> +	return -1;
>  }
> 
>  int
> --
> 2.25.1
  

Patch

diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index 9935356ed4..dada210b19 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -1032,7 +1032,7 @@  int rte_vfio_noiommu_is_enabled(void)
 
 int rte_vfio_clear_group(__rte_unused int vfio_group_fd)
 {
-	return 0;
+	return -1;
 }
 
 int