From patchwork Mon Jul 8 14:11:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168653 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7219807ilk; Mon, 8 Jul 2019 07:11:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTmOO+6qLNoKU0TfJfHBjybox2VQUHxnj8d9Rk9p1TGYyHxFnKe0GGF+ze8guS6S0sI8bo X-Received: by 2002:a17:902:e210:: with SMTP id ce16mr25486493plb.335.1562595088424; Mon, 08 Jul 2019 07:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562595088; cv=none; d=google.com; s=arc-20160816; b=Kmp8lrd+4zg9qKFWcD7nlbR6jCOJDb/8LBYRTb+jTZqntI1Rkgb3IliabvGYA2Rpe+ 5c29kVD3beK14T22Amc/OSHWOU/br8YfBCHfeVWWWSbZl6jx7Qo7Cy2Jpy6eyqG7YyBO GiuLqZRjswMg8dk9z/Na4mAGvWyfmU2peLtmHYplkcib0aYMlRj9DMTLDacwLVvimCFH HVp2qb2dD0hLFtrZ+z3t7cuaIiE2KMIuEXL0lSRKa2dn9vKC5V0u9IApiHaPj3xl6xBL sybQECue5bFEBwRv+EL8LySUm5O6KSRrHFkiUViC9q1404LGgEKykMktrBgk+wujnVhG tHcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=uCHtLWrFt9/Xp9gYWn8NyTIp+aIf33+4m7UrbnmcTYk=; b=RuxGlEhqqPyzRE6Evrn8Mok11yzS9Ee4jNuQUSPgE4OROyVORV+yE7EtarhJK5zkvM vQvC0DyDRTi1y5b9r7WkqXjU6iCnkdCY09/xGJhpdUUhweOrmAcYfoPg7c4tZc5jIBtf wwtccUGA4eK1XM5t/rfR+cWU6dS/CUVvAvUOq1JJhoqhsoeQQeXN8OSQx5JEJlhq0bgt 2vWQgBPngLzG1Zs13mP+VKceN3p6M3x8vpZ5u9fZJQDBO+1IxV/oM9F2I5Y3fJ/90RSy wuT1H+gN57QYjSEeShrTDd21IZtC8WkxqB2qDY+wtRyg+Pl73+ATKJHmQjKI/yMb8+tK qroA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id r33si4292827pgm.371.2019.07.08.07.11.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jul 2019 07:11:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5866689DA6; Mon, 8 Jul 2019 14:11:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B73289DA6; Mon, 8 Jul 2019 14:11:25 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mx0VH-1ih8Qe1h99-00ySN3; Mon, 08 Jul 2019 16:11:19 +0200 From: Arnd Bergmann To: Rex Zhu , Evan Quan , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH] amdgpu: fix warning about misplaced initializers Date: Mon, 8 Jul 2019 16:11:06 +0200 Message-Id: <20190708141117.1466888-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:Riw7pyi5fcHlFYgLggi5fT891CARP6ay/3Mzo3v4QtTa3qKzhQL AQJ5rjrUB+ksQGEJNzGPSGY7yey1IZtuSLtkqHiHYkZZHHBjhihEsGvdLsAuTFIdsn/oxzu nq4sGwyPUsnY4YgfBmWzhwKz+kmnJCA+z8nBP0iM5TttL8c2eVGLIaz+ghEYdtZlgSO8U+o E06XZtUGrB9dO+gikaOTQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:fbwEaYXrfiE=:z53MLd0Y/hSMEKZsD0Sie0 sRZ863E1F83owcszbx/t58wXHyeQ6pp5Tlg2GQII6QloINaPdTd0oaEbdF8lUbhIEA9rCI8sx lnDbMzc8cl7jz8aAFbx8t7dznlvqsaABgwe/pOcqFsRJu3PmHNudN54+HrmnFI1XfFB/r4uVI LtOoKxm6aEMdIrtAL8xCgXg42LmsiFZ4SvL0KxcCZrKQl96EotWj4LmiN0cevwUSSUylS4hb2 yQQaeYKMi1RJcKWGeQYpPORmgX/CIeMwbUExQMeCsEpeb5yzKUx50boK3bSqTNNZ1E3PgduYL lVE1jAFMh2M/RDAOrDclN07mjq3Ui3F5FYCITaiKFk9ioKso03vvNtCsPC448ruep2SwwzBWS 5FOtJhfXxHljhx3hTD4JgX0ScPUSAzjRk/Iloymuz2gpHOp1kW1wOP0YTRrN1D2mUEhj1tcpE xbAYfXORYm0EgoKTwFQxYWox/YmAAFDym8GE0IFuq4REEqFPEIfSaykWyuu0S9zcvWj9f2NE+ kyryAoGZRaswOEtF0yu3igVAaasJHnSN2DHeopqwDTBoPoDJQQ36acpV9iW29cdDzHOmET7Y9 tUEHHWa4yNVcH51K4IAL5hndtUReNt/Rii5CG19WTu1QPNLcuZ1BW1oY2XYb1jGQaUWMs78wN ZGHnXeoSmwOyOJOGtFx7bUAlwlBgeDqh0J1UxViQPxxaI+a6AuzOsEYzZxlIQX9I/IYNR8FkC amQgy5tB2Rs7+Rkvq8MViI6LV5JEXrM9i4+7xA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Kevin Wang , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Huang Rui , dri-devel@lists.freedesktop.org, Kenneth Feng , Hawking Zhang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The navi10_ppt code contains two instances of an incorrect struct initializer: drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:601:33: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] static SmuMetrics_t metrics = {0}; ^ {} drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c:905:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] SmuMetrics_t metrics = {0}; ^ Setting it to {} instead of {0} is correct and more portable here. Fixes: ab43c4bf1cc8 ("drm/amd/powerplay: fix fan speed show error (for hwmon pwm)") Fixes: 98e1a543c7b1 ("drm/amd/powerplay: add function get current clock freq interface for navi10") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index fdcea2b944ab..ce1da9e6e1bf 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -606,7 +606,7 @@ static int navi10_get_current_clk_freq_by_table(struct smu_context *smu, enum smu_clk_type clk_type, uint32_t *value) { - static SmuMetrics_t metrics = {0}; + static SmuMetrics_t metrics = {}; int ret = 0, clk_id = 0; if (!value) @@ -957,7 +957,7 @@ static bool navi10_is_dpm_running(struct smu_context *smu) static int navi10_get_fan_speed(struct smu_context *smu, uint16_t *value) { - SmuMetrics_t metrics = {0}; + SmuMetrics_t metrics = {}; int ret = 0; if (!value)