commit | 553d66cb1e8667aadb57e3804775c5ce1724a49b | [log] [tgz] |
---|---|---|
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | Thu Apr 18 13:46:24 2019 -0500 |
committer | Joerg Roedel <jroedel@suse.de> | Fri Apr 26 16:43:21 2019 +0200 |
tree | 3dc090290d3953b7d86de91166a4b612025a6129 | |
parent | f7b0c4ce8cb3c09cb3cbfc0c663268bf99e5fa9c [diff] |
iommu/vt-d: Use struct_size() helper 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 <gustavo@embeddedor.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>