Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3254957rwb; Mon, 7 Aug 2023 10:25:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmIdFqV7rtdj95UQhDYOAaxHH7L82CUIfWJQL0ZFuEmbfZIzsV+hhHCV+sgvtNxfcLwHec X-Received: by 2002:aca:241a:0:b0:3a7:2598:ab2c with SMTP id n26-20020aca241a000000b003a72598ab2cmr10577903oic.7.1691429101710; Mon, 07 Aug 2023 10:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691429101; cv=none; d=google.com; s=arc-20160816; b=K+p351BZjCJwUWUIvgpyz6AdMEY3brizk+kAS2rFBcvBlJDn4gyQl1IKJnvnKYxXFG Bl0egKrIWMPL90kGpdTunhzVtPN5PYgT9c9lFOsaJhFgiLXHi3OYRNkCzG1w8VxhOZw4 cRTkdZtDCNq0QjueXPO4+qtlqR7ijmTpFOf6HO2XMn+AkO9fS+Gs1aoEnw65NjYIUkL+ ws28QPQ8heQtv+1C6nKhnLkYHUXNHk94UHdn5u+JWMgULZv8jnE9mYzgQhxyVQFL4R7k mAOlquH0PiX5fbOM6BijX/5xzSur6lYh1TS/IOqEA1Cva7pfF/J+rmlTjXam4bB+S17Q B0Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=e+y0EPgsXPYGqDhgU0ly4Js9jdJ8CVWq1QGImohPTzg=; fh=t+hei0m6FWvWE3h8ROlSj5pw/xTY3yBXufxuldTsP1A=; b=bLY0/94Viw0SB7w4dzKJcIa1Mh0uqPj9dzlargbVmiaAbqR0KHE9m8G4sC5pjGPRAn 1NGi4lUjtnQpiLtBSr2jYY8itz41ngR8can2daNhfTHro32SJAIV8I6U7+3qyhrlbPrv pi1dObpjT3DNDPcwztSPTskL99I7yIemTXAYpPc5YxjXFysYVjOIBTmqT/J1BwaV07Vp XgICG66CoanvSImj9zw8qRTPZaaw+JPWNoknClG9szZCMHYnCiAiWnVd3j9eHQnw0IRF rRLQnYO+5to5eHMr0d6fNRBoyiGpcGvEo902fQ+h9TBtvpKk/1nXtwCBinPYr/DLZJGH Sqsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=U26wNKBX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a635307000000b0055c81b17502si5718455pgb.273.2023.08.07.10.24.49; Mon, 07 Aug 2023 10:25:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=U26wNKBX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230320AbjHGQ0b (ORCPT + 99 others); Mon, 7 Aug 2023 12:26:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230088AbjHGQ03 (ORCPT ); Mon, 7 Aug 2023 12:26:29 -0400 Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A7FDC9 for ; Mon, 7 Aug 2023 09:26:28 -0700 (PDT) Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-56ce1bd7fc4so3274892eaf.2 for ; Mon, 07 Aug 2023 09:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691425588; x=1692030388; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=e+y0EPgsXPYGqDhgU0ly4Js9jdJ8CVWq1QGImohPTzg=; b=U26wNKBXF4TXIYytCM7pRJjJtOffhyxeALBgdZu6WaxOb8+SG/25jUDmFTbHxPnyYZ lt+MTlSgweJIXIdbjj//oJAVAAywyV+zHEN+wq/ySVgOIhApxP4nYF82RnxmVytwABe2 U0wFcJ4GJ9mzWAVr3wAMUrXw6qMWXGszMsUXm73xSHZFxB7Ywv+QXEnbZGYoYdJSLDR9 Xp3jqle9ZgMQ0TG3RdtJCvPSKvQ8+WxhZdhFl3FGhly7/4aQXf5vyHTnXqTfNsQSz2D5 FytNZmrc2ncRWZ7zshSAzaIh4nDHaEhcX7qwm8NnGVBBrMgUi19I9XVs8lU1kKTKBpwg 2Oow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691425588; x=1692030388; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e+y0EPgsXPYGqDhgU0ly4Js9jdJ8CVWq1QGImohPTzg=; b=E8LEbpH+H8uhynfp615aoyVfDBAlvokuQTOKexgF3sNcOHGkqCT14rO1gjJxL2pwFL wk1o8GU9h+QHLOKxj/beSxiA5aCaLtyilxEv6seBoDtdtC0/NQhJ1AqQyqQ4eRfngKZm W5gYd9CUh2fq8EtMTO0iQ5gReEYcaOY3bpB+kBdsFNi5kDmbFEcWix+CvMou7NdwPjM6 OCaOIctk20De1eTp+Oe3vb2y4RiE8PqiqTP2qZIGbgfO6w5XCX4793rF8PRTg6ZCFKwc FpGJXXJdLaXz+vf456XW/P+b+iQew7p2RJfwcvR4z+Qkdn+3F75V8P7kDISsIGWuN76Q V+6A== X-Gm-Message-State: AOJu0YwOUf6DYfAs5LH0bKDl+n/PaoMvTiJH/FLFrf+YYkHCCVz1LUIr 46aiAeBUjgBPvkJO5KggzuUDP5ljZ4C+/pzecok= X-Received: by 2002:a05:6870:c087:b0:1bb:8ab6:6642 with SMTP id c7-20020a056870c08700b001bb8ab66642mr11612014oad.8.1691425587807; Mon, 07 Aug 2023 09:26:27 -0700 (PDT) MIME-Version: 1.0 References: <20230801030334.5069-1-sunran001@208suo.com> In-Reply-To: <20230801030334.5069-1-sunran001@208suo.com> From: Alex Deucher Date: Mon, 7 Aug 2023 12:26:16 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/pm/powerplay/hwmgr/ppevvmath: Clean up errors in ppevvmath.h To: Ran Sun Cc: alexander.deucher@amd.com, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! On Mon, Jul 31, 2023 at 11:03=E2=80=AFPM Ran Sun wro= te: > > 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= /gpu/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) > > error_term =3D fAdd(fNegativeOne, value); > > - return (fAdd(solution, error_term)); > + return fAdd(solution, error_term); > } > > static fInt fDecodeLinearFuse(uint32_t fuse_value, fInt f_min, fInt f_ra= nge, uint32_t bitlength) > @@ -230,7 +230,7 @@ static fInt ConvertToFraction(int X) /*Add all range = checking 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); > } > > static fInt Convert_ULONG_ToFraction(uint32_t X) > @@ -382,14 +382,14 @@ static int ConvertBackToInteger (fInt A) /*THIS is = the function that will be use > > scaledDecimal.full =3D uGetScaledDecimal(A); > > - fullNumber =3D fAdd(scaledDecimal,scaledReal); > + fullNumber =3D fAdd(scaledDecimal, scaledReal); > > return fullNumber.full; > } > > static fInt fGetSquare(fInt A) > { > - return fMultiply(A,A); > + return fMultiply(A, A); > } > > /* x_new =3D x_old - (x_old^2 - C) / (2 * x_old) */ > @@ -447,7 +447,7 @@ static fInt fSqrt(fInt num) > > } while (uAbs(error) > 0); > > - return (x_new); > + return x_new; > } > > 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); > > - while(GreaterThan(A, f_CONSTANT100) || GreaterThan(B, f_CONSTANT1= 00) || GreaterThan(C, f_CONSTANT100)) { > + while (GreaterThan(A, f_CONSTANT100) || GreaterThan(B, f_CONSTANT= 100) || 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 = fractional 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, PRECISI= ON - 1 -i); > + scaledDecimal =3D scaledDecimal + dec[i]*uPow(10, PRECISI= ON - 1 - i); > } > > return scaledDecimal; > -- > 2.17.1 >