Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp18458pxb; Tue, 14 Sep 2021 17:29:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyN0lE0R8/NGyUa5TmpjH8y8wnD1+KxM+f9uVXM1QWmI7khPo7YSuNFTAwCiqRTJIEk8b1V X-Received: by 2002:a05:6e02:2194:: with SMTP id j20mr13383170ila.268.1631665766653; Tue, 14 Sep 2021 17:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631665766; cv=none; d=google.com; s=arc-20160816; b=IFEODWTORmVTN4p56LFAcx8zrKIv9/PbBrvpTfHcdqGiPoqmIjNVrzA20QgZEsxZOV zWL2ftWoXIVP1xcwT+9TgblX1hjss7nMsg1zSTCS2t33kFmwbl2UcBPeGR2vGt00doVg jTmVy6NW7/s3BoIMxSB21+GleVlPjAUVCFTl5L7gpdMrZrflLYAsKljD8BIj8s8Q11ou G+4ZGrHE9YxJVE48/VpuKqGs2EJcwQp7V8EeG8AERB5xKPn5n8U93cQiHEUXhL7mp3dQ DcHkbpMEUt0F6Ban0JuIR3nIifAshsonHeVEnScWYQZR+3ZINzqcolDF+7G+vVHKV0/y wuig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=SN0wr5T1oWZLC7OMWguWNpqj/fohCLowDltatcxEkTU=; b=XApXFAeqwEP66By5BRKoPxdqW4srrtdoplc87GIp81/c0rE0lwFAWoSKr9UT9b7Bhj MfVj1H3qp5mSwjV5aRB1nupXiJj1G9UsGil1kXo4zQFe7+mZ8WlFC538+gnfTYLoiWlZ Zf/Gimx7jB/y0mp8Cf1zYbfaYicNhhk/LM6l+vy7BssnfVmyHZCdN0UwZabnbLsp2pbA D4NcPwysQRKPunDd2zkszkOGie+fY67MCn1BAytzA4Lpi+VCiifa1WfVlwfRFI+ZTYk9 dGyGe6k0VdZiGJJWapDsncziCiW66HEJ+1+768CtvE6hsOttBnxENZIWPAV8WnXBSJAU pjhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WU2MQDEx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si11165395jao.47.2021.09.14.17.29.14; Tue, 14 Sep 2021 17:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WU2MQDEx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231496AbhIOA2f (ORCPT + 99 others); Tue, 14 Sep 2021 20:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230055AbhIOA2f (ORCPT ); Tue, 14 Sep 2021 20:28:35 -0400 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9843EC061574 for ; Tue, 14 Sep 2021 17:27:15 -0700 (PDT) Received: by mail-ot1-x332.google.com with SMTP id c19-20020a9d6153000000b0051829acbfc7so1132710otk.9 for ; Tue, 14 Sep 2021 17:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=SN0wr5T1oWZLC7OMWguWNpqj/fohCLowDltatcxEkTU=; b=WU2MQDEx3s01BJ/oFkDjBDj3qHQaODxp2KcwWPiuvwombsGYhFWuve+QFXzcGFds/f sw73fsScUZMGy0tTG7dpICNgv4/4wW4doJif8CKWZmum/kUKqgD0tDIVtvKZcehHc0si +q5/fIPImhHMcjbsb20iwZQ0ADyrlbI+trFYA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=SN0wr5T1oWZLC7OMWguWNpqj/fohCLowDltatcxEkTU=; b=GmL5DHcsRA+KyAhXGII9rfTZSpkSGiWLNk2d3wUaNd7NGSTg7HKrXUACn1tWJXErnf tAYOVBBqyqVoaiun3VeWKwyz+716pBgHEYyKC2UZNB6A3FoPsdJpjuF/CegwwL3YPrAH ry2Y5hM97mRuMvYaph8ogMuxHSr2wVmpwX3lGKsgTPg7DJxzHvoeDKWJt9eb9ZtcYBQq SPeYx+atLQccPseY80ngzUSaG0crrysn54c/BToTgTb6AK6Qg5F3PRqwxDzS9GkUkmyH 9hiwUiKERqPjGLgm73BDvqG4MxjRs/5JPxJRP4vUgubpenTyqDhCJncJ2sqe4cu2dndU cvpQ== X-Gm-Message-State: AOAM533q58kSHwIwY9tQvivjs+KEf0rttNc2117ddmXUOvQic5jruV/4 hTS0skB/ma9me54aEq2h4wWL6OmeV7f+BujdjsNFsRTAOYk= X-Received: by 2002:a05:6830:1212:: with SMTP id r18mr16496618otp.159.1631665634859; Tue, 14 Sep 2021 17:27:14 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 14 Sep 2021 17:27:14 -0700 MIME-Version: 1.0 In-Reply-To: <20210914162825.v3.1.I85e46da154e3fa570442b496a0363250fff0e44e@changeid> References: <20210914162825.v3.1.I85e46da154e3fa570442b496a0363250fff0e44e@changeid> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Tue, 14 Sep 2021 17:27:14 -0700 Message-ID: Subject: Re: [PATCH v3 1/3] drm/bridge: parade-ps8640: Improve logging at probing To: LKML , Philip Chen Cc: dianders@chromium.org, Andrzej Hajda , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Neil Armstrong , Robert Foss , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Philip Chen (2021-09-14 16:28:43) > Use dev_err_probe() to add logs for error cases at probing time. > > Signed-off-by: Philip Chen > --- > Can you use a cover-letter for more than one patch series? > (no changes since v1) > > drivers/gpu/drm/bridge/parade-ps8640.c | 22 ++++++++++++++-------- > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c > index 685e9c38b2db..e340af381e05 100644 > --- a/drivers/gpu/drm/bridge/parade-ps8640.c > +++ b/drivers/gpu/drm/bridge/parade-ps8640.c > @@ -332,8 +332,10 @@ static int ps8640_probe(struct i2c_client *client) > return -ENODEV; > > ps_bridge->panel_bridge = devm_drm_panel_bridge_add(dev, panel); > - if (IS_ERR(ps_bridge->panel_bridge)) > - return PTR_ERR(ps_bridge->panel_bridge); > + if (IS_ERR(ps_bridge->panel_bridge)) { > + return dev_err_probe(dev, PTR_ERR(ps_bridge->panel_bridge), > + "Error creating bridge device\n"); From what I can tell it never returns -EPROBE_DEFER? So this isn't useful. > + } > > ps_bridge->supplies[0].supply = "vdd33"; > ps_bridge->supplies[1].supply = "vdd12"; > @@ -344,16 +346,20 @@ static int ps8640_probe(struct i2c_client *client) > > ps_bridge->gpio_powerdown = devm_gpiod_get(&client->dev, "powerdown", > GPIOD_OUT_HIGH); > - if (IS_ERR(ps_bridge->gpio_powerdown)) > - return PTR_ERR(ps_bridge->gpio_powerdown); > + if (IS_ERR(ps_bridge->gpio_powerdown)) { > + return dev_err_probe(dev, PTR_ERR(ps_bridge->gpio_powerdown), > + "Error getting gpio_powerdown\n"); This looks ok, except we don't want braces on single statement ifs. > + } > > /* > * Assert the reset to avoid the bridge being initialized prematurely > */ > ps_bridge->gpio_reset = devm_gpiod_get(&client->dev, "reset", > GPIOD_OUT_HIGH); > - if (IS_ERR(ps_bridge->gpio_reset)) > - return PTR_ERR(ps_bridge->gpio_reset); > + if (IS_ERR(ps_bridge->gpio_reset)) { > + return dev_err_probe(dev, PTR_ERR(ps_bridge->gpio_reset), > + "Error getting gpio_reset\n"); Same. > + } > > ps_bridge->bridge.funcs = &ps8640_bridge_funcs; > ps_bridge->bridge.of_node = dev->of_node;