Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3313739rwb; Mon, 7 Aug 2023 11:22:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHE8l6Cw0dSO48s6EBhmlKshtkCwJ88FIkNcB8SaRHP5AAJT0nnudn19Q07PJQTHTlbH0Ke X-Received: by 2002:a17:902:d491:b0:1bb:a6db:3fd0 with SMTP id c17-20020a170902d49100b001bba6db3fd0mr12368629plg.69.1691432526547; Mon, 07 Aug 2023 11:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691432526; cv=none; d=google.com; s=arc-20160816; b=PhXQVMmsJ/vEXIDGlAINRNN38Wgztai20t2/92ExZweam4q08vRTaFbKlNtwojsoP3 S9ME07Q77gdPgOucrFSHVAWF/K58HjEGSN1u5nft39vb5cGaxWBdDjPV18e7xpHr7dlP O1l3PzZubd0Wf5Z+oJxeuf1PTzwew31wgBq0+Hy9WJ+uvYTejZIaFf4nBcJSY7yk2Ved xYPhsHozW3QJV93orItPQSOnxU3yZztNHrGRgqVSwb6Pp5VNgdMzL7jsACym03pMeeiK cu+b/FQYAOFQGc7rjxww3q1JEgHBISC8Yh7M7CJ2WahVXFY087hGcI6irpJYTwGkAkYA F34Q== 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=lku3mSpHphjbjAm2T6u+ieCGGFFROzE48as9JT2wvy4=; fh=YwR8hmjC2QSif+72cT3/sIS32/1FMEJSAUJ+j+OuTzU=; b=VqzUEqH3/YEb4dPQFJ/iuoc+LkErjRfKmPV1iPPTwMKgMYfqG64mGdUnCWPpRwG+pf 31GF7fBDSLyx+hxYSL9gMVEQ0VisZcefZ812MOGYUj1DRA9sBUK2GV8UztyjpMyvCaAi wELXLNBFbh1i0u71T3Mjg5S5XTakuQt5gsGUWqORwYidrY8I5LjabmV8sEJmTujBds5L uZWCZ2ME+gluF5MCkueQoyzcMGVe4MHdhp82Wohp4Ok3Ju7Umky3QLGOytUx+RnBwkkn JoIMRkz1K0Jd/9yPNL9Ul8Gf9GilG6Jz2oQhfNaq/fpAF8gKETRKzAo56+zmFEQUGZEe IU3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SX2EKjGX; 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 d16-20020a170903231000b001b3d6d125f9si4446421plh.524.2023.08.07.11.21.54; Mon, 07 Aug 2023 11:22:06 -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=SX2EKjGX; 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 S230416AbjHGRAe (ORCPT + 99 others); Mon, 7 Aug 2023 13:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjHGRAd (ORCPT ); Mon, 7 Aug 2023 13:00:33 -0400 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EB7D10D4 for ; Mon, 7 Aug 2023 10:00:31 -0700 (PDT) Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6bcae8c4072so3042396a34.1 for ; Mon, 07 Aug 2023 10:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691427630; x=1692032430; 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=lku3mSpHphjbjAm2T6u+ieCGGFFROzE48as9JT2wvy4=; b=SX2EKjGXvall0/Z2aQXKNN40J9iu/5gt62fnBonYd4iTXwBUf+sCVaAzpVbMH5uCmM DJlUFt8PlDKS55Zjo2N8AKfj2T1amMgkvj0zCQizOhpTsXUvuFRFyzFgGJLy9xeUeET5 Hg2ncSBCSFb04yEUlZDxCa13Eww314wCAWL9HMo7GoJjjwS+tI6e1kmH3AcDu9qfDhra hklB5dk0bpx4pg7+p1acdPn1J2RoTCfrTLNOmUeONPjXtd8Tv6VtQXMzaebsWGMXM8kN BahYXF0ckqo2jPL8pslZKxEKnrvj/1/k+BzuLLeI4MewshQC4I/cSV5tV4lSK03Ogn4A YkoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691427630; x=1692032430; 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=lku3mSpHphjbjAm2T6u+ieCGGFFROzE48as9JT2wvy4=; b=jAAkNp+i8RHF/cx0QD2RCwyKOcxKVDhcWkW1kYQ52B1hwHU7gth9JziEnTFVqFHilv wIKO8NbcnvaAXEim0A6dLrGyIMqgj+AP0Xn0hlbpCPbrkkbJQW2LmJON0hAz4WmctlCv /rFOX6qDYWk5WBI5Yt6sJIBE8omZZDG/vzSKtcv0KbBUenYiTLfDhZWnKGp83joqLTu6 oC4sWOe6X6S8NrKhzj0uF62jS73AbSKd8nIWQLZldx2VGGu9oarMsdgcfJy62npXSdnE YzMqHh4dEmZDETsXgvAZO7747Pn7seqdmf0Mm1bocogCz6Gg14t3fUm/bVwnf024L557 Z0dA== X-Gm-Message-State: AOJu0YxmwKR9BeXGJAM5+Kls7vazBqSHh7+QgALlLoGOGDtQ1bdY9EBp qYIPScErbD2/15v6nFUf5cXbCULR8SsKgioU7BoHWH5S X-Received: by 2002:a9d:6449:0:b0:6b9:c7de:68e0 with SMTP id m9-20020a9d6449000000b006b9c7de68e0mr7794469otl.29.1691427630302; Mon, 07 Aug 2023 10:00:30 -0700 (PDT) MIME-Version: 1.0 References: <20230802015557.9034-1-sunran001@208suo.com> In-Reply-To: <20230802015557.9034-1-sunran001@208suo.com> From: Alex Deucher Date: Mon, 7 Aug 2023 13:00:19 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/pm: Clean up errors in smu73.h To: Ran Sun Cc: alexander.deucher@amd.com, 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 Tue, Aug 1, 2023 at 9:56=E2=80=AFPM Ran Sun wrote= : > > Fix the following errors reported by checkpatch: > > ERROR: open brace '{' following struct go on the same line > ERROR: space prohibited before open square bracket '[' > ERROR: "foo * bar" should be "foo *bar" > > Signed-off-by: Ran Sun > --- > drivers/gpu/drm/amd/pm/powerplay/inc/smu73.h | 45 ++++++++------------ > 1 file changed, 17 insertions(+), 28 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/inc/smu73.h b/drivers/gpu/d= rm/amd/pm/powerplay/inc/smu73.h > index c6b12a4c00db..cf4b2c3c65bc 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/inc/smu73.h > +++ b/drivers/gpu/drm/amd/pm/powerplay/inc/smu73.h > @@ -37,8 +37,7 @@ enum Poly3rdOrderCoeff { > POLY_3RD_ORDER_COUNT > }; > > -struct SMU7_Poly3rdOrder_Data > -{ > +struct SMU7_Poly3rdOrder_Data { > int32_t a; > int32_t b; > int32_t c; > @@ -51,8 +50,7 @@ struct SMU7_Poly3rdOrder_Data > > typedef struct SMU7_Poly3rdOrder_Data SMU7_Poly3rdOrder_Data; > > -struct Power_Calculator_Data > -{ > +struct Power_Calculator_Data { > uint16_t NoLoadVoltage; > uint16_t LoadVoltage; > uint16_t Resistance; > @@ -71,8 +69,7 @@ struct Power_Calculator_Data > > typedef struct Power_Calculator_Data PowerCalculatorData_t; > > -struct Gc_Cac_Weight_Data > -{ > +struct Gc_Cac_Weight_Data { > uint8_t index; > uint32_t value; > }; > @@ -187,8 +184,7 @@ typedef struct { > #define SMU73_THERMAL_CLAMP_MODE_COUNT 8 > > > -struct SMU7_HystController_Data > -{ > +struct SMU7_HystController_Data { > uint16_t waterfall_up; > uint16_t waterfall_down; > uint16_t waterfall_limit; > @@ -199,8 +195,7 @@ struct SMU7_HystController_Data > > typedef struct SMU7_HystController_Data SMU7_HystController_Data; > > -struct SMU73_PIDController > -{ > +struct SMU73_PIDController { > uint32_t Ki; > int32_t LFWindupUpperLim; > int32_t LFWindupLowerLim; > @@ -215,8 +210,7 @@ struct SMU73_PIDController > > typedef struct SMU73_PIDController SMU73_PIDController; > > -struct SMU7_LocalDpmScoreboard > -{ > +struct SMU7_LocalDpmScoreboard { > uint32_t PercentageBusy; > > int32_t PIDError; > @@ -261,8 +255,8 @@ struct SMU7_LocalDpmScoreboard > uint8_t DteClampMode; > uint8_t FpsClampMode; > > - uint16_t LevelResidencyCounters [SMU73_MAX_LEVELS_GRAPHICS]; > - uint16_t LevelSwitchCounters [SMU73_MAX_LEVELS_GRAPHICS]; > + uint16_t LevelResidencyCounters[SMU73_MAX_LEVELS_GRAPHICS]; > + uint16_t LevelSwitchCounters[SMU73_MAX_LEVELS_GRAPHICS]; > > void (*TargetStateCalculator)(uint8_t); > void (*SavedTargetStateCalculator)(uint8_t); > @@ -315,8 +309,7 @@ typedef uint8_t (*VoltageChangeHandler_t)(uint16_t, u= int8_t); > > typedef uint32_t SMU_VoltageLevel; > > -struct SMU7_VoltageScoreboard > -{ > +struct SMU7_VoltageScoreboard { > SMU_VoltageLevel TargetVoltage; > uint16_t MaxVid; > uint8_t HighestVidOffset; > @@ -354,7 +347,7 @@ struct SMU7_VoltageScoreboard > > VoltageChangeHandler_t functionLinks[6]; > > - uint16_t * VddcFollower1; > + uint16_t *VddcFollower1; > > int16_t Driver_OD_RequestedVidOffset1; > int16_t Driver_OD_RequestedVidOffset2; > @@ -366,8 +359,7 @@ typedef struct SMU7_VoltageScoreboard SMU7_VoltageSco= reboard; > // ---------------------------------------------------------------------= ---------------------------------------------------- > #define SMU7_MAX_PCIE_LINK_SPEEDS 3 /* 0:Gen1 1:Gen2 2:Gen3 */ > > -struct SMU7_PCIeLinkSpeedScoreboard > -{ > +struct SMU7_PCIeLinkSpeedScoreboard { > uint8_t DpmEnable; > uint8_t DpmRunning; > uint8_t DpmForce; > @@ -396,8 +388,7 @@ typedef struct SMU7_PCIeLinkSpeedScoreboard SMU7_PCIe= LinkSpeedScoreboard; > #define SMU7_SCALE_I 7 > #define SMU7_SCALE_R 12 > > -struct SMU7_PowerScoreboard > -{ > +struct SMU7_PowerScoreboard { > uint32_t GpuPower; > > uint32_t VddcPower; > @@ -436,8 +427,7 @@ typedef struct SMU7_PowerScoreboard SMU7_PowerScorebo= ard; > #define SMU7_VCE_SCLK_HANDSHAKE_DISABLE 0x00020000 > > // All 'soft registers' should be uint32_t. > -struct SMU73_SoftRegisters > -{ > +struct SMU73_SoftRegisters { > uint32_t RefClockFrequency; > uint32_t PmTimerPeriod; > uint32_t FeatureEnables; > @@ -493,8 +483,7 @@ struct SMU73_SoftRegisters > > typedef struct SMU73_SoftRegisters SMU73_SoftRegisters; > > -struct SMU73_Firmware_Header > -{ > +struct SMU73_Firmware_Header { > uint32_t Digest[5]; > uint32_t Version; > uint32_t HeaderSize; > @@ -708,9 +697,9 @@ typedef struct VFT_CELL_t VFT_CELL_t; > > struct VFT_TABLE_t { > VFT_CELL_t Cell[TEMP_RANGE_MAXSTEPS][NUM_VFT_COLUMNS]; > - uint16_t AvfsGbv [NUM_VFT_COLUMNS]; > - uint16_t BtcGbv [NUM_VFT_COLUMNS]; > - uint16_t Temperature [TEMP_RANGE_MAXSTEPS]; > + uint16_t AvfsGbv[NUM_VFT_COLUMNS]; > + uint16_t BtcGbv[NUM_VFT_COLUMNS]; > + uint16_t Temperature[TEMP_RANGE_MAXSTEPS]; > > uint8_t NumTemperatureSteps; > uint8_t padding[3]; > -- > 2.17.1 >