linux_dsm_epyc7002/drivers/gpu/drm/amd/powerplay
Nathan Chancellor d693e8e349 drm/amd/powerplay: Use memset to initialize metrics structs
clang warns:

drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:601:33: warning:
suggest braces around initialization of subobject [-Wmissing-braces]
        static SmuMetrics_t metrics = {0};
                                       ^
                                       {}
drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:905:26: warning:
suggest braces around initialization of subobject [-Wmissing-braces]
        SmuMetrics_t metrics = {0};
                                ^
                                {}
2 warnings generated.

One way to fix these warnings is to add additional braces like clang
suggests; however, there has been a bit of push back from some
maintainers[1][2], who just prefer memset as it is unambiguous, doesn't
depend on a particular compiler version[3], and properly initializes all
subobjects. Do that here so there are no more warnings.

[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/
[3]: https://lore.kernel.org/lkml/20181116150432.2408a075@redhat.com/

Fixes: 98e1a543c7 ("drm/amd/powerplay: add function get current clock freq interface for navi10")
Fixes: ab43c4bf1c ("drm/amd/powerplay: fix fan speed show error (for hwmon pwm)")
Link: https://github.com/ClangBuiltLinux/linux/issues/583
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2019-07-08 13:56:08 -05:00
..
hwmgr drm/amd/powerplay/smu7_hwmgr: replace blocking delay with non-blocking 2019-07-05 15:54:55 -05:00
inc drm/amd/powerplay: add baco smu reset function for smu11 2019-07-05 15:59:08 -05:00
smumgr drm/amd/powerplay: use hardware fan control if no powerplay fan table 2019-07-01 14:54:22 -05:00
amd_powerplay.c drm/amd/powerplay: fix semicolon code style issue 2019-03-19 15:04:03 -05:00
amdgpu_smu.c drm/amd/powerplay: add baco smu reset function for smu11 2019-07-05 15:59:08 -05:00
Makefile drm/amd/powerplay: introduce the navi10 pptable implementation 2019-06-21 18:59:24 -05:00
navi10_ppt.c drm/amd/powerplay: Use memset to initialize metrics structs 2019-07-08 13:56:08 -05:00
navi10_ppt.h drm/amd/powerplay: introduce the navi10 pptable implementation 2019-06-21 18:59:24 -05:00
smu_v11_0.c drm/amd/powerplay: add baco smu reset function for smu11 2019-07-05 15:59:08 -05:00
vega20_ppt.c drm/amdgpu/powerplay: FEATURE_MASK is 64 bit so use ULL 2019-06-25 12:08:19 -05:00
vega20_ppt.h drm/amd/powerplay: simplified od_settings for each asic 2019-06-21 18:59:32 -05:00