From patchwork Thu Nov 26 13:42:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 332986 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp155834ejs; Thu, 26 Nov 2020 05:43:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJy68F7mPxtCuP9xOBZ3fItZgvstZqVNpVHuwVVmNCsom2d8SvUT3KrbLFX00rOTo72RxhBF X-Received: by 2002:a17:90a:154a:: with SMTP id y10mr3870114pja.6.1606398203317; Thu, 26 Nov 2020 05:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606398203; cv=none; d=google.com; s=arc-20160816; b=NhsJERuo3kHt/oX5KOKE35dFGYS3YYWlnRXgyCVGpXZ9vSWRKU3A4ocva+hsZoO/eZ cPowt80L+wGZsCSRzqTinvOq8C+dZT8Ny5acrd9fMDeO4L46eN1nQQsB6t9AWefX159F jYwXpkgM41EQjutxqE6vWx0QgYugHqq3Z9HK1YXNoE2ay5nsJz/aap98ZiAOhyZRvf6D 6TIbpw92ffFwHwYyHU12+L1x/pkarGNAESEQ8+T2/FitTwYoVbGwsen3T3VBUoksCPCt oYzvZ99GKsxaCSrcgmJcff57K1Ai9AmCfoYS2/IoezhhfvGJZ+vToKM1nhGHdxiyQmQ9 lpfQ== 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=IBAGyCwiRiTDxTyg9xABrwn/Rkn8hPtI9p0YaGI8mK0=; b=vHnPTYTuHregvLDiQ0Wsi+ZgmtuADW4vW/1PlxoEpyqLUvvdZm4SECkwpcRbsrFIes YVRR8F907o3qngttVPpiHQRI+ttwQGK01wQgmKHoaxa9CylME/OfReKC0vIV+8FXjktd WVsaKOEAUt8jsxhbxhA7OLpvgjVpndeE2VwO6He6uIOJmsxb0gbujAeBeQeej2I00azU uz4PneIaUHO/eRqcAugkwTpvZslEt3b9A5c4Bpw8iBKHWIwxt+cj3EyyKndtboPkzxx1 UH2CZcE3QtbTj6m5eI/qffaLZPK9L9yXUGu8WE4VD6lqH+WEWPalB6HG7vN9F5jVNLbl GRyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="p/G/xj32"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id x184si5326317pgd.468.2020.11.26.05.43.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 05:43:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="p/G/xj32"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 22D4F6E95D; Thu, 26 Nov 2020 13:43:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 310CC6E957 for ; Thu, 26 Nov 2020 13:43:04 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id p22so2194337wmg.3 for ; Thu, 26 Nov 2020 05:43:04 -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=4AJIopnyfhF0y4BTkzIBWxHJHanpp5V1ikes9pxc/Xc=; b=p/G/xj32n4i/rb4oTibOM955Wb2c2JuAT8/JEPsK6Cet/M6nBAM0aqReY56K/J5Et7 amy2F2/m374sjvAeSfHZ8NLJgd13zRPeaQUlDXgMF1RhJwaEI4iiddP5r//znBH0/s5c TiI6Okc/1wVVTlo3aEA7Hw5I/qlTKkG4SUsXYGRMPQSpCLbvg3c/N5Zp05LXoZUmogOx Q4vmRAs7ruIFA1BW/PIWhKhEpRtw0Sd1GVCt9I66oXJHblxbu+IPgisDe2ydduSg6sI2 AG33/49mDz/9ILeFURIg75jJR2NGWpP06Mlv6OdF08VX9CNy61y0qHqdhlQcX05y+4yZ 1gOA== 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=4AJIopnyfhF0y4BTkzIBWxHJHanpp5V1ikes9pxc/Xc=; b=RtDBmsoGMeqInf29KUeofC7cu7kTxuEM8cvK1rQzp51rrkdJkq/y9Ap+1sCWmOUw0N 06sbceCh2m1FVzMWM9wlKqb3p5NZRbP+YfjBxBwg7hAvJbwNf0EBT85B/b0GdpUPyqLM CX/ffA6nea/X5nOQqbdu1XlpwF/PQXHHI9EGHoyLuuRflZIucmel8DDXKgJiT6KMU4iY Aqdpb0bgrjk494ASsUUVWTF2BkQMYM/LLzMJqc33Gr5XsVcYHRMP4ON477SXeX8nDNAA R+X31XQfY+p0ZIQo02sUywqnitDvy1mRkh6kFIqzMx9c/5xrpAprl3qLgqXcSxeJnSiE Atkw== X-Gm-Message-State: AOAM532HFAkIF+z5aGA2WLJ7tQSf+BeLFPtPXneM7hoGWlfIFUGO5lMF J6ETNeU/8l0nwvHChCwpSw3w5g== X-Received: by 2002:a7b:cf0a:: with SMTP id l10mr3530508wmg.103.1606398182874; Thu, 26 Nov 2020 05:43:02 -0800 (PST) Received: from dell.default ([91.110.221.235]) by smtp.gmail.com with ESMTPSA id k205sm9275738wmk.4.2020.11.26.05.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 05:43:02 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 11/40] drm/amd/pm/powerplay/hwmgr/ppevvmath: Place variable declaration under same clause as its use Date: Thu, 26 Nov 2020 13:42:11 +0000 Message-Id: <20201126134240.3214176-12-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201126134240.3214176-1-lee.jones@linaro.org> References: <20201126134240.3214176-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 , Evan Quan , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h: In function ‘fMultiply’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:22: warning: variable ‘Y_LessThanOne’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:7: warning: variable ‘X_LessThanOne’ set but not used [-Wunused-but-set-variable] Cc: Evan Quan 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/pm/powerplay/hwmgr/ppevvmath.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h index 8f50a038396ce..dac29fe6cfc6f 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h @@ -333,14 +333,14 @@ static fInt fMultiply (fInt X, fInt Y) /* Uses 64-bit integers (int64_t) */ { fInt Product; int64_t tempProduct; + + /*The following is for a very specific common case: Non-zero number with ONLY fractional portion*/ + /* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION bool X_LessThanOne, Y_LessThanOne; X_LessThanOne = (X.partial.real == 0 && X.partial.decimal != 0 && X.full >= 0); Y_LessThanOne = (Y.partial.real == 0 && Y.partial.decimal != 0 && Y.full >= 0); - /*The following is for a very specific common case: Non-zero number with ONLY fractional portion*/ - /* TEMPORARILY DISABLED - CAN BE USED TO IMPROVE PRECISION - if (X_LessThanOne && Y_LessThanOne) { Product.full = X.full * Y.full; return Product