Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3242193rwb; Mon, 7 Aug 2023 10:13:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEte+aFDZUULk9Pi66BA/zfG5aiE+PMGsUcnZ19r8gzMk1toxI1CWCVYHA/SttsBdWMmgw1 X-Received: by 2002:a05:6a20:13d8:b0:133:2a73:fdd5 with SMTP id ho24-20020a056a2013d800b001332a73fdd5mr8625177pzc.32.1691428403025; Mon, 07 Aug 2023 10:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691428403; cv=none; d=google.com; s=arc-20160816; b=VMYMCDGIudgMerlZxqcN4X30SudJ2bRxkygbSqH8+0cBv4gtVTVrZirxP2w2BiKsHL XGHUubHMx51hsIkXaqoXycq4gFiQzhrl3wJxOcNpN0Ta3EMXBaMKOKZ4sIrJm2J0+4tb UFB1uir1sCLBjaY09o6MiZaX1C+XBlUx74tZV20yppvF4KOPIxJ60VN2jzXABYphNTvX aKpm4nrVKQUl0k/ylvXI3BWDuXwlnEYsn1hsPexLBDL+xmUw3yUs/KgjVRSTHNuTCRdJ sYEqii1J4v6qQikMaPfNhqagIUn71QiC6Heu2JeUGVPtGVAEgUUjhWqyIHJwQ6sZ9+pU EJiw== 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=VA7ZGTP/1iIUz0NSZwan87qZk2dibq5PfQ7YdL9IqMM=; fh=t+hei0m6FWvWE3h8ROlSj5pw/xTY3yBXufxuldTsP1A=; b=KIC2/6rkun7UEDKi5AiPgP8YIuUWpiIwjMmOsMy9Eju+0G2l20401zV4EPf+CXvt60 YmRY+LMhUFih61rukZxihWGVy7uhbu2YtvTCulotJ3MQUQ+qiuXGSlfGQj5Y+PLixFix cYQsYwlzEJglQHKGp2/wkEooJIQnkXrON9L/AkKm0ROtkJ9tLVL4FeOsEnyI0Vo+NyeI 9FSrUiYljvgSY8Ph2ou6UnbF0Y9daaUm+0eTw2EfU4aWUFloU4wEmbyf99Wr0stcuENI nOrpe6RQaze0fu9JHWpzVWFqjhHmdVuGl/8kbTKrtyA2HexXb8iAOHmJlBz4nCqkuEuj mqhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=hA6asJm0; 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 b75-20020a63344e000000b005634fdd0979si5902452pga.496.2023.08.07.10.13.10; Mon, 07 Aug 2023 10:13: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=hA6asJm0; 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 S231176AbjHGQYk (ORCPT + 99 others); Mon, 7 Aug 2023 12:24:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231185AbjHGQYi (ORCPT ); Mon, 7 Aug 2023 12:24:38 -0400 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B7F310DE for ; Mon, 7 Aug 2023 09:24:23 -0700 (PDT) Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-56c96982829so3294709eaf.0 for ; Mon, 07 Aug 2023 09:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691425462; x=1692030262; 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=VA7ZGTP/1iIUz0NSZwan87qZk2dibq5PfQ7YdL9IqMM=; b=hA6asJm0yHV08nnQvgNI1vQwBdogPPdoOirvla3DXIv13onvTOJUXQGi9YL0QdFrz9 QyMbdCorzP+ZVfAQDYS4rN/P8b5AGQvcjIyUdiSeTlGCqmN9ba1IrkCZi9eGKbwojvw0 WUo6AuZW014oePyJcQc3Y0+rU3rJrk9dLNBP1zj/YmHxgWZcdrKbDudIxvpKY3aQLyJG CneiIBU20bvfwqpWRr/i+d3fsHydsuOlhD9Vkv/+XFds4Orij3/arJwjcSwyZNPhhW8f yOWqVwmGllhSuNJ523xhzKs0FuVl/0OVa9gdSevSG3LmB7CWCnlDQ+JG5VkrIIAB3cHd R52A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691425462; x=1692030262; 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=VA7ZGTP/1iIUz0NSZwan87qZk2dibq5PfQ7YdL9IqMM=; b=UyoL3U8iiKZ1RXuuKscRMs44MpjFHlltb9/nz3eQCQQcoOdij+iIC0JC8idJh3I0KK swoCu892V7hk24BSUol54EpSpr51otD/n8hesU8Ej+aYvTpRNSqhBqLAii8vWbfmPfSz jMNACA1qBq2W9SwV/gdqvbjbH6/ao/SHVqwltD4Em9Fs8W5HtSSDts37Hm+YAMkigT1m ocW8dGr2q+9K6IInNHavaFcyOeMo1b0iRcm/V02IyN7cGtj5MANsltp20wMAZX9D+fjI JE9ALBotsXYpPpTYwp8Qk6DPbhu7+z87b1nSfBFAwzOUANKGhCrxpu+u+Q/MqvmYPu92 PEZA== X-Gm-Message-State: AOJu0Yxwu5bD77gGnuaiJzrFiGFCsKuRbj+qT9ipg1of1hdF7IfgfVeq kVDxktgL+kkaWs189cQuAu5KDTZZksCMNyxiDSw= X-Received: by 2002:a05:6870:6486:b0:1bb:8867:f7ed with SMTP id cz6-20020a056870648600b001bb8867f7edmr12411828oab.33.1691425462283; Mon, 07 Aug 2023 09:24:22 -0700 (PDT) MIME-Version: 1.0 References: <20230801023658.4667-1-sunran001@208suo.com> In-Reply-To: <20230801023658.4667-1-sunran001@208suo.com> From: Alex Deucher Date: Mon, 7 Aug 2023 12:24:11 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/pm: Clean up errors in amd_powerplay.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_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 10:37=E2=80=AFPM Ran Sun wro= te: > > Fix the following errors reported by checkpatch: > > ERROR: that open brace { should be on the previous line > ERROR: spaces required around that '||' (ctx:WxO) > > Signed-off-by: Ran Sun > --- > drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drivers/g= pu/drm/amd/pm/powerplay/amd_powerplay.c > index ff360c699171..9e4f8a4104a3 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c > @@ -612,7 +612,7 @@ static int pp_dpm_get_pp_num_states(void *handle, > > memset(data, 0, sizeof(*data)); > > - if (!hwmgr || !hwmgr->pm_en ||!hwmgr->ps) > + if (!hwmgr || !hwmgr->pm_en || !hwmgr->ps) > return -EINVAL; > > data->nums =3D hwmgr->num_ps; > @@ -644,7 +644,7 @@ static int pp_dpm_get_pp_table(void *handle, char **t= able) > { > struct pp_hwmgr *hwmgr =3D handle; > > - if (!hwmgr || !hwmgr->pm_en ||!hwmgr->soft_pp_table) > + if (!hwmgr || !hwmgr->pm_en || !hwmgr->soft_pp_table) > return -EINVAL; > > *table =3D (char *)hwmgr->soft_pp_table; > @@ -1002,7 +1002,7 @@ static int pp_get_power_limit(void *handle, uint32_= t *limit, > struct pp_hwmgr *hwmgr =3D handle; > int ret =3D 0; > > - if (!hwmgr || !hwmgr->pm_en ||!limit) > + if (!hwmgr || !hwmgr->pm_en || !limit) > return -EINVAL; > > if (power_type !=3D PP_PWR_TYPE_SUSTAINED) > @@ -1047,7 +1047,7 @@ static int pp_get_display_power_level(void *handle, > { > struct pp_hwmgr *hwmgr =3D handle; > > - if (!hwmgr || !hwmgr->pm_en ||!output) > + if (!hwmgr || !hwmgr->pm_en || !output) > return -EINVAL; > > return phm_get_dal_power_level(hwmgr, output); > @@ -1120,7 +1120,7 @@ static int pp_get_clock_by_type_with_latency(void *= handle, > { > struct pp_hwmgr *hwmgr =3D handle; > > - if (!hwmgr || !hwmgr->pm_en ||!clocks) > + if (!hwmgr || !hwmgr->pm_en || !clocks) > return -EINVAL; > > return phm_get_clock_by_type_with_latency(hwmgr, type, clocks); > @@ -1132,7 +1132,7 @@ static int pp_get_clock_by_type_with_voltage(void *= handle, > { > struct pp_hwmgr *hwmgr =3D handle; > > - if (!hwmgr || !hwmgr->pm_en ||!clocks) > + if (!hwmgr || !hwmgr->pm_en || !clocks) > return -EINVAL; > > return phm_get_clock_by_type_with_voltage(hwmgr, type, clocks); > @@ -1155,7 +1155,7 @@ static int pp_display_clock_voltage_request(void *h= andle, > { > struct pp_hwmgr *hwmgr =3D handle; > > - if (!hwmgr || !hwmgr->pm_en ||!clock) > + if (!hwmgr || !hwmgr->pm_en || !clock) > return -EINVAL; > > return phm_display_clock_voltage_request(hwmgr, clock); > @@ -1167,7 +1167,7 @@ static int pp_get_display_mode_validation_clocks(vo= id *handle, > struct pp_hwmgr *hwmgr =3D handle; > int ret =3D 0; > > - if (!hwmgr || !hwmgr->pm_en ||!clocks) > + if (!hwmgr || !hwmgr->pm_en || !clocks) > return -EINVAL; > > clocks->level =3D PP_DAL_POWERLEVEL_7; > -- > 2.17.1 >