From mboxrd@z Thu Jan 1 00:00:00 1970 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 EA9E8C63777 for ; Thu, 26 Nov 2020 13:45:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93CB62223F for ; Thu, 26 Nov 2020 13:45:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="p/G/xj32" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391040AbgKZNo6 (ORCPT ); Thu, 26 Nov 2020 08:44:58 -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-Google-Smtp-Source: ABdhPJzsbr1E7lN9PNWNLgjwKyJigQPxpav65eXlV0+KrkMgaazvVNZF2wODZ0Otr3NRGQHQfQJMCw== 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