Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4252491pxu; Mon, 12 Oct 2020 13:47:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAmKlGFjPM6y44mUvez3NbKYHSGJClCnZJAaIuFqqy4/8NfQvgBgbcEczmDVzZZKE4qiUB X-Received: by 2002:a05:6402:1c1b:: with SMTP id ck27mr16553003edb.218.1602535662575; Mon, 12 Oct 2020 13:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602535662; cv=none; d=google.com; s=arc-20160816; b=EN6Zjt/UVctP3gM0b4qLgbLdmBqSWYeGL/bF9hVX4PYfc+dhScJBOntK14nmlhhkYH e/XMBhZh/rKU/uQPFl85Mpm/msEl4oPmhOvlTg8xzXrHIGJj+lSSbgO2VZk/oK2lnAFt gWN2DvKne9LYeXtF3OSD3FfTDugkOMo4uYaMrSoEFFRg6BTqhdVwLlrAr/zE87ZmpV7Z suyNeR/u6jXRELKOoEMcw8olSBWyAZjgWVJnYTVSJr4HAaoA4I6nsbGDJ+fDRn41eoGq RKBswG85FvbBk/ojmqpL61MAU2ilbSvDvuo/+Njyo/xFSe7H9H06MqECeK6Gt6UncoaG y/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8Rwz1jAoVIP03F7YNj+XGgPQCRB0/XF2n303+5rUqvU=; b=wBm0auGYS+C6DekvRAgosZ9MqTixBcmyin9nOrccE/IrjRr1Hpn0oayz9ggzQeLijn zNp5/854s3Wg2C2qAKufyoguMXj0MLVs5DYciNqaIx8DB8K9/lEwFFAo/wpC4cEeFbCW uLxWVtICo+b/q6jJbQbMO80e8cU0PPQiKpzhocrcl3qUSuljf52yyRbsshEaKCAgm5jX iuyHSzY+oBTmeX7tL7i74CYhrMu3ilOuwYl9R/l+VkBwJByXRYMsZmNg5FXbykjmhgOm Ek/R6CYRBGW/6VU3ho9erZLQQzLOOkOA84SncPjvbWRL0NPzQAiYOHKE/ukbyFyCC1Tu Vqig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p15si12857592ejm.293.2020.10.12.13.47.19; Mon, 12 Oct 2020 13:47:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388262AbgJLLqg (ORCPT + 99 others); Mon, 12 Oct 2020 07:46:36 -0400 Received: from mail-m17613.qiye.163.com ([59.111.176.13]:54740 "EHLO mail-m17613.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388247AbgJLLqf (ORCPT ); Mon, 12 Oct 2020 07:46:35 -0400 Received: from ubuntu.localdomain (unknown [157.0.31.124]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id 7EB9248240E; Mon, 12 Oct 2020 19:46:29 +0800 (CST) From: Bernard Zhao To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , Rodrigo Siqueira , Anthony Koo , Aric Cyr , Nicholas Kazlauskas , Yongqiang Sun , Bhawanpreet Lakha , Jun Lei , Samson Tam , Krunoslav Kovac , Reza Amini , Brandon Syu , Charlene Liu , Aurabindo Pillai , Wyatt Wood , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: opensource.kernel@vivo.com, Bernard Zhao Subject: [PATCH] drm/amd/display: remove no need return value Date: Mon, 12 Oct 2020 04:46:16 -0700 Message-Id: <20201012114623.8583-1-bernard@vivo.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZQk0dGUNOGEIdTklKVkpNS0lOS0hKQktLTkNVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS09ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OhA6Dyo5Az8jIzkJFRgtMzAQ SxkaCRFVSlVKTUtJTktISkJLTklLVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSU9ZV1kIAVlBTU9OTjcG X-HM-Tid: 0a751ca225f793bakuws7eb9248240e Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Functions (disable_all_writeback_pipes_for_stream & dc_enable_stereo & dc_post_update_surfaces_to_stream) always return true, there is no need to keep the return value. This change is to make the code a bit more readable. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/amd/display/dc/core/dc.c | 17 +++++------------ drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 92eb1ca1634f..8dc598a632b5 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -761,7 +761,7 @@ static bool dc_construct(struct dc *dc, return false; } -static bool disable_all_writeback_pipes_for_stream( +static void disable_all_writeback_pipes_for_stream( const struct dc *dc, struct dc_stream_state *stream, struct dc_state *context) @@ -770,8 +770,6 @@ static bool disable_all_writeback_pipes_for_stream( for (i = 0; i < stream->num_wb_info; i++) stream->writeback_info[i].wb_enabled = false; - - return true; } void apply_ctx_interdependent_lock(struct dc *dc, struct dc_state *context, struct dc_stream_state *stream, bool lock) @@ -1213,13 +1211,12 @@ bool dc_validate_seamless_boot_timing(const struct dc *dc, return true; } -bool dc_enable_stereo( +void dc_enable_stereo( struct dc *dc, struct dc_state *context, struct dc_stream_state *streams[], uint8_t stream_count) { - bool ret = true; int i, j; struct pipe_ctx *pipe; @@ -1234,8 +1231,6 @@ bool dc_enable_stereo( dc->hwss.setup_stereo(pipe, dc); } } - - return ret; } /* @@ -1448,18 +1443,18 @@ static bool is_flip_pending_in_pipes(struct dc *dc, struct dc_state *context) return false; } -bool dc_post_update_surfaces_to_stream(struct dc *dc) +void dc_post_update_surfaces_to_stream(struct dc *dc) { int i; struct dc_state *context = dc->current_state; if ((!dc->optimized_required) || dc->optimize_seamless_boot_streams > 0) - return true; + return; post_surface_trace(dc); if (is_flip_pending_in_pipes(dc, context)) - return true; + return; for (i = 0; i < dc->res_pool->pipe_count; i++) if (context->res_ctx.pipe_ctx[i].stream == NULL || @@ -1472,8 +1467,6 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) dc->optimized_required = false; dc->wm_optimized_required = false; - - return true; } struct dc_state *dc_create_state(struct dc *dc) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index f50ef4255020..f79a3c318757 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -962,7 +962,7 @@ struct dc_flip_addrs { bool triplebuffer_flips; }; -bool dc_post_update_surfaces_to_stream( +void dc_post_update_surfaces_to_stream( struct dc *dc); #include "dc_stream.h" diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h index d9888f316da6..0047ab33f88e 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_stream.h +++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h @@ -391,7 +391,7 @@ enum dc_status dc_validate_stream(struct dc *dc, struct dc_stream_state *stream) * Enable stereo when commit_streams is not required, * for example, frame alternate. */ -bool dc_enable_stereo( +void dc_enable_stereo( struct dc *dc, struct dc_state *context, struct dc_stream_state *streams[], -- 2.28.0