]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/powerplay: fix struct init in renoir_print_clk_levels
authorRaul E Rangel <rrangel@chromium.org>
Tue, 5 Nov 2019 22:58:02 +0000 (15:58 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Nov 2019 21:27:48 +0000 (16:27 -0500)
drivers/gpu/drm/amd/powerplay/renoir_ppt.c:186:2: error: missing braces
around initializer [-Werror=missing-braces]
  SmuMetrics_t metrics = {0};
    ^

Fixes: f75176b23e29 ("drm/amd/powerplay: implement sysfs for getting dpm clock")
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/renoir_ppt.c

index 4a9751971a9dd7762a3e3b9b95cf9a863f60e617..04daf7e9fe0550a2e38f5eb248b7d8d42d8a00f5 100644 (file)
@@ -180,11 +180,13 @@ static int renoir_print_clk_levels(struct smu_context *smu,
        int i, size = 0, ret = 0;
        uint32_t cur_value = 0, value = 0, count = 0, min = 0, max = 0;
        DpmClocks_t *clk_table = smu->smu_table.clocks_table;
-       SmuMetrics_t metrics = {0};
+       SmuMetrics_t metrics;
 
        if (!clk_table || clk_type >= SMU_CLK_COUNT)
                return -EINVAL;
 
+       memset(&metrics, 0, sizeof(metrics));
+
        ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
                               (void *)&metrics, false);
        if (ret)