amd/amdgpu_ctx: Use struct_size() helper and kmalloc() (v2)
authorGustavo A. R. Silva <gustavoars@kernel.org>
Thu, 8 Oct 2020 14:34:50 +0000 (09:34 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Oct 2020 18:44:39 +0000 (14:44 -0400)
commit201a4eb9dc960b6c081936e0990e289959707996
treef16b731687fac7a8bbc7bc4b006d5e94e997fe18
parent562f150fb93b44884f467f531b18cb0b8fdb2ff4
amd/amdgpu_ctx: Use struct_size() helper and kmalloc() (v2)

Make use of the new struct_size() helper instead of the offsetof() idiom.
Also, use kmalloc() instead of kcalloc().

v2: squash in kzalloc fix

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c