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

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


On 16-Sep-20 2:38 PM, Burakov, Anatoly wrote:
> 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...
> 

Just checked the code, this would be a big reword as there's lots of 
other places we do this, so for now i'm inclined to leave it be and 
remove the unnecessary casts instead. So,

Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>

-- 
Thanks,
Anatoly


More information about the dev mailing list