Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5199191rwb; Mon, 31 Jul 2023 21:02:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGsnXAwrYUih5MpZu6hN4B331VkvWi/5+d+QV89Zj8+ZumP4ncU8VWqkCjdHyGN+DK+WpQD X-Received: by 2002:a17:906:8471:b0:99b:efc8:51d with SMTP id hx17-20020a170906847100b0099befc8051dmr1322312ejc.21.1690862530888; Mon, 31 Jul 2023 21:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690862530; cv=none; d=google.com; s=arc-20160816; b=zZJ0QZruKXOrhEAYToqdvrIY6nN8RFBrcvjJDVdtjSScmUy9m0EymtiVRfYV+LU2p1 RkKyUS4Ux0+hNqZcIMEwO5CwYRFMjSQsyCeis1XXDIdi7rL6s14Zlbik/m2uRgy87CCs BE/gLIRgYT5Lc5ccRpWp479S8/NzCSeOUcaOM04DCSNGYDytq1A2qXOnGZYtnwkghFn7 GQAc8frWy5lGArHNOq8R1XD/9uHizcaSiUU4SKz7NE6Vbe20ainGylEct4z6hk/3TjpS bq3HSR/6PKUdi0ENgbYaJkR46b8BhbCa1SDhMBLBplylZaWb79zBHe44ctXYvbjT56MZ lrBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=6mYsFwWDc80Zg2I3ss2qX7M4V42guPPopRkupRiwe9w=; fh=uzQ2njGvRnNicAzoECU0n2pvDAEB0craVlwUtEtLFVc=; b=tpCTCipZ6OR6Il6XOaKKDTxMkVBtwqZ1kvs7HP3JiGwqa9xVNZ3ZK93FRZkFPBNZJX FYXbWGRXq/q2MTqxaz6A+1ksRV4mU769s6JEde5cG2QslpnB7TUBdMVUBWLjT/zUn6hb W2pcs5vbEUR2d/BJw9yga5eZ86/tGlBUKM8sLf27nyT7YyZ73gJj2qrOZQj9iq+b20BS uPCkw/NWvcM/iKnV7yn0j8mI0BEcBdvlzw+eFu4b8UB3+1paN7l5yXFlkbgekHJwF4GH wWp0/Lbzt4L26l/qu2gp+6Liz4GcW8fasjS1nrdn8UdOxQamhxVcdr5bdcgGUdnWwAcC acWg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a170906688700b009939fbb7141si7219803ejr.388.2023.07.31.21.01.47; Mon, 31 Jul 2023 21:02: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbjHAChK (ORCPT + 99 others); Mon, 31 Jul 2023 22:37:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbjHAChJ (ORCPT ); Mon, 31 Jul 2023 22:37:09 -0400 Received: from out28-99.mail.aliyun.com (out28-99.mail.aliyun.com [115.124.28.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BFBAF1 for ; Mon, 31 Jul 2023 19:37:07 -0700 (PDT) X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07440288|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.241969-0.00335738-0.754673;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047194;MF=sunran001@208suo.com;NM=1;PH=DS;RN=7;RT=7;SR=0;TI=SMTPD_---.U5Gdet3_1690857420; Received: from localhost.localdomain(mailfrom:sunran001@208suo.com fp:SMTPD_---.U5Gdet3_1690857420) by smtp.aliyun-inc.com; Tue, 01 Aug 2023 10:37:01 +0800 From: Ran Sun To: alexander.deucher@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ran Sun Subject: [PATCH] drm/amd/pm: Clean up errors in amd_powerplay.c Date: Tue, 1 Aug 2023 02:36:58 +0000 Message-Id: <20230801023658.4667-1-sunran001@208suo.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 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/gpu/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 = hwmgr->num_ps; @@ -644,7 +644,7 @@ static int pp_dpm_get_pp_table(void *handle, char **table) { struct pp_hwmgr *hwmgr = handle; - if (!hwmgr || !hwmgr->pm_en ||!hwmgr->soft_pp_table) + if (!hwmgr || !hwmgr->pm_en || !hwmgr->soft_pp_table) return -EINVAL; *table = (char *)hwmgr->soft_pp_table; @@ -1002,7 +1002,7 @@ static int pp_get_power_limit(void *handle, uint32_t *limit, struct pp_hwmgr *hwmgr = handle; int ret = 0; - if (!hwmgr || !hwmgr->pm_en ||!limit) + if (!hwmgr || !hwmgr->pm_en || !limit) return -EINVAL; if (power_type != PP_PWR_TYPE_SUSTAINED) @@ -1047,7 +1047,7 @@ static int pp_get_display_power_level(void *handle, { struct pp_hwmgr *hwmgr = 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 = 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 = 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 *handle, { struct pp_hwmgr *hwmgr = 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(void *handle, struct pp_hwmgr *hwmgr = handle; int ret = 0; - if (!hwmgr || !hwmgr->pm_en ||!clocks) + if (!hwmgr || !hwmgr->pm_en || !clocks) return -EINVAL; clocks->level = PP_DAL_POWERLEVEL_7; -- 2.17.1