From patchwork Fri Nov 6 21:49:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320853 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1657198ilc; Fri, 6 Nov 2020 13:50:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/VzOAbK+ksrbf+BLtrSwb2eGWrrXoq/Vc0JG3GT7G3euCDkdqrmNY3wmwrrnsLJKjANDz X-Received: by 2002:a17:902:bd05:b029:d6:f041:f5b with SMTP id p5-20020a170902bd05b02900d6f0410f5bmr3402731pls.9.1604699423858; Fri, 06 Nov 2020 13:50:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604699423; cv=none; d=google.com; s=arc-20160816; b=Gbekk5To1FlOowZ/qNAGa7VeC3PSXRuUS2Sfd0LJFpg1MESPPImB7og0oDAxt/f5WZ bhMyPZQ8qk2Z6WEkqUEomB5/+abc07mxEL8u/xDZnxLodAmNUVEzyGAUSKsmk/ClmQL5 zRmoAbX2Ef4JUvzrNRpecyfc/jPnh7Ils+fF+qYQVIg8g4JXVEqmvP3Q2UKzI20ybsH/ IKKEx7eJVic0BXyPmYGtU5EDfLfF7L8gb9qRHsKx0LTy3V3aEVgTsCJED6q65PjLZndo gHHCxjEBL+QUJ8VNRLBS+/8gWBuMYZlvuw7xtZxdgBkCPaTCvJYuTWh1gYb2Mz8hM05A iG9A== 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:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=peTr2g6lvfiAkZ5Je4pNCoaVOWzLEPs9IjKG/5amcPo=; b=kXptyMischPPLE0djAkr7idTt9Oe91D5Y5bAJJoLvMPQN/alIsyvk4Er/EADT+hxET 7rPtlC9uLFI1hn/Y0mad5nuY9UUmixcNVoN7Zs6QhJOIFoz+ztYIg5qm/0Ed18YjgCrS gNMM9EPKICCSdKXdx9A5Ub0e3PX3tvKJo0TVVoG8Uht4LC8rZiv3htWKbNR4BK+FXrPS VDP455YXd/BXxUkHlHH0APS4GxeWqb+Iw9n0uR21GNRqz0U/38kgq//QVZ7LKZHvr84T 4HMIhiwK9E5Cq++0dcCrgU7pJ6xzEGcLHO1l6/ytvIsind52UUK5ougtbhFZrMH5lf9z TSdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Fg03f1ie; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.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 o16si2057812pjp.165.2020.11.06.13.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 13:50:23 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Fg03f1ie; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B26966EB2B; Fri, 6 Nov 2020 21:50:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id C9AF56EB26 for ; Fri, 6 Nov 2020 21:50:09 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id g12so2772364wrp.10 for ; Fri, 06 Nov 2020 13:50:09 -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=sSLs3el2OyWbVsEn+pD70NcssOBrvqEsumretpeL3Ds=; b=Fg03f1ie4ITmoYfqfIpjifTAA8wKVblmO4KjzkpCm6gE2NytBaRSUY0L+Sq4e5GQBG bFs4s7QvgryHFMdcA8em7y6YUQG39npIUgTlI0EQowc5rrw9+Odku+gMoW8GldBSQC9E E6QQiE93cA7d+XE4vK/HHNAFJMLZnMfWTRTCQ/4GcPWro5oThTV0vDGY+GjugtfprdZA UObpFO64SEriemyPjtFfNmQHZSF6jBoXuv1PRiSquaJUayoglzNLxW6RN8ip1FxtwfRz +wnrud83OxAq4nw4ooTpKeGh/5O/MyU2psfVdwHs59GyAWuR3cVY1FMKf4vD64Fdrc0i HZ+Q== 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=sSLs3el2OyWbVsEn+pD70NcssOBrvqEsumretpeL3Ds=; b=jCdgBJ1jyQyulBp+YlBfUZ3JTb0uuEH2HZGfozBzGbgQkE1UMqAXerjponO5HFbeSQ +aicFbeDbx2Yedgis1H18bmucQIdPq02J5wX/P2iF8f4QNI0JqSxZOqQW7ksFgK0dEes uPYiGfFJGwnYifdC37rqxE2iRMzaCOrknswyT/PVHtKIjdC8Iyhh34V0ougie1gvYsqZ fdc5TFQmnSbro/798DpYmowfL3oqyx29fz8ZvpmFJPWYGvm6D/P9fFmdprzJBgPzEFbA FPi4f0binJHDbIsL1ng72GqXx9hsM/3gXOvGjjUJ2lmpRQ5p9MBn5Vqi37BtxkynTKhk 9H8g== X-Gm-Message-State: AOAM531IBSOmPd6x7hs04k4RkYZftbz/Nx6RzqmLjo4tDrbhIe2D+iCT 7/jxt1CndjLd4q5n9qVs8j1Ab4F+llIAbu7a X-Received: by 2002:a5d:6744:: with SMTP id l4mr4577899wrw.378.1604699408431; Fri, 06 Nov 2020 13:50:08 -0800 (PST) Received: from dell.default ([91.110.221.236]) by smtp.gmail.com with ESMTPSA id t199sm3981084wmt.46.2020.11.06.13.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 13:50:07 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 12/19] drm/amd/display/dc/basics/fixpt31_32: Move variables to where they're used Date: Fri, 6 Nov 2020 21:49:42 +0000 Message-Id: <20201106214949.2042120-13-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201106214949.2042120-1-lee.jones@linaro.org> References: <20201106214949.2042120-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: Leo Li , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, David Airlie , 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" Also rid some unused ones. This patch solves 2000 warnings! Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33, from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30, from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35, from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_helpers.c:35: At top level: drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: ‘dc_fixpt_ln2_div_2’ defined but not used [-Wunused-const-variable=] 76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL }; | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: ‘dc_fixpt_ln2’ defined but not used [-Wunused-const-variable=] 75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL }; | ^~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: ‘dc_fixpt_e’ defined but not used [-Wunused-const-variable=] 74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL }; | ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: ‘dc_fixpt_two_pi’ defined but not used [-Wunused-const-variable=] 73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL }; | ^~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: ‘dc_fixpt_pi’ defined but not used [-Wunused-const-variable=] 72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL }; | ^~~~~~~~~~~ Cc: Harry Wentland Cc: Leo Li 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/amd/display/dc/basics/fixpt31_32.c | 5 +++++ drivers/gpu/drm/amd/display/include/fixed31_32.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c index 1e9a2d3520684..59f37563704ad 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c +++ b/drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c @@ -26,6 +26,11 @@ #include "dm_services.h" #include "include/fixed31_32.h" +static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL }; +static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL }; +static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL }; +static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL }; + static inline unsigned long long abs_i64( long long arg) { diff --git a/drivers/gpu/drm/amd/display/include/fixed31_32.h b/drivers/gpu/drm/amd/display/include/fixed31_32.h index 16df2a485dd0d..22053d7ea6ced 100644 --- a/drivers/gpu/drm/amd/display/include/fixed31_32.h +++ b/drivers/gpu/drm/amd/display/include/fixed31_32.h @@ -69,12 +69,6 @@ static const struct fixed31_32 dc_fixpt_epsilon = { 1LL }; static const struct fixed31_32 dc_fixpt_half = { 0x80000000LL }; static const struct fixed31_32 dc_fixpt_one = { 0x100000000LL }; -static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL }; -static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL }; -static const struct fixed31_32 dc_fixpt_e = { 11674931555LL }; -static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL }; -static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL }; - /* * @brief * Initialization routines