diff options
| author | Gustavo A. R. Silva <[email protected]> | 2019-04-18 18:46:24 +0000 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2019-04-26 14:43:21 +0000 |
| commit | 553d66cb1e8667aadb57e3804775c5ce1724a49b (patch) | |
| tree | 3dc090290d3953b7d86de91166a4b612025a6129 /drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | |
| parent | iommu/vt-d: Flush IOTLB for untrusted device in time (diff) | |
| download | kernel-553d66cb1e8667aadb57e3804775c5ce1724a49b.tar.gz kernel-553d66cb1e8667aadb57e3804775c5ce1724a49b.zip | |
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 <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_test.c')
0 files changed, 0 insertions, 0 deletions
