Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1758470ybi; Wed, 3 Jul 2019 22:54:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOSQCicNwpxQNpYz7u2F83NNfSRFaqUj6MigCvVz/dSoK/xKWm/mhxWoP7Abbzi0aaEPw5 X-Received: by 2002:a63:1310:: with SMTP id i16mr22484595pgl.187.1562219674322; Wed, 03 Jul 2019 22:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562219674; cv=none; d=google.com; s=arc-20160816; b=ZzXU911+YaOuotHqlt1Ia1JyWhTxxFR08Kw1CmlozaFrV8amM6mgMTqAeFrzTN32AS 8QCEiwV3QiqFLaPEc2ZCoqDyPZZ+njZPwlwIunMF03R7f0yrgMdREwanHv07V+BOTYOL LZVVeOtes04wtbw6ZAOmaWtrzYT5mvjv4qZJw0gdXPFkFLjMK9BGaQDW4OKWCazRrIU4 dd1db7rk7QU+9kkBF4k3CevuqHUEyDOLU7SEVQDBoflcWgXj4phOxGcfTVH3C9dDy4q6 IGQTNApRYfrvI4J8mFJyt6PNdSdIJojSGXUhGxKzFVgGRDdaRvIZNJweQvmC6pNo4v2f DNcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=N8j4/lfObWKsySJXHjiTJhYwv3YoOUa3RyuF9b2OiCM=; b=Diwg9KSx8/7BGiUhem3DXa8fZGC1f4EL3lRqmYUjaUUHB8t7oTBos/qTl12qI/uN2s gcsmcaJ+JCJP3VqF7mJax5YQYSuJcxh16rpR+jyEgna0ySyfbdfXN2fInRpzaG2mShBL jkPJl/nMAR0tA4P1HdLqoF36BYqRJjq+ONyMUtGkOntvmAZmaRUAXrOpAlynn3SU5WGa lQQ++hjm4BrkxKyy8SQ3BF7EhixWUlnPu5cD6cstqzYqjDnVFy6kFb57IUINtENVCrWl r9nOAU52G1sVPGGDHWR3ois4cD+tFMIgOypZXkQSesTFhnNdcTUmrG3kPWrUL6qEKIB5 27Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=knXHCJL6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i185si4610060pge.505.2019.07.03.22.54.19; Wed, 03 Jul 2019 22:54:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=knXHCJL6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727389AbfGDFxH (ORCPT + 99 others); Thu, 4 Jul 2019 01:53:07 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:42297 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfGDFw6 (ORCPT ); Thu, 4 Jul 2019 01:52:58 -0400 Received: by mail-ed1-f67.google.com with SMTP id z25so4215483edq.9 for ; Wed, 03 Jul 2019 22:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N8j4/lfObWKsySJXHjiTJhYwv3YoOUa3RyuF9b2OiCM=; b=knXHCJL6QcZzMVgVNUiZIanYTejfXIDYg2v2DTquN8FlJf1PUoIPvsEtxcfPAoYlHC UEoUo//wjy3wqe8hDRPSZlJm6o1NaokVDYHJZqYjtg/2Ll4hDOsP50MQs1ObKlZlKGdK vlKr9Og8jwfSHADn/MqQXE17Mt2OCsbSNbCM0qFPR8cmCbdgSVqfGkXq81DMswrni7wT CmzUNIMVIm0tuj8dkJJddCMCVOSE8ziuHNXVRz7m0TdgV1bqSextCYzGeA+MMtXNZziH m37DPf7guudTsok5GLEYP0pgKsKJYisHc7u9FSdNVi8gu48ggzD9wWuDqyvQ5Xr4vPaU NTLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N8j4/lfObWKsySJXHjiTJhYwv3YoOUa3RyuF9b2OiCM=; b=Uge13VHPE9lMaI/wL+e0k4mO/9OYYpbrnt1C7yNLTvU2IGsSOQf2PZdqWZ+nxxkwmS 84qIwm2O2h20IV3XNgX7pc8I2NZfosWSZWT5XiGXxC6OFGJ8A3OiQfymDfmz1DPL+h3/ yYxrHcnIOkg09vYzAzgwR2eXkEaTuXfISqBLtllvVS47BhPlxNnuMN+3wcsepPACvxwL zpgMzRd/vCuLBO/OIa9DO41z42xwNXUuKpRhuoMyIxiBP8Mc4OiPsITq8QlTnVWQ9S/M Ez2TwrVjf6VNs5yuzPmS/t+Pi8Y4tFosYkvSITn31/BlxfgoNRrZ3CKb6Akh1RhSAu97 YeEQ== X-Gm-Message-State: APjAAAVXkNh11OX+/CF7EXffcxTgYb2DyIIRvQ9xSJQfOnR//RdP7iCc iO0epXKqL6v0PjZqMlIuHLM= X-Received: by 2002:aa7:d68e:: with SMTP id d14mr46710516edr.253.1562219576755; Wed, 03 Jul 2019 22:52:56 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:2b:2b15::2]) by smtp.gmail.com with ESMTPSA id j30sm1343532edb.8.2019.07.03.22.52.55 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 22:52:56 -0700 (PDT) From: Nathan Chancellor To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , Harry Wentland , Leo Li , Rex Zhu , Evan Quan Cc: David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 6/7] drm/amd/powerplay: Use proper enums in vega20_print_clk_levels Date: Wed, 3 Jul 2019 22:52:17 -0700 Message-Id: <20190704055217.45860-7-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190704055217.45860-1-natechancellor@gmail.com> References: <20190704055217.45860-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang warns: drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39: warning: implicit conversion from enumeration type 'PPCLK_e' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1016:39: warning: implicit conversion from enumeration type 'PPCLK_e' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1031:39: warning: implicit conversion from enumeration type 'PPCLK_e' to different enumeration type 'enum smu_clk_type' [-Wenum-conversion] ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ The values are mapped one to one in vega20_get_smu_clk_index so just use the proper enums here. Fixes: 096761014227 ("drm/amd/powerplay: support sysfs to get socclk, fclk, dcefclk") Link: https://github.com/ClangBuiltLinux/linux/issues/587 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c index 0f14fe14ecd8..e62dd6919b24 100644 --- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c @@ -992,7 +992,7 @@ static int vega20_print_clk_levels(struct smu_context *smu, break; case SMU_SOCCLK: - ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now); + ret = smu_get_current_clk_freq(smu, SMU_SOCCLK, &now); if (ret) { pr_err("Attempt to get current socclk Failed!"); return ret; @@ -1013,7 +1013,7 @@ static int vega20_print_clk_levels(struct smu_context *smu, break; case SMU_FCLK: - ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now); + ret = smu_get_current_clk_freq(smu, SMU_FCLK, &now); if (ret) { pr_err("Attempt to get current fclk Failed!"); return ret; @@ -1028,7 +1028,7 @@ static int vega20_print_clk_levels(struct smu_context *smu, break; case SMU_DCEFCLK: - ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now); + ret = smu_get_current_clk_freq(smu, SMU_DCEFCLK, &now); if (ret) { pr_err("Attempt to get current dcefclk Failed!"); return ret; -- 2.22.0