Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3694379rwo; Mon, 24 Jul 2023 15:23:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlFixCbpx1zd5mOmC5kYyrd+79CCBJTWhIj7Ibdq8FlxkLMsUvdQE2DlwRNl0UlcRI5MpPGg X-Received: by 2002:a17:907:75db:b0:993:ce9d:6fc1 with SMTP id jl27-20020a17090775db00b00993ce9d6fc1mr10259356ejc.3.1690237390454; Mon, 24 Jul 2023 15:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690237390; cv=none; d=google.com; s=arc-20160816; b=QN2TzaYZQAgJu2Zo8w/HcBwQyPZxjmae7+1iQlNHGc3WmUUY901TRW5cIXqMiDjN8Q Aqoe/HCqxFJxpBCGTY6sNeKiIRISst8BJRSfvGQzMwIahCzcmVvOBY2C7SF1pUBtHvaC vbXIa2JVFyqLTiM3J8VYaVe1CnadiiL+eWXAWGXpGh+yMn0Soad7U69mXkIU1k0BJVlJ Ljw36nusWvBb3268abexBkKcfe/VROptfpO+YSsFweTcblD1i08fkrs1BrbLODrdZ+gj pAU2Zf0BFUPjWFLM/Em14+h5rqhNO2DSMrK34Ze25x60EG70uj0HIxc73xrsRrZIn4Py sZzg== 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=QesV14Y8s5g0OhMUI7pqw1Hsk4wA0SJiQn93s5bli88=; fh=5uMgb3FjuzEN2hx+/gHTXgNLDhaZ51PB3bSZEXlWkNo=; b=J4J50dASArz3GXI7kutRNQS4P1ZBPItlyH7NUETGbzwkojjmtsMPTXJ3t34Er25vRT sZ+TRcqFid6MJxx+T1C3djNHZ3/3jIU3ZXVWAIPWEFKXdP/J+Jk9QnLnap+qEJrqpbkM +Ux1DF2iasJOxDPMO9qiJwA9U4ylcRISGBhU0mp3JoTLcJsEs32Jfe3rwTkT8NNVTV5V iq8Or1djiY0E/1KlFbNRK0XN/fLbQC010IQaXG+BFpMzpHcX1YFd+zQ21ox1phVS02md LVitJJQ40M0QZjWUnY3Gd2VNA1ixxP+JTVOB1YvheaH54KRBjXRcI99BEM0loiBwCr+D StRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=J5BI7qxC; 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 me25-20020a170906aed900b00993fe9ca8cfsi6668313ejb.766.2023.07.24.15.22.45; Mon, 24 Jul 2023 15:23:10 -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=J5BI7qxC; 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 S229553AbjGXVsJ (ORCPT + 99 others); Mon, 24 Jul 2023 17:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231327AbjGXVr7 (ORCPT ); Mon, 24 Jul 2023 17:47:59 -0400 Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4DE110EF for ; Mon, 24 Jul 2023 14:47:57 -0700 (PDT) Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-563439ea4a2so3305634eaf.0 for ; Mon, 24 Jul 2023 14:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690235277; x=1690840077; 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=QesV14Y8s5g0OhMUI7pqw1Hsk4wA0SJiQn93s5bli88=; b=J5BI7qxCLonnLK3T5LEIolm0ybGbfJ0qjHpQrhg8yyFg1rPqjkh46UpTSQo32eROiz BFHY7LsFZ3jjyAqjdtUTlOJFtizVoYR8A8ip0mQDWZBkVRc3gzdODXNjyhz/AlF1EP92 C+1uEYRqOZu51w8rRRDiMKPpjHuVhGRgTtsGOxL6AAe3M0k08e4A+S11/WYRf3T3td6+ k7qDJoj0Ld2MPZrjxBJVmLMlXh6YUf/spMvchzsVZMiRRbGxhczZGoI2lq9PH6UDta35 rQ0BO9cK/jH5t2IZmKdBqJdvLIvyxdQOn3lr3R/qf+8QW8RDMtiz+9Cm9bAd5W4KxmNK lM6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690235277; x=1690840077; 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=QesV14Y8s5g0OhMUI7pqw1Hsk4wA0SJiQn93s5bli88=; b=dGcCJBH1nuHRJm2dufkozZ+vE85Q13o3xWVloH3adIMSybQwD/gcWVzvVNeDjqyASj qgq8dgEdJXqVVYJD/fUvilIN9h6NJfwyx9+K03Ze/cH3Flt5xug5Js9T+hQlGrGT39fw AiS5RvCxxABJBTllmddpjvPulTRE3qud3r9JKAM36bUFKMOvIP4olYfy7JIpbHMlmfsc cz3g9qEKbr9G344wzWRw95pM7MzT8X7c/+4DFPirIudvl/mNcM/cc8YBEPlOtMEe/I7l g43IEtBwj1D5ZGsOxJIEM8tGqQMj0JkNv/gGEFuys2TNQnvEXGEXwQcO/KP9SnrcjSMq bf7A== X-Gm-Message-State: ABy/qLaICQmMTfG6VmOqrxgrf+wG1c+M8/PhbLgwly3uKok0FPfY7aS4 2lOrPpXAtsfF1pQAulHTMOfa4VrKxBtV+V8Gkpz5tv3r X-Received: by 2002:a4a:91d1:0:b0:566:ffa7:fd00 with SMTP id e17-20020a4a91d1000000b00566ffa7fd00mr9220728ooh.6.1690235276920; Mon, 24 Jul 2023 14:47:56 -0700 (PDT) MIME-Version: 1.0 References: <20230724071955.8822-1-xujianghui@cdjrlc.com> <3175b4fe4a9d8e4c29a39e9099c109ed@208suo.com> In-Reply-To: <3175b4fe4a9d8e4c29a39e9099c109ed@208suo.com> From: Alex Deucher Date: Mon, 24 Jul 2023 17:47:45 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/pm: Clean up errors in navi10_ppt.c To: sunran001@208suo.com 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_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 24, 2023 at 3:21=E2=80=AFAM wrote: > > Fix the following errors reported by checkpatch: > > ERROR: open brace '{' following function definitions go on the next line > ERROR: space required before the open parenthesis '(' > ERROR: space required after that ',' (ctx:VxV) > ERROR: spaces required around that '=3D' (ctx:VxW) > > Signed-off-by: Ran Sun > --- > .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 25 ++++++++++--------- > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > index 95f6d821bacb..e655071516b7 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c > @@ -136,7 +136,7 @@ static struct cmn2asic_msg_mapping > navi10_message_map[SMU_MSG_MAX_COUNT] =3D { > MSG_MAP(PowerDownJpeg, PPSMC_MSG_PowerDownJpeg, = 0), > MSG_MAP(BacoAudioD3PME, PPSMC_MSG_BacoAudioD3PME,= 0), > MSG_MAP(ArmD3, PPSMC_MSG_ArmD3, = 0), > - MSG_MAP(DAL_DISABLE_DUMMY_PSTATE_CHANGE,PPSMC_MSG_DALDisableDummy= PstateChange, 0), > + MSG_MAP(DAL_DISABLE_DUMMY_PSTATE_CHANGE, > PPSMC_MSG_DALDisableDummyPstateChange, 0), > > MSG_MAP(DAL_ENABLE_DUMMY_PSTATE_CHANGE, PPSMC_MSG_DALEnableDummyP= stateChange, 0), > MSG_MAP(GetVoltageByDpm, PPSMC_MSG_GetVoltageByDpm= , 0), > > MSG_MAP(GetVoltageByDpmOverdrive, PPSMC_MSG_GetVoltageByDpm= Overdrive, 0), > @@ -556,7 +556,7 @@ static int navi10_get_legacy_smu_metrics_data(struct > smu_context *smu, > MetricsMember_t member, > uint32_t *value) > { > - struct smu_table_context *smu_table=3D &smu->smu_table; > + struct smu_table_context *smu_table =3D &smu->smu_table; > SmuMetrics_legacy_t *metrics =3D > (SmuMetrics_legacy_t *)smu_table->metrics_table; > int ret =3D 0; > @@ -642,7 +642,7 @@ static int navi10_get_smu_metrics_data(struct > smu_context *smu, > MetricsMember_t member, > uint32_t *value) > { > - struct smu_table_context *smu_table=3D &smu->smu_table; > + struct smu_table_context *smu_table =3D &smu->smu_table; > SmuMetrics_t *metrics =3D > (SmuMetrics_t *)smu_table->metrics_table; > int ret =3D 0; > @@ -731,7 +731,7 @@ static int navi12_get_legacy_smu_metrics_data(struct > smu_context *smu, > MetricsMember_t member, > uint32_t *value) > { > - struct smu_table_context *smu_table=3D &smu->smu_table; > + struct smu_table_context *smu_table =3D &smu->smu_table; > SmuMetrics_NV12_legacy_t *metrics =3D > (SmuMetrics_NV12_legacy_t *)smu_table->metrics_table; > int ret =3D 0; > @@ -817,7 +817,7 @@ static int navi12_get_smu_metrics_data(struct > smu_context *smu, > MetricsMember_t member, > uint32_t *value) > { > - struct smu_table_context *smu_table=3D &smu->smu_table; > + struct smu_table_context *smu_table =3D &smu->smu_table; > SmuMetrics_NV12_t *metrics =3D > (SmuMetrics_NV12_t *)smu_table->metrics_table; > int ret =3D 0; > @@ -1686,7 +1686,7 @@ static int navi10_force_clk_levels(struct > smu_context *smu, > return 0; > break; > case SMU_DCEFCLK: > - dev_info(smu->adev->dev,"Setting DCEFCLK min/max dpm leve= l is not > supported!\n"); > + dev_info(smu->adev->dev, "Setting DCEFCLK min/max dpm lev= el is not > supported!\n"); > break; > > default: > @@ -2182,7 +2182,7 @@ static int navi10_read_sensor(struct smu_context > *smu, > struct smu_table_context *table_context =3D &smu->smu_table; > PPTable_t *pptable =3D table_context->driver_pptable; > > - if(!data || !size) > + if (!data || !size) > return -EINVAL; > > switch (sensor) { > @@ -2317,15 +2317,15 @@ static int > navi10_display_disable_memory_clock_switch(struct smu_context *smu, > uint32_t min_memory_clock =3D smu->hard_min_uclk_req_from_dal; > uint32_t max_memory_clock =3D max_sustainable_clocks->uclock; > > - if(smu->disable_uclk_switch =3D=3D disable_memory_clock_switch) > + if (smu->disable_uclk_switch =3D=3D disable_memory_clock_switch) > return 0; > > - if(disable_memory_clock_switch) > + if (disable_memory_clock_switch) > ret =3D smu_v11_0_set_hard_freq_limited_range(smu, SMU_UC= LK, > max_memory_clock, 0); > else > ret =3D smu_v11_0_set_hard_freq_limited_range(smu, SMU_UC= LK, > min_memory_clock, 0); > > - if(!ret) > + if (!ret) > smu->disable_uclk_switch =3D disable_memory_clock_switch; > > return ret; > @@ -2559,7 +2559,8 @@ static int navi10_set_default_od_settings(struct > smu_context *smu) > return 0; > } > > -static int navi10_od_edit_dpm_table(struct smu_context *smu, enum > PP_OD_DPM_TABLE_COMMAND type, long input[], uint32_t size) { > +static int navi10_od_edit_dpm_table(struct smu_context *smu, enum > PP_OD_DPM_TABLE_COMMAND type, long input[], uint32_t size) > +{ > int i; > int ret =3D 0; > struct smu_table_context *table_context =3D &smu->smu_table; > @@ -3368,7 +3369,7 @@ static ssize_t navi1x_get_gpu_metrics(struct > smu_context *smu, > ((adev->ip_versions[MP1_HWIP][0] =3D=3D IP_VERSION(= 11, 0, 0)) && > smu_version > 0x002A3B00)) > ret =3D navi10_get_gpu_metrics(smu, table); > else > - ret =3Dnavi10_get_legacy_gpu_metrics(smu, table); > + ret =3D navi10_get_legacy_gpu_metrics(smu, table)= ; > break; > }