[dpdk-dev] [PATCH 2/2] eal/vfio: cleanup getting group fd
Burakov, Anatoly
anatoly.burakov at intel.com
Wed Sep 26 14:34:21 CEST 2018
On 17-Sep-18 2:46 PM, Darek Stojaczyk wrote:
> From: Dariusz Stojaczyk <dariuszx.stojaczyk at intel.com>
>
> Factor out duplicated code.
>
> Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk at intel.com>
> ---
<snip>
> +
> +int
> +rte_vfio_get_group_fd(int iommu_group_num)
> +{
> + struct vfio_config *vfio_cfg;
> +
> + /* get the vfio_config it belongs to */
> + vfio_cfg = get_vfio_cfg_by_group_num(iommu_group_num);
> + vfio_cfg = vfio_cfg ? vfio_cfg : default_vfio_cfg;
I tend to prefer being explicit rather than implicit (i.e. 'vfio_cfg ==
NULL' instead of 'vfio_cfg').
Otherwise,
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
--
Thanks,
Anatoly
More information about the dev
mailing list