Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp579428pxb; Fri, 8 Jan 2021 12:21:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxX0c55C+0ZImkSV6ODcZAPTqAGu0mgDTHgu2P9QcBlVtIYzFk4DWlfKc6KKHWDYTSutKZp X-Received: by 2002:a17:907:206a:: with SMTP id qp10mr3796497ejb.432.1610137286860; Fri, 08 Jan 2021 12:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610137286; cv=none; d=google.com; s=arc-20160816; b=NxYE1zZcsOPMsKtCzvbbxTNKVE+QhR+L1vmSyjUP1+IPbqdj2WrhZoaqBaHe1y6TgY D5JT4PKP0ADHbUSd7P0H/q+57q/C8qa6hRQaLehoJNz+I6uoaxPIXQ5SEvFv824Ic3hE F0zo7yOCIfUrYUuk//8Jzwu7n6nvzyW1CbdxNN+MaikpUzDRhdjIJhPU2QbGd4mngHDW QzMMIYAcCTCkHnBwTAW5CTXCVeXMnDG5TSple3hdbIGR5XjY8s/B3EjOzhYZH1v3OZyU CQFLyXzyx6W1WGs50e82x/2PhFw9MaCmAr/Av4aYq2/sSJrTd4Am6XLF2Y5v07D7p7RS Rxqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2YbZqZMpXxFWUfLfazawHX6Ul5l98eF2j1+JdfYq+I0=; b=Yk1MUPSsSuAL8nCY679ffIlCb9Fo7g6I7t0R/Wkb2MKlN9nd0kzEJ08xAP0G8YLuf6 QQeyiSzlUgYIRpPkGNLo5wE9K0ts8q3f+BgtVGf8S6m5IbtLmAkXVshBb4QN5RkGYLvZ bHEodDHXhXkOvkiNJZK/6xPBTFW581ALmHc3gQzlveEE4n18etKrpEANyyVzeBvxWzAQ QkYEMIK9qbmfsfwMBobyP0WHDduf60wW5cZK/JgiHl6UsCNEQtl5STqRqUIYMKwQPrB9 paTaJap1HqtlO+H9SfGk1ps+icBNz0moRLDTEQAtO0hr9DRmBrtE8s4hN6P4kD0r9uNb xRBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LF0DUdko; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di13si3980688edb.412.2021.01.08.12.21.03; Fri, 08 Jan 2021 12:21:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LF0DUdko; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729600AbhAHUSu (ORCPT + 99 others); Fri, 8 Jan 2021 15:18:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729282AbhAHUQp (ORCPT ); Fri, 8 Jan 2021 15:16:45 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34AEFC061246 for ; Fri, 8 Jan 2021 12:15:49 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id r7so10142521wrc.5 for ; Fri, 08 Jan 2021 12:15:49 -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=2YbZqZMpXxFWUfLfazawHX6Ul5l98eF2j1+JdfYq+I0=; b=LF0DUdkoHdmvzblDhce37V9TWsLDe1dZxIxHP/4mt1D85NHvxbmxWWFNmay9mC0Anm +fH5Rwe0O2yf+zgF/VUlOw9Tmo7+cNs1Jtkf0U8SXp1rRQcDCzePm/cF5MzshIn253wB D96pZSPhRi7PfxFyz/KxNaBO5MYrKdpX7nWcyOoMC30hZX/Ze71Rm/b2RJfh+nF5/303 xZz/GpqBv9yIKyYzQUy5PeKKCvNiD4YcxZiGK4DUpi0C0RPPViCNf0nX3haG7pfr5JXh W9DcQGuPGcp4MDnI5hxDlQAL0z37BfAcQjLlnLkJHYIf4jEFDypcBec0Xm5SHbJeiqna Wypg== 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=2YbZqZMpXxFWUfLfazawHX6Ul5l98eF2j1+JdfYq+I0=; b=B3gs3BIdNsPyABkxDnPz6cLkBUGAjX1MmlE9I7fBjI7MdQ2Mvvri5pmwpLMyLfi/26 uuLNIivb2skWX5VNfD8wKVX3UsPObHUkfI6xF6DGDDZdZWKOs/0aNgKh9x4BvkF68ZcB DJnwI7JI62SGhURsP0eYqPGKEDgLPJMeluNabnUaauJ3aO85WB5fiHK3juidvDREQuPj B8Ei2RU7DCCeSEXwC6ShU6VA3Fjf+Ez15fw7wa878X2DEvPeUYp+40jSNnq4ivCm37sj EAqtWZC+nDDIc6SC++PrmsRJ0aHWzi22IQ91ZqVLqQIBUkUtcNJQzU50ugKkcIiYtS91 3CEw== X-Gm-Message-State: AOAM533GXPIodCs5m8HNM/ES7A7Av4FK0fUXTCO9MCyzYGbxHkgWrBm5 oj4JUZrf/sQvOnpme+tUdiyNYA== X-Received: by 2002:adf:c18d:: with SMTP id x13mr5165454wre.128.1610136947898; Fri, 08 Jan 2021 12:15:47 -0800 (PST) Received: from dell.default ([91.110.221.229]) by smtp.gmail.com with ESMTPSA id l8sm15598671wrb.73.2021.01.08.12.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 12:15:47 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Mauro Rossi , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 30/40] drm/amd/display/dc/dce/dce_dmcu: Move 'abm_gain_stepsize' to only source file it's used in Date: Fri, 8 Jan 2021 20:14:47 +0000 Message-Id: <20210108201457.3078600-31-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210108201457.3078600-1-lee.jones@linaro.org> References: <20210108201457.3078600-1-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org And only declare it if it's to be used. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_dmcu.h:320:23: warning: ‘abm_gain_stepsize’ defined but not used [-Wunused-const-variable=] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c index fa2b47d41ee2f..30264fc151a2b 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c @@ -65,6 +65,10 @@ //Register access policy version #define mmMP0_SMN_C2PMSG_91 0x1609B +#if defined(CONFIG_DRM_AMD_DC_DCN) +static const uint32_t abm_gain_stepsize = 0x0060; +#endif + static bool dce_dmcu_init(struct dmcu *dmcu) { // Do nothing diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h index 93e7f34d4775e..cefb7f5bf42cc 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h @@ -317,6 +317,4 @@ struct dmcu *dcn21_dmcu_create( void dce_dmcu_destroy(struct dmcu **dmcu); -static const uint32_t abm_gain_stepsize = 0x0060; - #endif /* _DCE_ABM_H_ */ -- 2.25.1