From patchwork Mon Dec 18 10:57:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13496609 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 60DCCC35274 for ; Mon, 18 Dec 2023 10:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hb8Dwv1z1pqzK75/ogVwTNDD8vpp/FLR5dCdzUkRFLE=; b=3WRCprb0dWY7+t KYOxiYIm94ZZOtxrpCgDQ8CGsUl+iuGaJkQg/suGczTZAwlEmH7/spC+UdSQMVSJYmpPSiE8MqgKw ONNUU+N6j/L57CXm7REcQNG1bHaxVbCUGVHS51GHnkXm0wOYJnqCBCMwNtpHpWouOcskMTPOitkMB QqsU07SsaDo5gsEqNUExMcK7o8KMVA/WQgLL48D49mTe9BpavEe5YfxD2dXT+Drf0VmtjWv7Ri35T 6/I6hwX5DGpoKVohcW/XLYV1DpNC8X9ZGFJMOEcRZkGNHVe20V7YhuZpjOis+Ggv133ICG8sfjE18 RERxzhgyW21LAYpjQOMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFBJc-009wl9-1z; Mon, 18 Dec 2023 10:57:40 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFBJP-009wai-0X for linux-arm-kernel@lists.infradead.org; Mon, 18 Dec 2023 10:57:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1702897047; x=1734433047; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ues8RonNkqtXNeQTmjHWB7sVdRAozhdTlsj5rYeL0Go=; b=aTEcJJYB3+Xox6MivWXvbPO0qyOnjLOKL5UmhIp8vA66qFPf29twnHo5 G5hIjYG+TO8nw0rAMrTnXpgausf14oXAUw7u4AvvxRH5jL0CdhoF0mMPd vdTsU6P6hX15sJ3mnOaHKdAIIcoLkGy3JZXMfmge59bffaGe9YVmXfEXv WxTsspQYYOei86WUJA9A00pr3QUHapI8khzt1xFiARdsRzs2z1nft3Ns3 rbPULbilb806xBt799lnxgwj4aEBUAgGMUm2vqCHF39fbVTtk0FPanDKF qTBnLozXHPDBovBZtcynSnYz5fAquX3Gysp5/H9Bp56O72CsWnHIAh0DQ g==; X-IronPort-AV: E=Sophos;i="6.04,285,1695679200"; d="scan'208";a="34559833" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 18 Dec 2023 11:57:22 +0100 Received: from steina-w.tq-net.de (steina-w.tq-net.de [10.123.53.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id C4F08280075; Mon, 18 Dec 2023 11:57:21 +0100 (CET) From: Alexander Stein To: Liu Ying , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/6] drm/bridge: imx8qxp-pixel-link: Use dev_err_probe Date: Mon, 18 Dec 2023 11:57:16 +0100 Message-Id: <20231218105718.2445136-5-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218105718.2445136-1-alexander.stein@ew.tq-group.com> References: <20231218105718.2445136-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231218_025727_504586_F3C8F4C9 X-CRM114-Status: GOOD ( 10.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This simplifies the code and gives additional information upon deferral. Signed-off-by: Alexander Stein --- .../gpu/drm/bridge/imx/imx8qxp-pixel-link.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c index ed8b7a4e0e11..b8cc1df3e572 100644 --- a/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c +++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c @@ -338,12 +338,9 @@ static int imx8qxp_pixel_link_bridge_probe(struct platform_device *pdev) return -ENOMEM; ret = imx_scu_get_handle(&pl->ipc_handle); - if (ret) { - if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, "failed to get SCU ipc handle: %d\n", - ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, + "failed to get SCU ipc handle\n"); ret = of_property_read_u8(np, "fsl,dc-id", &pl->dc_id); if (ret) { @@ -379,13 +376,9 @@ static int imx8qxp_pixel_link_bridge_probe(struct platform_device *pdev) return ret; pl->next_bridge = imx8qxp_pixel_link_find_next_bridge(pl); - if (IS_ERR(pl->next_bridge)) { - ret = PTR_ERR(pl->next_bridge); - if (ret != -EPROBE_DEFER) - DRM_DEV_ERROR(dev, "failed to find next bridge: %d\n", - ret); - return ret; - } + if (IS_ERR(pl->next_bridge)) + return dev_err_probe(dev, PTR_ERR(pl->next_bridge), + "failed to find next bridge\n"); platform_set_drvdata(pdev, pl);