drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 20 Aug 2023 09:51:13 +0000 (11:51 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 19:26:32 +0000 (15:26 -0400)
commitff49bd2c74f2e9659c942aff9629b5fcbffed97f
tree0415722bb3dd47dfa0b83e95b124cc0fcf1be9f2
parentac0ec1c7d1f0d017d0ea44954026d2f138c581e4
drm/amdgpu: Explicitly add a flexible array at the end of 'struct amdgpu_bo_list'

'struct amdgpu_bo_list' is really used as if it was ended by a flex array.
So make it more explicit and add a 'struct amdgpu_bo_list_entry entries[]'
field at the end of the structure.

This way, struct_size() can be used when it is allocated.
It is less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h