From patchwork Wed Mar 22 17:02:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13184342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ADDABC6FD1C for ; Wed, 22 Mar 2023 17:02:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F9C410E99E; Wed, 22 Mar 2023 17:02:33 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8350D10E107 for ; Wed, 22 Mar 2023 17:02:30 +0000 (UTC) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pf1r1-0000PS-Rp; Wed, 22 Mar 2023 18:02:27 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pf1r1-005xjt-2M; Wed, 22 Mar 2023 18:02:27 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pf1r0-0075pQ-6p; Wed, 22 Mar 2023 18:02:26 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter Subject: [PATCH 02/12] drm/tegra: rgb: Make tegra_dc_rgb_remove() return void Date: Wed, 22 Mar 2023 18:02:13 +0100 Message-Id: <20230322170223.410376-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322170223.410376-1-u.kleine-koenig@pengutronix.de> References: <20230322170223.410376-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2271; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=R2c12RCoAJNB1Ym1Z8XA0LNnWuyRmRWf7LRJ15IB9g8=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkGzSQ18dFEVstJRUWcrKwK/J/YtT8BBUd69Trh TBUl1RWQMWJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZBs0kAAKCRCPgPtYfRL+ ToPLB/9u0yBthwpWsinaC30eGwPtXx21a6i9MH8gDfIel05tReXHehmN72rmghXYtwsMwZGgUvY 7PCOJq3Ft1piC1WBJXr6GQEqogWK8Wsb1QVBjrpyxdtY0i3H+u1kI8qkfVSz2dfzEfgPwH5yi3z W/D3Nef9hELh18sVkUnX9ZsWml+dAoUgMMJ7TvI7gEIi2GOXTWPZllWbRXV8EWzHKNTLsDhHKsR UY9qk5U/KIuzh/2z9tRpLPtR8+hrJb5U7WgR3+arxLQ5XXCqd3boo+SdaoszmdnHSyLMsDQXR0P ESCwCytCkU6VC8RZFFEaUaIkO7CVGO4hjxYf0mAsSTXUt3O0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, kernel@pengutronix.de, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This function returned zero unconditionally. Make it return no value and simplify all callers accordingly. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/tegra/dc.c | 7 +------ drivers/gpu/drm/tegra/dc.h | 2 +- drivers/gpu/drm/tegra/rgb.c | 6 ++---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index bd108159fc2c..6bf1b2bc43b1 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -3266,15 +3266,10 @@ static int tegra_dc_probe(struct platform_device *pdev) static int tegra_dc_remove(struct platform_device *pdev) { struct tegra_dc *dc = platform_get_drvdata(pdev); - int err; host1x_client_unregister(&dc->client); - err = tegra_dc_rgb_remove(dc); - if (err < 0) { - dev_err(&pdev->dev, "failed to remove RGB output: %d\n", err); - return err; - } + tegra_dc_rgb_remove(dc); pm_runtime_disable(&pdev->dev); diff --git a/drivers/gpu/drm/tegra/dc.h b/drivers/gpu/drm/tegra/dc.h index f902794d42cc..0559fa6b1bf7 100644 --- a/drivers/gpu/drm/tegra/dc.h +++ b/drivers/gpu/drm/tegra/dc.h @@ -169,7 +169,7 @@ void tegra_crtc_atomic_post_commit(struct drm_crtc *crtc, /* from rgb.c */ int tegra_dc_rgb_probe(struct tegra_dc *dc); -int tegra_dc_rgb_remove(struct tegra_dc *dc); +void tegra_dc_rgb_remove(struct tegra_dc *dc); int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc); int tegra_dc_rgb_exit(struct tegra_dc *dc); diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c index ff8fce36d2aa..da2d9baca214 100644 --- a/drivers/gpu/drm/tegra/rgb.c +++ b/drivers/gpu/drm/tegra/rgb.c @@ -250,12 +250,12 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc) return 0; } -int tegra_dc_rgb_remove(struct tegra_dc *dc) +void tegra_dc_rgb_remove(struct tegra_dc *dc) { struct tegra_rgb *rgb; if (!dc->rgb) - return 0; + return; rgb = to_rgb(dc->rgb); clk_put(rgb->pll_d2_out0); @@ -263,8 +263,6 @@ int tegra_dc_rgb_remove(struct tegra_dc *dc) tegra_output_remove(dc->rgb); dc->rgb = NULL; - - return 0; } int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc)