From nobody Sun Feb 8 09:16:47 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACAF1C001DF for ; Tue, 1 Aug 2023 03:03:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbjHADDs (ORCPT ); Mon, 31 Jul 2023 23:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbjHADDq (ORCPT ); Mon, 31 Jul 2023 23:03:46 -0400 Received: from out28-217.mail.aliyun.com (out28-217.mail.aliyun.com [115.124.28.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02B25129 for ; Mon, 31 Jul 2023 20:03:44 -0700 (PDT) X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07467062|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.0381289-0.00205072-0.95982;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047190;MF=sunran001@208suo.com;NM=1;PH=DS;RN=7;RT=7;SR=0;TI=SMTPD_---.U5JFwAS_1690859016; Received: from localhost.localdomain(mailfrom:sunran001@208suo.com fp:SMTPD_---.U5JFwAS_1690859016) by smtp.aliyun-inc.com; Tue, 01 Aug 2023 11:03:38 +0800 From: Ran Sun To: alexander.deucher@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ran Sun Subject: [PATCH] drm/amd/pm/powerplay/hwmgr/ppevvmath: Clean up errors in ppevvmath.h Date: Tue, 1 Aug 2023 03:03:34 +0000 Message-Id: <20230801030334.5069-1-sunran001@208suo.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Fix the following errors reported by checkpatch: ERROR: return is not a function, parentheses are not required ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open parenthesis '(' ERROR: need consistent spacing around '-' (ctx:WxV) Signed-off-by: Ran Sun --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h b/drivers/g= pu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h index dac29fe6cfc6..6f54c410c2f9 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h @@ -166,7 +166,7 @@ static fInt fNaturalLog(fInt value) =20 error_term =3D fAdd(fNegativeOne, value); =20 - return (fAdd(solution, error_term)); + return fAdd(solution, error_term); } =20 static fInt fDecodeLinearFuse(uint32_t fuse_value, fInt f_min, fInt f_rang= e, uint32_t bitlength) @@ -230,7 +230,7 @@ static fInt ConvertToFraction(int X) /*Add all range ch= ecking here. Is it possib static fInt fNegate(fInt X) { fInt CONSTANT_NEGONE =3D ConvertToFraction(-1); - return (fMultiply(X, CONSTANT_NEGONE)); + return fMultiply(X, CONSTANT_NEGONE); } =20 static fInt Convert_ULONG_ToFraction(uint32_t X) @@ -382,14 +382,14 @@ static int ConvertBackToInteger (fInt A) /*THIS is th= e function that will be use =20 scaledDecimal.full =3D uGetScaledDecimal(A); =20 - fullNumber =3D fAdd(scaledDecimal,scaledReal); + fullNumber =3D fAdd(scaledDecimal, scaledReal); =20 return fullNumber.full; } =20 static fInt fGetSquare(fInt A) { - return fMultiply(A,A); + return fMultiply(A, A); } =20 /* x_new =3D x_old - (x_old^2 - C) / (2 * x_old) */ @@ -447,7 +447,7 @@ static fInt fSqrt(fInt num) =20 } while (uAbs(error) > 0); =20 - return (x_new); + return x_new; } =20 static void SolveQuadracticEqn(fInt A, fInt B, fInt C, fInt Roots[]) @@ -459,7 +459,7 @@ static void SolveQuadracticEqn(fInt A, fInt B, fInt C, = fInt Roots[]) f_CONSTANT100 =3D ConvertToFraction(100); f_CONSTANT10 =3D ConvertToFraction(10); =20 - while(GreaterThan(A, f_CONSTANT100) || GreaterThan(B, f_CONSTANT100) || G= reaterThan(C, f_CONSTANT100)) { + while (GreaterThan(A, f_CONSTANT100) || GreaterThan(B, f_CONSTANT100) || = GreaterThan(C, f_CONSTANT100)) { A =3D fDivide(A, f_CONSTANT10); B =3D fDivide(B, f_CONSTANT10); C =3D fDivide(C, f_CONSTANT10); @@ -515,7 +515,7 @@ static int uGetScaledDecimal (fInt A) /*Converts the fr= actional portion to whole dec[i] =3D tmp / (1 << SHIFT_AMOUNT); tmp =3D tmp - ((1 << SHIFT_AMOUNT)*dec[i]); tmp *=3D 10; - scaledDecimal =3D scaledDecimal + dec[i]*uPow(10, PRECISION - 1 -i); + scaledDecimal =3D scaledDecimal + dec[i]*uPow(10, PRECISION - 1 - i); } =20 return scaledDecimal; --=20 2.17.1