]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: allocate large structures dynamically
authorArnd Bergmann <arnd@arndb.de>
Tue, 5 May 2020 14:01:52 +0000 (16:01 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 May 2020 17:12:55 +0000 (13:12 -0400)
commita317b8a1c8332008bab65d94931bfbafd761cd4f
tree8ac17509ea4170453ba7e454fa41f3374745c7c5
parentf31d918fd6166a10dd7a8c08bec5837e5afb02ba
drm/amdgpu: allocate large structures dynamically

After the structure was padded to 1024 bytes, it is no longer
suitable for being a local variable, as the function surpasses
the warning limit for 32-bit architectures:

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:587:5: error: stack frame size of 1072 bytes in function 'amdgpu_ras_feature_enable' [-Werror,-Wframe-larger-than=]
int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
    ^

Use kzalloc() instead to get it from the heap.

Fixes: d38b8fedb9b4 ("drm/amdgpu: update RAS TA to Host interface")
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c