Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3227151rwb; Mon, 7 Aug 2023 10:02:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjSQKDoTM3xvLAamNbtNQLl2w9w9iBahApUPkPH4Roj274ekGbHfu9Kf+dxf+/OqCCWo23 X-Received: by 2002:a05:6a00:2293:b0:687:3a7d:ad7a with SMTP id f19-20020a056a00229300b006873a7dad7amr11294906pfe.7.1691427743050; Mon, 07 Aug 2023 10:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691427743; cv=none; d=google.com; s=arc-20160816; b=Id+NQGqsQNsP5BbkTOrkBIuE6sSOhqYMqELvvPs6rwF15ODvSp0zc+lNZ7GT1xZLsW zgyuEIOUIF3GFOiCNQxIypjFlQiiPaetCKd6q+D0oqP5yllO/kCGY+DcB2qIYa1mVVhM SQdn2n60fJa8Sz31MyJMLWsAiDQG8dR1uGhaHMZolKUic3JBuPRTDaoq1fMABPVs1bIc 12mEs3DV7SfAlAzxPwHnvm41XuTsKGopGACbCSl/am1i+CrulmRQMLrTjSFOJBtBopQB CYIx3koZ+FFpED+hk2ScvvnS69zg7oYSefOImA1u7tFGxKldEHQKXeOeJQRg3pggc4qY hfmw== 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=IutisKUxSex6+AO1pD8aPRPz9d2NNY3R1jp6DKxdDOU=; fh=t+hei0m6FWvWE3h8ROlSj5pw/xTY3yBXufxuldTsP1A=; b=ham8v+KTmLif2e3UGY+HAAO6rTlx4MQpX47PxvSpzVnBtfSwNXf2UiCQASETWG8dq/ 1M4QuJxlUVqluUveHPARvXlfGX3U3wdQ5xKNfnDXsZaimsG9AKZUqoODujjp7md4AYYM gzCarcT4j+sOFL9eDOyzV84EsBvSQfzMOMKMA2LotN1YkZLg/MT890Mb2mKJDT4JhGK+ WUVkWdI3KXoqzcEMM72mmHeDpTfbVvj3OETjf45Hq/6V/V6kAzi4AyX8ru+4uUqohZoM RW3CUMxRh2uqTco1FhIoa4U4q7yFAKNXXi6IcGLstoNBRceqQf8eV8Ku0Z7A8L3v8BfK UeoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=iJ64I1cE; 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 s67-20020a635e46000000b00546bab11218si5816018pgb.439.2023.08.07.10.02.00; Mon, 07 Aug 2023 10:02:23 -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=iJ64I1cE; 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 S231528AbjHGQYI (ORCPT + 99 others); Mon, 7 Aug 2023 12:24:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbjHGQYD (ORCPT ); Mon, 7 Aug 2023 12:24:03 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57BE61715 for ; Mon, 7 Aug 2023 09:23:50 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6bca88c3487so3902674a34.2 for ; Mon, 07 Aug 2023 09:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691425429; x=1692030229; 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=IutisKUxSex6+AO1pD8aPRPz9d2NNY3R1jp6DKxdDOU=; b=iJ64I1cECsaaUtRWyIX4rGvNdgjNVSuBQbJPUMNASE3bSLJ2Qkjs1eXgkWbubInFG9 JuOp5D+dgNuWyE5gp6/POnWlR8ajwEpgFNZ7raxjX8khkeNMoUlNKrnfrcMkjRf36BPa 9IVquV7DwnUoTOXaOgGI0300kSi+CxPus3cZq/MhSl2ek7jQecDvlRmKYBUlmvGuYJLt RWvpF6HrW8Vrgh95VH6Klp6zvsydRQMd1bFKwDOHhbHO8C7BlK/jYKe5TWtUN/rGSuVj nTd62S1OzZZzB1dYaZHBhbFqKlCruSc/EcTyUcJ+4FzdsLT7tNQxjvh8DDRRp8E2k6t1 422Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691425429; x=1692030229; 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=IutisKUxSex6+AO1pD8aPRPz9d2NNY3R1jp6DKxdDOU=; b=crSmIdpK/QtpbegkXUsHhjzoGe8I+PgiZbPdF4qBs7ApaIDj01/enVap0fBCTdWALi X+gQcBZ7jF5vP20DiGFmr8VTcZfEPUOiuZmC3Z/0NkTNnVVVft5Y12MZNsnkduRlXRCG eLsUq6flkTlTCAnRQVck+bOGf5wJPEOPzEDbY5khRGw9gMYWXu7vXd53x/lfYpbX9QzC xiPCHIZyyq5I2ne+EIcrnWut9COc1OMhpRjeVYRh+FkuYVTYWRcxmj/qBhm89Lr6ibXW plQEA/BgZk6LlExA41ZV/sn0ZPEwm0lArwSwMs7VE7XMjAHxrxL2zBIVakH9q8YlpK49 X9Gw== X-Gm-Message-State: AOJu0YyFcghMp4zP3SydeN7CY2JSrFhlQUvcNCzp9fxjWglDWaMItKFk jU3e5lGcZEAWr9owB9pn7WSOiu86u0VAg2f8z68= X-Received: by 2002:a05:6870:b525:b0:1be:c2c5:a1cf with SMTP id v37-20020a056870b52500b001bec2c5a1cfmr11317397oap.51.1691425429629; Mon, 07 Aug 2023 09:23:49 -0700 (PDT) MIME-Version: 1.0 References: <20230801022814.4577-1-sunran001@208suo.com> In-Reply-To: <20230801022814.4577-1-sunran001@208suo.com> From: Alex Deucher Date: Mon, 7 Aug 2023 12:23:38 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/pm: Clean up errors in amdgpu_smu.c 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_NONE,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 10:28=E2=80=AFPM Ran Sun wro= te: > > Fix the following errors reported by checkpatch: > > ERROR: spaces required around that '=3D' (ctx:WxV) > ERROR: spaces required around that '&&' (ctx:VxW) > ERROR: that open brace { should be on the previous line > ERROR: space required before the open parenthesis '(' > ERROR: space required before the open brace '{' > ERROR: spaces required around that ':' (ctx:VxW) > > Signed-off-by: Ran Sun > --- > drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 23 ++++++++++------------- > 1 file changed, 10 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/= amd/pm/swsmu/amdgpu_smu.c > index ce41a8309582..a7199275ffb8 100644 > --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c > +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c > @@ -618,7 +618,7 @@ static int smu_set_funcs(struct amdgpu_device *adev) > adev->pm.pp_feature &=3D ~PP_GFXOFF_MASK; > arcturus_set_ppt_funcs(smu); > /* OD is not supported on Arcturus */ > - smu->od_enabled =3Dfalse; > + smu->od_enabled =3D false; > break; > case IP_VERSION(13, 0, 2): > aldebaran_set_ppt_funcs(smu); > @@ -1648,7 +1648,7 @@ static int smu_hw_fini(void *handle) > struct amdgpu_device *adev =3D (struct amdgpu_device *)handle; > struct smu_context *smu =3D adev->powerplay.pp_handle; > > - if (amdgpu_sriov_vf(adev)&& !amdgpu_sriov_is_pp_one_vf(adev)) > + if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev)) > return 0; > > smu_dpm_set_vcn_enable(smu, false); > @@ -1700,7 +1700,7 @@ static int smu_suspend(void *handle) > int ret; > uint64_t count; > > - if (amdgpu_sriov_vf(adev)&& !amdgpu_sriov_is_pp_one_vf(adev)) > + if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev)) > return 0; > > if (!smu->pm_enabled) > @@ -2217,8 +2217,7 @@ const struct amd_ip_funcs smu_ip_funcs =3D { > .set_powergating_state =3D smu_set_powergating_state, > }; > > -const struct amdgpu_ip_block_version smu_v11_0_ip_block =3D > -{ > +const struct amdgpu_ip_block_version smu_v11_0_ip_block =3D { > .type =3D AMD_IP_BLOCK_TYPE_SMC, > .major =3D 11, > .minor =3D 0, > @@ -2226,8 +2225,7 @@ const struct amdgpu_ip_block_version smu_v11_0_ip_b= lock =3D > .funcs =3D &smu_ip_funcs, > }; > > -const struct amdgpu_ip_block_version smu_v12_0_ip_block =3D > -{ > +const struct amdgpu_ip_block_version smu_v12_0_ip_block =3D { > .type =3D AMD_IP_BLOCK_TYPE_SMC, > .major =3D 12, > .minor =3D 0, > @@ -2235,8 +2233,7 @@ const struct amdgpu_ip_block_version smu_v12_0_ip_b= lock =3D > .funcs =3D &smu_ip_funcs, > }; > > -const struct amdgpu_ip_block_version smu_v13_0_ip_block =3D > -{ > +const struct amdgpu_ip_block_version smu_v13_0_ip_block =3D { > .type =3D AMD_IP_BLOCK_TYPE_SMC, > .major =3D 13, > .minor =3D 0, > @@ -2337,7 +2334,7 @@ int smu_get_power_limit(void *handle, > if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled) > return -EOPNOTSUPP; > > - switch(pp_power_type) { > + switch (pp_power_type) { > case PP_PWR_TYPE_SUSTAINED: > limit_type =3D SMU_DEFAULT_PPT_LIMIT; > break; > @@ -2349,7 +2346,7 @@ int smu_get_power_limit(void *handle, > break; > } > > - switch(pp_limit_level){ > + switch (pp_limit_level) { > case PP_PWR_LIMIT_CURRENT: > limit_level =3D SMU_PPT_LIMIT_CURRENT; > break; > @@ -2595,7 +2592,7 @@ static int smu_read_sensor(void *handle, > *size =3D 4; > break; > case AMDGPU_PP_SENSOR_VCN_POWER_STATE: > - *(uint32_t *)data =3D atomic_read(&smu->smu_power.power_g= ate.vcn_gated) ? 0: 1; > + *(uint32_t *)data =3D atomic_read(&smu->smu_power.power_g= ate.vcn_gated) ? 0 : 1; > *size =3D 4; > break; > case AMDGPU_PP_SENSOR_MIN_FAN_RPM: > @@ -2868,7 +2865,7 @@ static int smu_set_xgmi_pstate(void *handle, > if (smu->ppt_funcs->set_xgmi_pstate) > ret =3D smu->ppt_funcs->set_xgmi_pstate(smu, pstate); > > - if(ret) > + if (ret) > dev_err(smu->adev->dev, "Failed to set XGMI pstate!\n"); > > return ret; > -- > 2.17.1 >