Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp557902pxu; Thu, 26 Nov 2020 05:48:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0RVddHzqvPn5CUy+9+8sWOGOFxytDHg1b1HQQPNiOL+aUu+x8mRIT+w6rx6qjW3AXOYMM X-Received: by 2002:a50:ff05:: with SMTP id a5mr2626242edu.43.1606398530144; Thu, 26 Nov 2020 05:48:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606398530; cv=none; d=google.com; s=arc-20160816; b=YfQKA9A9rd40MXMtDeh6B3dNP3jlijwQTLotfrs5942di93JtwT0j2rRnWU3uRHj5p avoVacd7V8inRaDpOK0dCyZ08L2x8BsHD3ZJ1PK8t6oeQ0/vO1m8o6Tc3gOy4hidhZiS JOXTLpucZSB5UGhYrRYwZjWKRqaJ1x7ARrf8Zkkecehovl5VPz7m9YKW2fTtHGkZM1pu yaLesFNuAgEWZ1+XE+pMrSKSPA5EgEpIfftMw8sRS1cr9PeXu255x4pBXdnVO6LI+GCM 9EqY5gY+RokU+RwudGTFP+a/gKs44Me0AYCNYrgYn5mH7BIyLH0yx/SZrXehuobRW5Y1 bCww== 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=4AJIopnyfhF0y4BTkzIBWxHJHanpp5V1ikes9pxc/Xc=; b=x2kaK+uHppwxpiMp51SgmiNXXOqF9bl4sVdgACJqzDWKwpRDUqvQ6w8fFlrMkG4n5d wHOvfSSjVuPcPyb1vts4QAu5OgMcP/MQoGRiysoigUN0emCG2XqS5tfru5QRlzsFJaIg uBDPE7yJx1dXmszNwucuWw3JxKza+PPJGleUmIsMccU3yNi1T5fAbTBUoREout3rCmFP 3wBEWZfVE5QsW3BXZp/3x0zRpHA3ADIcBoBego5Fb7BBoZgkvuUPHvOY6Pzyl8W84vDQ J2t6I7z3y877v4zS9PKUFz/G07OjQESdpJzErQYOVhOSR+H8q+XgXj3866tEeiPD8LF2 VzZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="p/G/xj32"; 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 m19si2363510edb.315.2020.11.26.05.48.27; Thu, 26 Nov 2020 05:48:50 -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="p/G/xj32"; 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 S2391022AbgKZNo4 (ORCPT + 99 others); Thu, 26 Nov 2020 08:44:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390816AbgKZNnE (ORCPT ); Thu, 26 Nov 2020 08:43:04 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E290C0613D4 for ; Thu, 26 Nov 2020 05:43:04 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id a186so2199207wme.1 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=H4Z7vJ7MzxY2w8pP6m8ydT6YHp4u6KV9SEjae2ZZiIrgNkXyOpXBldiBmBOkAQHt1l 4y2VzJQ7PSlo7yDtD4RrdqmkPKZCLkVslBMSbhV09WZnx7j67yWGnHxJYQEcp8YN0m1I YMZYqQskmCCjqktgg51+O1ADRNl1tbA9U6B2sqNOLltHMfVtuZZZfskzavYUql0Wtr0J b0VkqOBXv+cT82CNfUO+fyDBTLKlTdrGAmMGY9BQIUrx1GiJstLraUtAz3M5evNqbn/K sU+C5VVerEbWZ0GWFGFn6NdMJVN3PgK0ky5DxwyCjcGKCAJe2KL2gurQk7U2A5gmFzvy vLUg== X-Gm-Message-State: AOAM532hx2DUTlQCzN+P/RDACjEF4X7i6/ZSIDA7o1XKvYtht/1PlWhB NfJbATVALNXcR89DZhkwB7GL5A== 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 Cc: linux-kernel@vger.kernel.org, Evan Quan , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.25.1