From patchwork Sun Aug 4 20:16:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11074915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79D511395 for ; Sun, 4 Aug 2019 20:17:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A74C287A0 for ; Sun, 4 Aug 2019 20:17:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DD1528803; Sun, 4 Aug 2019 20:17:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D06EE287A0 for ; Sun, 4 Aug 2019 20:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726774AbfHDURk (ORCPT ); Sun, 4 Aug 2019 16:17:40 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41004 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbfHDURk (ORCPT ); Sun, 4 Aug 2019 16:17:40 -0400 Received: by mail-lj1-f195.google.com with SMTP id d24so77414415ljg.8; Sun, 04 Aug 2019 13:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6MTU39yk5XE3/teu/iygu6ssiL/liUAav6Pm3DHBCYk=; b=ZA+/n3H1+MtW9kTQsOeyUTYBdS4nVqs91zmpewRJFA3g7GvGQHLzWjAjOA2KjxXx06 We5wixz1fYGGRfl4QVFNMFUlpsCTWlYYKqEvsenMNEn+umCLTk9CVcDwep5AWL3nMklw BE0U06HBU0suEpm4nBPoJDfJhOJ3w9QwKz6jigew0xkksRe9L00eDSnEM71EoDfCTUPg 7nrulAhNbAbTHY+edA4Z3Svw2nUDmxkVdABuSiEuGp6HMhZXFqmRCr1nFitHbmU1UlYG Zy65eNXTqN6bZkutzJV1YvC+78T9mG4fIKkroPYupOV3oH41jdymZWNkxjqAGh2S3boz c+IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6MTU39yk5XE3/teu/iygu6ssiL/liUAav6Pm3DHBCYk=; b=j049xFF6c9P4JAGfPjBKwj1leOmWZSXFrR9/zJ8MpVzzNZjL8bDBSJcMkMAVG9AdhA 0qHd577Mf8CbUIDsdwrYTKH4rQ+DOgHlhpNb9ogV14Ne+XHxXuUhFADTwCvAEaLdRKMq 4iaWb+Jf/soRB3GTLoyP1Ay7GEhC230C8QOLR34FjhLjZdb/S9CoJEp/ulq2jN+C4Jen GKojuMD7D6HJOlcMp0mAxwDyGIUqcfCczIsnAXS7fu+n1hWBfcZGQke0M57eiPQ6xG1K MEU5BsSwOS2dZyJ8vt0i3JAHHm22q/UZSyuNGBA8nNa5N9BNNwnznCbuKcLx/TZnoI+H Gl/w== X-Gm-Message-State: APjAAAWasMQmbDXIQk718LP+1I5rKt2Cp/8dNW2pB6sCJjBUkAOl16QE xc0JQtOPvyaoXD/Yv6GaKqI= X-Google-Smtp-Source: APXvYqx8atks2YbWr9RifkxwlrpCrnQ0MuWxB3GhHudkPh8VHtkqm1B+XsEC8X6Ec2DIcd1SBSKPlQ== X-Received: by 2002:a2e:9a58:: with SMTP id k24mr76690634ljj.165.1564949857549; Sun, 04 Aug 2019 13:17:37 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id p87sm16540794ljp.50.2019.08.04.13.17.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 13:17:37 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Thierry Reding Cc: Alexios Zavras , Alison Wang , Allison Randal , Andrzej Hajda , Benjamin Gaignard , Daniel Vetter , David Airlie , Enrico Weigelt , Fabio Estevam , Gwan-gyeong Mun , Inki Dae , Jernej Skrabec , Jonas Karlman , Jonathan Hunter , Joonyoung Shim , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Laurent Pinchart , Laurent Pinchart , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, Maarten Lankhorst , Marek Vasut , Maxime Ripard , Neil Armstrong , NXP Linux Team , Pengutronix Kernel Team , Philipp Zabel , Sam Ravnborg , Sascha Hauer , Sean Paul , Seung-Woo Kim , Shawn Guo , Stefan Agner , Thomas Gleixner , Vincent Abriou Subject: [PATCH v1 13/16] drm/panel: drop return code from drm_panel_detach() Date: Sun, 4 Aug 2019 22:16:34 +0200 Message-Id: <20190804201637.1240-14-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190804201637.1240-1-sam@ravnborg.org> References: <20190804201637.1240-1-sam@ravnborg.org> MIME-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are no errors that can be reported by this function, so drop the return code. Fix the only bridge driver that checked the return result. Signed-off-by: Sam Ravnborg Cc: Thierry Reding Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Laurent Pinchart Cc: Andrzej Hajda Cc: Gwan-gyeong Mun Cc: Thomas Gleixner Cc: Linus Walleij Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 3 +-- drivers/gpu/drm/drm_panel.c | 6 +----- include/drm/drm_panel.h | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index f2f7f69d6cc3..22885dceaa17 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1780,8 +1780,7 @@ void analogix_dp_unbind(struct analogix_dp_device *dp) if (dp->plat_data->panel) { if (drm_panel_unprepare(dp->plat_data->panel)) DRM_ERROR("failed to turnoff the panel\n"); - if (drm_panel_detach(dp->plat_data->panel)) - DRM_ERROR("failed to detach the panel\n"); + drm_panel_detach(dp->plat_data->panel); } drm_dp_aux_unregister(&dp->aux); diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index 9946b8d9bacc..da19d5b4a2f4 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -219,15 +219,11 @@ EXPORT_SYMBOL(drm_panel_attach); * * This function should not be called by the panel device itself. It * is only for the drm device that called drm_panel_attach(). - * - * Return: 0 on success or a negative error code on failure. */ -int drm_panel_detach(struct drm_panel *panel) +void drm_panel_detach(struct drm_panel *panel) { panel->connector = NULL; panel->drm = NULL; - - return 0; } EXPORT_SYMBOL(drm_panel_detach); diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 5e62deea49ba..624bd15ecfab 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -153,7 +153,7 @@ int drm_panel_add(struct drm_panel *panel); void drm_panel_remove(struct drm_panel *panel); int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector); -int drm_panel_detach(struct drm_panel *panel); +void drm_panel_detach(struct drm_panel *panel); int drm_panel_prepare(struct drm_panel *panel); int drm_panel_unprepare(struct drm_panel *panel);