Message ID | 20240226-anx7625-defer-log-no-dsi-host-v1-1-242b1af31884@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-82332-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2340894dyb; Mon, 26 Feb 2024 13:22:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZ4UD2w2BBnRbl/2hERdfMz4ajGASopNpeyTovMDM1zQcSicTA+tiegFYM8FRkdaBAiAAHC9XyUSYZ94luTik8bYYJlg== X-Google-Smtp-Source: AGHT+IGQEYbsmo1Aso6rF1/ccRi/ioFZP7q4uU3lwbPwAAn/s45OsFLk1PjHYs6bU2oqdzK+McxY X-Received: by 2002:a05:6a00:2d22:b0:6e4:d473:cee3 with SMTP id fa34-20020a056a002d2200b006e4d473cee3mr9522959pfb.15.1708982531035; Mon, 26 Feb 2024 13:22:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708982531; cv=pass; d=google.com; s=arc-20160816; b=zgGNcvEpSDuJuXAlfP5PMa1xgUVjhNXz4m8VTnYXmspjn/wUvJWlO1C0G92/TTjQs9 5UnZuzvJCZLu35V2RyV+B4Oe/CPKetam4+gz02rKgLbbNYr6ndyfh3zDI9dn0L3YNYwe KoL4bdHUn+A0dKArjWtva70dNvnpArKIouGPexMTS3sfctDnhhEe/98ohjvwlkeOqB9b bgr2RHsI9VJ7s1OVoGTl0y/HWQDQAyNQg+d4/sgl6rz1jLjKGfvZG2JT++Wdr1NuYGEd 2t2pw9PqEKRjeH2eC4sraonsQU2Ybb8oHKxwLePjja/aqBIC/FM3AyKV/NpmWk2Ar0K0 ZD/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=5ED4n89XWJ21VgFbkCC1Pmz6iJIAjGAa0E8FgN0m/bc=; fh=aD0UPu4T7QnuIBolLgTzlWUaVN/qmT3+6LMSL9hiGrY=; b=UVHJ6ksqQMIknMElTb8PZnb3q1qIuhG0zu9GcDHKPXhMmCYz8IXmx4tN4gRe3MpXLI GcIe9iVVCOzxfz4zRAKQdx/0A3++ANrSXQ18bKtVvvk8EL+1+u7s5G7yuvtlUkqBx7HO tHZvcMA6QTiLKKuORikIcMgt1bH+27CVVNDJf1xeH/U8QvTszdYam+H0N6lX6g8L5zNs 6yJUIknmB7tsk2kgeOskROcdjNnxPfhVQ2cqzBvD0idqauyMoa30MNoIPZrtLdvhHbYw Q9Gno4E5DP98PZF/HYYzUzOXFY2MJxnRqny8W6N0qYnajaruzFG74RjYbNPB17m4hD8K ifEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="z/tTiTfH"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-82332-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82332-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g28-20020a63565c000000b005dc87994572si4198979pgm.346.2024.02.26.13.22.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 13:22:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82332-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="z/tTiTfH"; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-82332-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82332-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D6B0D28EB7A for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 21:22:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40DF8131E36; Mon, 26 Feb 2024 21:21:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="z/tTiTfH" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 056CB1CA91 for <linux-kernel@vger.kernel.org>; Mon, 26 Feb 2024 21:21:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708982491; cv=none; b=oL8OJNLoFvJLteAqRlY54m/VKHRMho1hthjW0dYexTm2h3D56XosqGoV3flScYoIlSzFOUlPHDARESoduD7FjomSloCuNsK6OMOFS3Z6qYR2N5Vrj9Qc2g4gDagcYGqJM7QP0DLEfvXpmLGxlOt871wUQ1FXAj0abkelARItfA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708982491; c=relaxed/simple; bh=w3le3Y2EYxbOx/Q57ccXOJbKsiJ/mZk+9wNEJ7K0FVs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=dywa7HbWlKX8psbFDqqqCay2KZcWDizFNG+HeeZn4DgyhO8aorPiKCZiRQDOie//14J57qrgJm6auzWWDqGgZ4EBu2lwcbWqud9NrJ71nPOzcaSDIT1oElqUadslNT6TYN2KrVsQgs4js6muTTIRjJ7wTnKbRSHslJzIYoDbAA8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=z/tTiTfH; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1708982488; bh=w3le3Y2EYxbOx/Q57ccXOJbKsiJ/mZk+9wNEJ7K0FVs=; h=From:Date:Subject:To:Cc:From; b=z/tTiTfH7Oqezmj3gH/H/IANV/MOcJi/Yb8EIZz2oCKQ/V1zOYo25xeuSIJdRoQ/9 Ij1kPRdJlaSvE+MAHqcAWNuCcGyeyzR9UbWD1+mHsiYLIfB22ZimzTkgl25ezmRR4z 4TD6dj6tlyigSvvH0DvCuTMNhu8wb3NzAXcgg7ZCOP/h0GV/8SAy4mgLc3HbpJ9FxM z9T91Y6pf9tkV+garuHKcb9upsWSFizf7Yh8twiuEWmpZYRNNq1BmM97VHD8w5hexe fEcdke5uee2IKciDk6kWMTNgTYr77qRWlUY3c0R4r4cJhF+As/9Hc0bC/cIc2+BdIz XPV0d/b5rDTxQ== Received: from [192.168.1.151] (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 53229378111A; Mon, 26 Feb 2024 21:21:25 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> Date: Mon, 26 Feb 2024 16:20:58 -0500 Subject: [PATCH] drm/bridge: anx7625: Don't log an error when DSI host can't be found Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240226-anx7625-defer-log-no-dsi-host-v1-1-242b1af31884@collabora.com> X-B4-Tracking: v=1; b=H4sIALkA3WUC/x3MwQqDMAwA0F+RnBfQ6NTtV2QHTVMNjHY0Mgriv 1s8vss7wCSpGLyrA5L81TSGguZRAW9zWAXVFQPV1NVEPc4hDz090YmXhN+4YojoTHGLtiO3/sW 88ELjAOX4JfGa73/6nOcFC4XP6G8AAAA= To: Robert Foss <rfoss@kernel.org> Cc: Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, owen <qwt9588@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@kernel.org>, kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> X-Mailer: b4 0.13.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791998066305133283 X-GMAIL-MSGID: 1791998066305133283 |
Series |
drm/bridge: anx7625: Don't log an error when DSI host can't be found
|
|
Commit Message
Nícolas F. R. A. Prado
Feb. 26, 2024, 9:20 p.m. UTC
Given that failing to find a DSI host causes the driver to defer probe,
make use of dev_err_probe() to log the reason. This makes the defer
probe reason available and avoids alerting userspace about something
that is not necessarily an error.
Fixes: 269332997a16 ("drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi host was not found")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
drivers/gpu/drm/bridge/analogix/anx7625.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
base-commit: 2ae0a045e6814c8c1d676d6153c605a65746aa29
change-id: 20240226-anx7625-defer-log-no-dsi-host-c3f9ccbcb287
Best regards,
Comments
Il 26/02/24 22:20, Nícolas F. R. A. Prado ha scritto: > Given that failing to find a DSI host causes the driver to defer probe, > make use of dev_err_probe() to log the reason. This makes the defer > probe reason available and avoids alerting userspace about something > that is not necessarily an error. > > Fixes: 269332997a16 ("drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi host was not found") > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> > --- > drivers/gpu/drm/bridge/analogix/anx7625.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > index 29d91493b101..4ee5614a2623 100644 > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > @@ -2076,10 +2076,8 @@ static int anx7625_setup_dsi_device(struct anx7625_data *ctx) > }; > > host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node); > - if (!host) { > - DRM_DEV_ERROR(dev, "fail to find dsi host.\n"); > - return -EPROBE_DEFER; > - } > + if (!host) > + return dev_err_probe(dev, -EPROBE_DEFER, "fail to find dsi host.\n"); Agreed, but while at it: 1. This is not the only driver doing this, so you might as well go fix all of them in a series (toshiba tcxxxx, lontium, chipone.... check them, the error message is exactly the same even, that'd take 3 seconds); 2. I've just noticed that, in this driver, of_node_put() is never called for the `mipi_host_node`, so the reference is never dropped... but that can come later and not necessarily in the eventual series that fixes the err message strategy. In the meanwhile, for this commit Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > > dsi = devm_mipi_dsi_device_register_full(dev, host, &info); > if (IS_ERR(dsi)) { > > --- > base-commit: 2ae0a045e6814c8c1d676d6153c605a65746aa29 > change-id: 20240226-anx7625-defer-log-no-dsi-host-c3f9ccbcb287 > > Best regards,
On 26/02/2024 22:20, Nícolas F. R. A. Prado wrote: > Given that failing to find a DSI host causes the driver to defer probe, > make use of dev_err_probe() to log the reason. This makes the defer > probe reason available and avoids alerting userspace about something > that is not necessarily an error. > > Fixes: 269332997a16 ("drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi host was not found") > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> > --- > drivers/gpu/drm/bridge/analogix/anx7625.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > index 29d91493b101..4ee5614a2623 100644 > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > @@ -2076,10 +2076,8 @@ static int anx7625_setup_dsi_device(struct anx7625_data *ctx) > }; > > host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node); > - if (!host) { > - DRM_DEV_ERROR(dev, "fail to find dsi host.\n"); > - return -EPROBE_DEFER; > - } > + if (!host) > + return dev_err_probe(dev, -EPROBE_DEFER, "fail to find dsi host.\n"); > > dsi = devm_mipi_dsi_device_register_full(dev, host, &info); > if (IS_ERR(dsi)) { > > --- > base-commit: 2ae0a045e6814c8c1d676d6153c605a65746aa29 > change-id: 20240226-anx7625-defer-log-no-dsi-host-c3f9ccbcb287 > > Best regards, Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 29d91493b101..4ee5614a2623 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2076,10 +2076,8 @@ static int anx7625_setup_dsi_device(struct anx7625_data *ctx) }; host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node); - if (!host) { - DRM_DEV_ERROR(dev, "fail to find dsi host.\n"); - return -EPROBE_DEFER; - } + if (!host) + return dev_err_probe(dev, -EPROBE_DEFER, "fail to find dsi host.\n"); dsi = devm_mipi_dsi_device_register_full(dev, host, &info); if (IS_ERR(dsi)) {