[dpdk-dev] [PATCH] vfio: remove unnecessary explicit type casting

Burakov, Anatoly anatoly.burakov at intel.com
Wed Sep 16 15:38:11 CEST 2020


On 16-Sep-20 1:41 PM, wangyunjian wrote:
> From: Yunjian Wang <wangyunjian at huawei.com>
> 
> The variables 'vfio_res->nb_maps' and 'i' are of type int. The type
> casting of 'vfio_res->nb_maps' is redundant and not required.
> 
> Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
> ---

I wonder if we should make vfio_res->nb_maps to be an unsigned int 
instead. I don't think we ever expect number of mappings to be negative...

-- 
Thanks,
Anatoly


More information about the dev mailing list