diff options
| author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-08-20 11:51:13 +0200 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2023-08-30 15:26:32 -0400 |
| commit | ff49bd2c74f2e9659c942aff9629b5fcbffed97f (patch) | |
| tree | 0415722bb3dd47dfa0b83e95b124cc0fcf1be9f2 /drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | |
| parent | drm/amd/display: register edp_backlight_control() for DCN301 (diff) | |
| download | linux-ff49bd2c74f2e9659c942aff9629b5fcbffed97f.tar.gz linux-ff49bd2c74f2e9659c942aff9629b5fcbffed97f.zip | |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h index 26c01cb131f2..368e50b30160 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h @@ -55,6 +55,8 @@ struct amdgpu_bo_list { /* Protect access during command submission. */ struct mutex bo_list_mutex; + + struct amdgpu_bo_list_entry entries[]; }; int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id, |
