Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4895352pxu; Tue, 13 Oct 2020 09:33:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfz4pT5a5Upt4jP1PmLVpYff9HnivI4e/JbVcVmv+cJQFJHAApE6MX4Uxcf/HW0w3PGZ59 X-Received: by 2002:a50:fe82:: with SMTP id d2mr408038edt.86.1602606812321; Tue, 13 Oct 2020 09:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602606812; cv=none; d=google.com; s=arc-20160816; b=u8A2+X+trofYdDo0zX15cRhGvsas3Jz9ptHfMzqwjJbLsLFEhjMcX6bmYnZFXr1/2O wdfYoX0s3ZOoHf4eZ2t6ik+s7QeqoMdnAM7QJc08VsQbeAIuBj9F8WrCNxnC+Lmn7Oly V1AVeNabQc+89El8cie5Wx62rnQWZBUfTIGV3X0r4htEv2ZAb7is7SPM/wFv6Ihwey7Y 68zyEKDFD/BsH9Zdgf8I+iX6nrlkn6433Wf16EpcETngac2xXVbde72rfFj5E5/+4lQD rJjKt7Nqt09oZQMtuKeiEu4xI5aDyMufSXF0t2NvNp4m3s3mEAfFZgWHwWcI1fghn50+ 49Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hP4I1TSE0iiKe4uFVvPyKh5ZjOZU39ztMJs9eGzKphE=; b=ZzYUJf72tts1PzbU9rjCvdC4lmd7Muu6n3B8SK0mv5kyYO1YKBENX1zWDs3f17//Nd YnbyAGjjmMJwZRvg6pVstpuNQ1p8wonvS91Z+d4RoLjcz1lsuOOsPCZZZSmMIgD5QAPV IozJMQA31sUzUJp8IaJvVbO4W2H3UleOiK1NVwuOW5w676vrPXOgWifzFps3e2rhETWf vbXdvfT3Xiily2uUl/akBPGJUA/CrrL5SULSmwwM1kaoaG4RmFvnbtm9tLDLQbNGJnfw SOKa3OvRKVHPrFY8uS2EjP9i5Qbhxal3OxO7DhtqC4gYzKqp7poRnfUyWkizITAYj5Rw gymg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d7rK4C8m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e2si123243edl.476.2020.10.13.09.33.07; Tue, 13 Oct 2020 09:33:32 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d7rK4C8m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728494AbgJMNLv (ORCPT + 99 others); Tue, 13 Oct 2020 09:11:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727789AbgJMNLv (ORCPT ); Tue, 13 Oct 2020 09:11:51 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D40C0613D0 for ; Tue, 13 Oct 2020 06:11:49 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id e17so23947334wru.12 for ; Tue, 13 Oct 2020 06:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hP4I1TSE0iiKe4uFVvPyKh5ZjOZU39ztMJs9eGzKphE=; b=d7rK4C8mM7F7Mme2iU2+7ZjVgizAOHZSsRSZe5ZPmBkFa7mDw5CR4Z/BftFM5EMzSn 5A6rRSaYV9xFqjcsRSWKas27xMHogPcTggZkiLuwP96It/VGrrLF1KBgyKV6OtGNlsFK VjmRlV5FgTBf2LYV1MEXXTqpR3rIaiD4xgM7gPLQ/TfEOrpUnXicpnFfbXQKoJ0Gu4WM aNy/qZKePQWr+spaE7cwccOBkp/F/ZqsRO2UVEvDk6iM5m2hF1DQC98fPByh9Xacd5Vd FJJgWhfTHkZgWBM9ZjStW/z3oGUQIRDoSpoBHi8avv2MHVIomMrvaxvknNf15MYnqnXD GtSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hP4I1TSE0iiKe4uFVvPyKh5ZjOZU39ztMJs9eGzKphE=; b=IVqk3e+IhLLQhKhJFZBbBS85Ggr1KnCZnxOHUKJcMxiIEKKWANlrmhq1V9U+8wQHqa A+qB07St4EJwO5PlZD2dGdp2me4QvbDPLx7jcMCbw5QoHpF1Lla3LV92NX2M7fhtu1G9 EItRV+5xCjN/+3+jSrd0rxAs6kdf6HBjY74aEp+XwdM6VbClFtnd0yXyNJSKR/lTwI0Y j77G/JSd9qAPPvS+n5cTMK93f5eVu6yFftJaN3xfwu36QC19Xe615Hbb47UWygspkWqc YQMdlI+zMSgfzdrr0PuGWl2QKQveOnSaa4gD+NkVsG8d40xEaFq+Ruok6o/2KI6W0md4 A/cg== X-Gm-Message-State: AOAM533uczYYxUusTMRjECazlvgDCx5C/JGiIYqqiF6J2xR00SYjZpm0 6/VA2ZX6S/p+qgpwcL/KLK87/25g2Ldx6D093lc= X-Received: by 2002:adf:f246:: with SMTP id b6mr29643949wrp.111.1602594707982; Tue, 13 Oct 2020 06:11:47 -0700 (PDT) MIME-Version: 1.0 References: <20201012114623.8583-1-bernard@vivo.com> In-Reply-To: <20201012114623.8583-1-bernard@vivo.com> From: Alex Deucher Date: Tue, 13 Oct 2020 09:11:36 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: remove no need return value To: Bernard Zhao Cc: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=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 list , Maling list - DRI developers , LKML , linux-arm-kernel , linux-mediatek@lists.infradead.org, opensource.kernel@vivo.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Mon, Oct 12, 2020 at 9:44 AM Bernard Zhao wrote: > > 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 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx