From patchwork Tue Nov 8 11:43:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 16999 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2654527wru; Tue, 8 Nov 2022 03:54:16 -0800 (PST) X-Google-Smtp-Source: AMsMyM79h7YuGJf8l6cL8tNcSZlTBBuZWATVIOBm8SjgQgWUaYKOCPsqmvfddSjuRFE0z6/QkY6B X-Received: by 2002:a17:907:1dc8:b0:7ad:b792:2fec with SMTP id og8-20020a1709071dc800b007adb7922fecmr48375686ejc.732.1667908456230; Tue, 08 Nov 2022 03:54:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667908456; cv=none; d=google.com; s=arc-20160816; b=rkB8r0k0u/ltar4AAXA3Uy1GnBPFTuegQG65tTI9IS36tdWk0ZjKdj064gmye6XJP9 as7BCFAKSjlerp2BjO/tCundwmPOUylTmnODQztVIa1zrQrhR/tuPq5h5ENfk7dbfGP6 KyyV2eSMqlR0tqWwYHQ5HuvYzAfP5oMy6Z+X7baivVIMjTZ4qWckexlwO3+x3NVlkjUT e8/B3DeR9zEgWoR53zDEnOP+Tt5qvA1vG99gqSr6YRK+RZrjWA8AXK+CgQbKgY1VJ42n v2hmoEIyZJlfbDR7g3P0kE3adtza0408u8ahbgUQXE0ruT2yWCtyEmALy/CBfBSaMDhr DJ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=CDeUjuU4sBz/6tz8RZQW5Ah949tdKfZCOjZwcKlav/I=; b=DUNYep1Cd+os0BeFrZSEM7ecx5M5H/O4sBb3dUCBOmfQXkP9K4DuGzNMZeAO79V1wg 0OgxURb/SJA8UeFW2CsMM1iBHTrIhoWVscV8kbKWiKKOFIF7vMEPodPUnAVy414oeigS S3JA7KUeUkZnPWp4Aywc7VK41H05HzUIQoQgwsRdleqQ/b401fymy5V3DkQtn4Zyb2RQ zl38wI5PrHFHf8+1KbArogaNlo55imlI2fgzW9IzUH4HpoQv6gl24xvtlU8QfQLYP393 HSdXWAwWZrVM5mx2W/DZUjZzoO3bYh8iU4W1h1xVdnQ+TMKR9kqVpsPZktXtYu0/hb30 0HgA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v5-20020a170906380500b0078db89b526asi10666872ejc.108.2022.11.08.03.53.44; Tue, 08 Nov 2022 03:54:16 -0800 (PST) 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 S233862AbiKHLs4 (ORCPT + 99 others); Tue, 8 Nov 2022 06:48:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233794AbiKHLsy (ORCPT ); Tue, 8 Nov 2022 06:48:54 -0500 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 56A7B55BA; Tue, 8 Nov 2022 03:48:53 -0800 (PST) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Tue, 8 Nov 2022 19:43:54 +0800 (GMT+08:00) X-Originating-IP: [182.148.13.29] Date: Tue, 8 Nov 2022 19:43:54 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: wangkailong@jari.cn To: Moore , "Rafael J. Wysocki" , Wentland , Li , Siqueira , Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Airlie , Vetter Cc: linux-acpi@vger.kernel.org, devel@acpica.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH] ACPICA: Fix return X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <7ce6bd54.f8.184570dd1b6.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwCXq+H6QGpj7csBAA--.64W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAEB2FEYx0DfAAAsm X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748928777422932905?= X-GMAIL-MSGID: =?utf-8?q?1748928777422932905?= return is not a function, parentheses are not required Signed-off-by: KaiLong Wang --- drivers/acpi/acpica/evsci.c | 12 +++++------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 17 +++++++---------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c index 3915ff61412b..63dd2aa2d16a 100644 --- a/drivers/acpi/acpica/evsci.c +++ b/drivers/acpi/acpica/evsci.c @@ -38,9 +38,8 @@ u32 acpi_ev_sci_dispatch(void) /* Are there any host-installed SCI handlers? */ - if (!acpi_gbl_sci_handler_list) { - return (int_status); - } + if (!acpi_gbl_sci_handler_list) + return int_status; flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); @@ -57,7 +56,7 @@ u32 acpi_ev_sci_dispatch(void) } acpi_os_release_lock(acpi_gbl_gpe_lock, flags); - return (int_status); + return int_status; } /******************************************************************************* @@ -193,9 +192,8 @@ acpi_status acpi_ev_remove_all_sci_handlers(void) acpi_os_remove_interrupt_handler((u32) acpi_gbl_FADT.sci_interrupt, acpi_ev_sci_xrupt_handler); - if (!acpi_gbl_sci_handler_list) { - return (status); - } + if (!acpi_gbl_sci_handler_list) + return status; flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c index 38d71b5c1f2d..66661a20117b 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c @@ -29,7 +29,6 @@ #include "core_types.h" #include "resource.h" #include "ipp.h" -#include "timing_generator.h" #include "dc_dmub_srv.h" #define DC_LOGGER dc->ctx->logger @@ -152,9 +151,8 @@ static void dc_stream_free(struct kref *kref) void dc_stream_release(struct dc_stream_state *stream) { - if (stream != NULL) { + if (stream != NULL) kref_put(&stream->refcount, dc_stream_free); - } } struct dc_stream_state *dc_create_stream_for_sink( @@ -316,11 +314,11 @@ bool dc_stream_set_cursor_attributes( struct dc *dc; bool reset_idle_optimizations = false; - if (NULL == stream) { + if (stream == NULL) { dm_error("DC: dc_stream is NULL!\n"); return false; } - if (NULL == attributes) { + if (attributes == NULL) { dm_error("DC: attributes is NULL!\n"); return false; } @@ -399,12 +397,12 @@ bool dc_stream_set_cursor_position( struct dc *dc = stream->ctx->dc; bool reset_idle_optimizations = false; - if (NULL == stream) { + if (stream == NULL) { dm_error("DC: dc_stream is NULL!\n"); return false; } - if (NULL == position) { + if (position == NULL) { dm_error("DC: cursor position is NULL!\n"); return false; } @@ -468,9 +466,8 @@ bool dc_stream_add_writeback(struct dc *dc, } } - if (!isDrc) { + if (!isDrc) stream->writeback_info[stream->num_wb_info++] = *wb_info; - } if (dc->hwss.enable_writeback) { struct dc_stream_status *stream_status = dc_stream_get_status(stream); @@ -526,7 +523,7 @@ bool dc_stream_remove_writeback(struct dc *dc, /* remove writeback info for disabled writeback pipes from stream */ for (i = 0, j = 0; i < stream->num_wb_info; i++) { if (stream->writeback_info[i].wb_enabled) { - if (j < i) + if (i != j) /* trim the array */ stream->writeback_info[j] = stream->writeback_info[i]; j++;