From patchwork Tue Nov 10 19:30:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11895135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A56B9C61DD8 for ; Tue, 10 Nov 2020 19:31:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E79D20665 for ; Tue, 10 Nov 2020 19:31:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wZeGjKIo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E79D20665 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none 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 39AA189C03; Tue, 10 Nov 2020 19:31:35 +0000 (UTC) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id C422C89BF1 for ; Tue, 10 Nov 2020 19:31:27 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id d142so4344831wmd.4 for ; Tue, 10 Nov 2020 11:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WSjLdlLWJSq+5kS7GDyIv4rvxAPSqu/8nkKg/bHUTUY=; b=wZeGjKIorbPA0c0PrlnhLlnJk1itC4n0nTzOcbguHLU7XW0VZKuUzrj6ysHsa+HgNf w80Z4ZeECtO1M3dSL3w3Km0+DR8inGbS+ShcfNMffu1CCsTlpt6i1jnIPaOWiagzdSsF KB/Qkz60IzImuWaMW9jQO2moRwFqPcXUHZALrSO8+nwWhPW4OLj9h32zxfuCObMGF9Y9 BSaHqq6YxNO/GPXJY9vH4OokQ4Tsg4I5CXONrwyGmojixpVvyZaWI1FfECBoomawAlB3 ERQO8NE4MsR79/f7r0YqSxeqgu1rnXeqaWlkb7gxWwisrbJppmH2hD7OItJ6C9wbbQk0 QpiA== 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=WSjLdlLWJSq+5kS7GDyIv4rvxAPSqu/8nkKg/bHUTUY=; b=tnu+BJ+z+IHgmLt3odfn1nZmucCFodvZIt7YGi6FDj0U6RH/obHEzfJewC1M+psgLC 5IUHmaiNfi2QLSDS9WFliGB9dXMPn0hftMSM0HN8F6W/T1qgshTVnMzXFErjSx96fWZ6 6psZByX+7Pyxl9PxHylR0iz0V7BIr5HB91aoZVUSkiChi3DUpHlwxuU3R+Z6HjwxDO23 TjhyTSslYzioVJb91tREqxncV3NInK5ArFKrJZygLwN+zY691GeuMoyguwMx3vqgryi2 H4Zns74QMsB7JcgYuQzI/6Tin575liTuERZUiv9tJ1Eh7VGY2+bHrE2FKWcfryZ5YhCF KLig== X-Gm-Message-State: AOAM532nDC7QmuMFQI/ieOIOA36fPl7Ii+wGNA8KcmG1Z/yPu6Djkb8v PuxHT6oH4oqqH5+8NOy2Pg1rYw== X-Google-Smtp-Source: ABdhPJy8WfbcOgUKu6Mr5z7B464nWgTV0uVrAjvMbugVW8Im4qbasXQpfUC+3jFMjGemwfCn1sfFyw== X-Received: by 2002:a1c:448:: with SMTP id 69mr736733wme.12.1605036686390; Tue, 10 Nov 2020 11:31:26 -0800 (PST) Received: from dell.default ([91.110.221.139]) by smtp.gmail.com with ESMTPSA id 30sm17635335wrs.84.2020.11.10.11.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 11:31:25 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 08/30] drm/radeon/ci_dpm: Remove set but unused variable 'dpm_event_src' Date: Tue, 10 Nov 2020 19:30:50 +0000 Message-Id: <20201110193112.988999-9-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201110193112.988999-1-lee.jones@linaro.org> References: <20201110193112.988999-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" And the piece of code that has never been executed. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/radeon/ci_dpm.c: In function ‘ci_set_dpm_event_sources’: drivers/gpu/drm/radeon/ci_dpm.c:1369:28: warning: variable ‘dpm_event_src’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/radeon/ci_dpm.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c index 886e9959496fe..8324aca5fd006 100644 --- a/drivers/gpu/drm/radeon/ci_dpm.c +++ b/drivers/gpu/drm/radeon/ci_dpm.c @@ -1366,7 +1366,6 @@ static void ci_set_dpm_event_sources(struct radeon_device *rdev, u32 sources) { struct ci_power_info *pi = ci_get_pi(rdev); bool want_thermal_protection; - enum radeon_dpm_event_src dpm_event_src; u32 tmp; switch (sources) { @@ -1376,28 +1375,17 @@ static void ci_set_dpm_event_sources(struct radeon_device *rdev, u32 sources) break; case (1 << RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL): want_thermal_protection = true; - dpm_event_src = RADEON_DPM_EVENT_SRC_DIGITAL; break; case (1 << RADEON_DPM_AUTO_THROTTLE_SRC_EXTERNAL): want_thermal_protection = true; - dpm_event_src = RADEON_DPM_EVENT_SRC_EXTERNAL; break; case ((1 << RADEON_DPM_AUTO_THROTTLE_SRC_EXTERNAL) | (1 << RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL)): want_thermal_protection = true; - dpm_event_src = RADEON_DPM_EVENT_SRC_DIGIAL_OR_EXTERNAL; break; } if (want_thermal_protection) { -#if 0 - /* XXX: need to figure out how to handle this properly */ - tmp = RREG32_SMC(CG_THERMAL_CTRL); - tmp &= DPM_EVENT_SRC_MASK; - tmp |= DPM_EVENT_SRC(dpm_event_src); - WREG32_SMC(CG_THERMAL_CTRL, tmp); -#endif - tmp = RREG32_SMC(GENERAL_PWRMGT); if (pi->thermal_protection) tmp &= ~THERMAL_PROTECTION_DIS;