Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5628442pxb; Mon, 28 Mar 2022 15:11:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/4jsCzmVVYtk14U4496Nrlp5Wg4Qm0tfmKL2UHo9B6DrEDZGDhTcC43OCXJef/+2u0Z+x X-Received: by 2002:ab0:6e90:0:b0:359:ad24:37fd with SMTP id b16-20020ab06e90000000b00359ad2437fdmr11886731uav.123.1648505461427; Mon, 28 Mar 2022 15:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648505461; cv=none; d=google.com; s=arc-20160816; b=gAj8e27tbYeOnDKJLE4sJqr0MqsG2UaiyqVy5Kd2zcF5DAoFJ0WftgcuWQxQxNVboA 50IWu8U8hYERysanpWd/orCHhPIas6PPHsk+cLWy02vNq0WTQX/UqvcUBERiizXWZHnz 5J8G8vS+qmp2FlnZ4VxmhxcjTOYfwHbUj+KlVHV4BaVm9t75j1mHDnE3V9hy7uCYzXuO qnid0GsqiVrrQv8I6FcLBORk3jsBxD1gE6/rGEwNsHJGTd8ERiiy7LyWdkYE/s+60HmV 7aY/yLLffmZpur1i0S4CON2XeeinLcOk6yYHHg1Xl92jHaynFF0gLHZPZ7mpHnL2K3N7 9c3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=k900ko74APDJL4JS5btQb2Wg1Egu6wfcKSVm5IbK2EA=; b=eshBbhw9FBZZSB+D3TnTS72e/iE93N1nv4lL8N23RXN4JrXZKGytbk8nPP0vwQCWMF b2Xy2nJ8Cx+QE3lkkawioQ074s9b7i+THDRZo/aHLh7R+Bhnxn0v2k331av1LdeTo02T 97Ww20bMxpTqs0F63Sv4ebs7I91L27AbR/BAlel9+HsZd0DhTYuw3mqAFWlh7SAGDLQq RhlPnUhxZHmGyIm/LWnFGt5K92tRWGWGNeRtdbYQO3hzlYikwOzgsjusZUAav+A+eW2z kNEoQQqX8PSMReg4oyDH0ZmbjxUD4KXGOxKmpN4YTueGwgntO5RiQdil6avSeLU3epC7 2biw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rsvGCdQb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b3-20020ab05f83000000b0035314c4ee46si3359007uaj.157.2022.03.28.15.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 15:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rsvGCdQb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 196FD166E08; Mon, 28 Mar 2022 14:31:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239856AbiC1NZ7 (ORCPT + 99 others); Mon, 28 Mar 2022 09:25:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiC1NZ6 (ORCPT ); Mon, 28 Mar 2022 09:25:58 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D09554A936 for ; Mon, 28 Mar 2022 06:24:16 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id jx9so14035479pjb.5 for ; Mon, 28 Mar 2022 06:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=k900ko74APDJL4JS5btQb2Wg1Egu6wfcKSVm5IbK2EA=; b=rsvGCdQblbOi9loD5mWsZDLJ4r3zmPAD7vHlyAMcMYsegyeasWQrNaR7wJTFA7gJ12 IPDPPIfzhslRgyFkhMQmfNip/+tOL+lj9AibCS4mU2P041Dd9D4ZlxXaYr4Twm7le6rX fcdPIDgNLid+O/idfK/mojljObclRdUp9xRvehJ5EJQYjaCJCOv7kRl+HMfX6FJOEsb3 ms72DLYYSgHYnrYsizR16FwF58lkjdzll7VTkJ02YFkGq2uGnusUE500nIU07qQmhQW3 pJCY2oYVgKOD7cbBL1f40WPajZ3RObnH57ZJqoM2rJ7PcSytOSHwO1f0G0Jm7HDumEPD U9vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=k900ko74APDJL4JS5btQb2Wg1Egu6wfcKSVm5IbK2EA=; b=KoyF8iUuLy3TeJmeRK9tHqu0vpJxeyv7FUP5yq8chmHbiWwDxveGsWXDNQKPCGhyy9 J6LOhBmnRinA2vJXBwAv2Ib19AVo/QCgbfQToOZUL33s/xpz7xVBNZKxa1LzSqx2zceg zfU3Fzp8GEEaLctDb0o2xwRRFmxdoXT2SRbddBlRbgpnlSrHNfiKl7RjKqqtvisl7x6F vY64t6GoCuZtEGZcl/1Ud+HgRsECNO4Xz6UTc9Iivm42uXbUYG/WAtgQpQa6lYw1Z0Lz sV1nTcLTgVoiZD5nS5S5raTZeE+lIggWXqZnZucvhTYLO0W+mXHRUHLFC3fmxWT4HPYX fLzQ== X-Gm-Message-State: AOAM530Km0A0LrF5Ip0kGw/lUkQkgyPcM4PfIUylBpBbNQji9MyAUIK6 kdP0eeTqnF+gRzStOOE/MVryqSW5jBIE5yTtZiHE4Q== X-Received: by 2002:a17:90b:3e85:b0:1c7:7eab:2649 with SMTP id rj5-20020a17090b3e8500b001c77eab2649mr29250564pjb.232.1648473856349; Mon, 28 Mar 2022 06:24:16 -0700 (PDT) MIME-Version: 1.0 References: <20220317175852.799432-1-jose.exposito89@gmail.com> <4bd97d512e95845d7dd5a44d7713c59832676ada.camel@oss.nxp.com> In-Reply-To: <4bd97d512e95845d7dd5a44d7713c59832676ada.camel@oss.nxp.com> From: Robert Foss Date: Mon, 28 Mar 2022 15:24:05 +0200 Message-ID: Subject: Re: [PATCH v2] drm/bridge: nwl-dsi: switch to devm_drm_of_get_bridge To: Liu Ying Cc: =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , andrzej.hajda@intel.com, narmstrong@baylibre.com, laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, p.zabel@pengutronix.de, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Mar 2022 at 10:25, Liu Ying wrote: > > On Thu, 2022-03-17 at 18:58 +0100, Jos=C3=A9 Exp=C3=B3sito wrote: > > The function "drm_of_find_panel_or_bridge" has been deprecated in > > favor of "devm_drm_of_get_bridge". > > > > Switch to the new function and reduce boilerplate. > > > > Signed-off-by: Jos=C3=A9 Exp=C3=B3sito > > > > --- > > > > v2: (Thanks to Liu Ying) > > > > - Rebase on top of drm-misc-next > > - Remove drm_of_panel_bridge_remove > > --- > > drivers/gpu/drm/bridge/nwl-dsi.c | 23 ++++------------------- > > 1 file changed, 4 insertions(+), 19 deletions(-) > > > > diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c > > b/drivers/gpu/drm/bridge/nwl-dsi.c > > index e34fb09b90b9..de62e3fc6a59 100644 > > --- a/drivers/gpu/drm/bridge/nwl-dsi.c > > +++ b/drivers/gpu/drm/bridge/nwl-dsi.c > > @@ -912,19 +912,11 @@ static int nwl_dsi_bridge_attach(struct > > drm_bridge *bridge, > > { > > struct nwl_dsi *dsi =3D bridge_to_dsi(bridge); > > struct drm_bridge *panel_bridge; > > - struct drm_panel *panel; > > - int ret; > > - > > - ret =3D drm_of_find_panel_or_bridge(dsi->dev->of_node, 1, 0, > > &panel, > > - &panel_bridge); > > - if (ret) > > - return ret; > > > > - if (panel) { > > - panel_bridge =3D drm_panel_bridge_add(panel); > > - if (IS_ERR(panel_bridge)) > > - return PTR_ERR(panel_bridge); > > - } > > + panel_bridge =3D devm_drm_of_get_bridge(dsi->dev, dsi->dev- > > >of_node, > > + 1, 0); > > + if (IS_ERR(panel_bridge)) > > + return PTR_ERR(panel_bridge); > > > > if (!panel_bridge) > > return -EPROBE_DEFER; > > I don't think panel_bridge can be NULL here, so this check can be > removed. However, even if this patch is not applied, the check is not > necessary. I think it can be removed with a separate patch. Jos=C3=A9, do you mind clearing up if this check is needed, and then spinning a v3 removing this snippet if it is needed? Rob.