]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Use memset to initialize variables in amdgpu_dm_atomic_commit_tail
authorNathan Chancellor <natechancellor@gmail.com>
Fri, 1 Feb 2019 20:14:28 +0000 (13:14 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Feb 2019 02:15:32 +0000 (21:15 -0500)
commit19afd79951e6303dbe0d15293a2f66ceb4c772f6
tree5ffed7fd5cfa7f94f3a664d91e42fc0ec1a0d665
parentd6d36b55a0f394a3895349285ed6980278809489
drm/amd/display: Use memset to initialize variables in amdgpu_dm_atomic_commit_tail

Clang warns:

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5089:60:
warning: suggest braces around initialization of subobject
[-Wmissing-braces]
                struct dc_surface_update dummy_updates[MAX_SURFACES] = { 0 };
                                                                         ^
                                                                         {}

Previous efforts to fix this type of warning by adding or removing
braces have been met with some pushback in favor of using memset [1][2].
Do that here, mirroring commit 05794eff1aa6 ("drm/amdgpu/gmc: fix
compiler errors [-Werror,-Wmissing-braces] (V2)") in this tree.

[1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9684@amd.com/
[2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.davem@davemloft.net/

Fixes: 02d6a6fcdf68 ("drm/amd/display: Simplify underscan and ABM commit")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c