Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7736448rdb; Thu, 4 Jan 2024 06:16:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbGMBoV5dKJAnD0mr2eeEzsSI2mZC0rIsG2VQronDNzsQ7LdxsC0dwFhlxUWWB0la0zHsg X-Received: by 2002:a05:6a20:d423:b0:18b:46b4:9333 with SMTP id il35-20020a056a20d42300b0018b46b49333mr483788pzb.41.1704377778426; Thu, 04 Jan 2024 06:16:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704377778; cv=none; d=google.com; s=arc-20160816; b=Re7w9gmiZurPU30RZ24Sm0D6NKHlp/waklD7puROn77v2pyFuQkS8lLidlzBChcZzX lMskZB2/e5rQdiP3oLkwrapz+fKjI0gELNJuwg0ZKY6+C33dEK7W4Zr8zx8WWyT/2JuH 7k5lGyxHfM1KYqrCUVpaLDQQjZzAKk6UWS4N7Suw6MjKy76r9WsBXtgqZzoBhoW2Fijc wR4MGmME8YioPDj4wQEwb8kU95MHP6j3AIAHMCw0nru8msB2r4MvcyZVKouQ5Vhdndyw LyIQX/aowoBgnHiL1M3Am1+fxOyQn6UtVwiJYcTlnfsWmJnkes1YOjfAzF/aQj/y13SP JUBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=AmaWgiCBszsRzKx9yuitDxgMmje90hv7fadfNNATm+4=; fh=+uW0hws10oXGEPlfjfCqDtjV0rLOyPvGgpwRMWB3CsQ=; b=wtGAKdWGBfuK3LZSy8J6u4py7X3HlRj0QeXxB7+VdHzsLrSJH06r2Yyv99WGywiTiV A0gg4ST32i9EHSw4Dgw+kH0qcBH3zUvnzHWUyYuKdkxLzOyoF6hH+7T7kmX/OQK4aAUt Xk4a8SZeRlXX/gbEngyDVQlGlf/QF1d66p2xfEEedakoKg+Pv6o/okubin3IZ+mfDiYj r+P/EFRi0iGoKgkEiq1URTE+MAPTEn4mhK2Cam92YEmthe16Qm4xvOMVTkp5K2YAwZPf OLLVYn/0ss1ieLEq/zwcyosKGFOk2znmrQThriahfII6AEkoeMsJKkaR4oiCB0P1QSYv QfMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=FyZMz01Y; spf=pass (google.com: domain of linux-kernel+bounces-16757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v62-20020a632f41000000b005c65e697bb3si23076001pgv.518.2024.01.04.06.16.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 06:16:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=FyZMz01Y; spf=pass (google.com: domain of linux-kernel+bounces-16757-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16757-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C3EDCB24115 for ; Thu, 4 Jan 2024 14:16:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6841224E9; Thu, 4 Jan 2024 14:16:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="FyZMz01Y" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 491572136C for ; Thu, 4 Jan 2024 14:16:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from [192.168.1.18] ([92.140.202.140]) by smtp.orange.fr with ESMTPA id LOOSrLWbxQhj4LOOSruDmn; Thu, 04 Jan 2024 15:08:23 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1704377304; bh=AmaWgiCBszsRzKx9yuitDxgMmje90hv7fadfNNATm+4=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=FyZMz01YX0Tw3hBtFEoZeVGGECM14rbYltZqrQn2Q0Txau1v2w+fGQ+g/6eKl2GnD s+Vwf0NET8jIbp+KxLuJGT6o02BET4IFfBsmzPVQPjnpDvdWO8tY68ktYPL8LzjJu+ 4HQXaEVJUkPOCnuuu/sCbisaJcdwqJkh5Cv0W9CmfJM1FV2DntOGTO6BEs1RAkB5kz JBJ5Z2Idz25qdwe5hnG3qsigbIVW3FmDDnb25gmfb+TdPxXgpGhbbDZ+PMdhZZ9Ts+ xmbv+oTd5cAv0tow+RJ2RKHTEeK5r3bKuuB5VIWkuRxl69lMwSAZM4knKHjVjRyub8 3FpdUG4/uRE1A== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 04 Jan 2024 15:08:24 +0100 X-ME-IP: 92.140.202.140 Message-ID: <5a8463c6-1390-4a53-8373-5b9549e79070@wanadoo.fr> Date: Thu, 4 Jan 2024 15:08:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] drm/panel: ltk050h3146w: use dev_err_probe wherever possible Content-Language: fr To: Quentin Schulz , Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Quentin Schulz References: <20240104-ltk-dev_err_probe-v1-0-8ef3c0b585d8@theobroma-systems.com> <20240104-ltk-dev_err_probe-v1-2-8ef3c0b585d8@theobroma-systems.com> From: Christophe JAILLET In-Reply-To: <20240104-ltk-dev_err_probe-v1-2-8ef3c0b585d8@theobroma-systems.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 04/01/2024 à 13:41, Quentin Schulz a écrit : > From: Quentin Schulz > > This is only a cosmetic change. > > This replaces a hand-crafted EPROBE_DEFER handling for deciding to print > an error message with dev_err_probe. > > A side-effect is that dev_err_probe also adds a debug message when it's > not EPROBE_DEFER, but this is seen as an improvement. > > Cc: Quentin Schulz > Signed-off-by: Quentin Schulz Reviewed-by: Christophe JAILLET > --- > drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 17 +++++------------ > 1 file changed, 5 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c > index ecfa4181c4fd9..9d87cc1a357e3 100644 > --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c > +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c > @@ -650,20 +650,13 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi) > return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "cannot get reset gpio\n"); > > ctx->vci = devm_regulator_get(dev, "vci"); > - if (IS_ERR(ctx->vci)) { > - ret = PTR_ERR(ctx->vci); > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "Failed to request vci regulator: %d\n", ret); > - return ret; > - } > + if (IS_ERR(ctx->vci)) > + return dev_err_probe(dev, PTR_ERR(ctx->vci), "Failed to request vci regulator\n"); > > ctx->iovcc = devm_regulator_get(dev, "iovcc"); > - if (IS_ERR(ctx->iovcc)) { > - ret = PTR_ERR(ctx->iovcc); > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "Failed to request iovcc regulator: %d\n", ret); > - return ret; > - } > + if (IS_ERR(ctx->iovcc)) > + return dev_err_probe(dev, PTR_ERR(ctx->iovcc), > + "Failed to request iovcc regulator\n"); > > mipi_dsi_set_drvdata(dsi, ctx); > >