On 4/26/19 9:44 AM, Joerg Roedel wrote:
> On Thu, Apr 18, 2019 at 01:46:24PM -0500, Gustavo A. R. Silva wrote:
>> Make use of the struct_size() helper instead of an open-coded version
>> in order to avoid any potential type mistakes, in particular in the
>> context in which this code is being used.
>>
>> So, replace code of the following form:
>>
>> size = sizeof(*info) + level * sizeof(info->path[0]);
>>
>> with:
>>
>> size = struct_size(info, path, level);
>>
>> Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
> 
> Applied, thanks.
> 

Great. :)

Thanks, Joerg.
--
Gustavo
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to