From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B0B86204F8B for ; Thu, 7 May 2026 14:57:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778165839; cv=none; b=L3wry05E5drO7/HNUfdb8beQeDGAwxzEVhK5BMkp513N8m3lur6Fifgyt/C3WQfM7V9PPHRybBilqbxjEx/TZdt3x3RNiJG8e/8OHznVZbHC7jYfuU/b3Mr6pSZBBd0BFFlVqdG6pk7882TZmpKRARklqiudiLkDaElqKEOLk3g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778165839; c=relaxed/simple; bh=Zj9goVZkk3uH3KcKgVT6uhDP1rHu9LmB95T0Lu/5iD4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ghY7HbevsDpOYGzP/bMCmYPpTshmqHWNwlEZWN7dHnNPEL27IuFJhQxI1+JwiH077KE9YDLlRCOq/BbL9Jl1zcm0QUqPqf+d+ZJGZHS55IkIpee360LX1RuOwIHd2BEN5bPnan8Gk3vHERnwSDYFjGVuJUp/u1UE5ijtYx0f4+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gUmfUBRK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gUmfUBRK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA878C2BCB2; Thu, 7 May 2026 14:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778165839; bh=Zj9goVZkk3uH3KcKgVT6uhDP1rHu9LmB95T0Lu/5iD4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gUmfUBRKvaW4imTXyrJQLH2gaLVPQdBnvUPHdNHVt3fJLkmOob9V5NSY1z5sMgKxj uHovTxAMxA0vNeQCFRI6GwptwZzXTZZ337ZdL3QPwrh7ceU34uPOSGj+tLtx3k1wJD cJc8E3QZzuI6ngUH45rSF+22lHvwB3PhBuInORqw9CvoAMLCgG01013Sq52y7ND2In /EbsFIBpzUG71JF22BLFoX4msEw1H/NzQXX1JY0g+0W5OZ6bQnA3TvIzrAVMKK0t8u 076ZcgzXXQifgkmr+mjqp2jhyk/1K191qS4fRf5j/PMgtsJOgu2yrNK2hnTxQPVucq h/NKw0kTbhh7Q== Date: Thu, 7 May 2026 16:57:16 +0200 From: Maxime Ripard To: Albert Esteve Cc: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Michael Tretter , Michael Walle , Dario Binacchi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/10] drm/panel: Make drm_panel_init() static Message-ID: <20260507-premium-curious-macaw-d43cbe@houat> References: <20260507-drm_panel_init_rm-v1-0-51f448c7c291@redhat.com> <20260507-drm_panel_init_rm-v1-10-51f448c7c291@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="3la7iaptlro7xr2g" Content-Disposition: inline In-Reply-To: <20260507-drm_panel_init_rm-v1-10-51f448c7c291@redhat.com> --3la7iaptlro7xr2g Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 10/10] drm/panel: Make drm_panel_init() static MIME-Version: 1.0 Hi, On Thu, May 07, 2026 at 01:53:08PM +0200, Albert Esteve wrote: > Now that all panel drivers use devm_drm_panel_alloc(), > there are no external callers of drm_panel_init(). > Make it static to prevent new users from bypassing the > refcounted allocation path. >=20 > Remove stale references to drm_panel_init() in kdocs. >=20 > Signed-off-by: Albert Esteve > --- > drivers/gpu/drm/display/drm_dp_helper.c | 2 +- > drivers/gpu/drm/drm_panel.c | 8 ++++---- > include/drm/drm_panel.h | 4 ---- > 3 files changed, 5 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/di= splay/drm_dp_helper.c > index a697cc227e289..380ebf0fad2be 100644 > --- a/drivers/gpu/drm/display/drm_dp_helper.c > +++ b/drivers/gpu/drm/display/drm_dp_helper.c > @@ -4626,7 +4626,7 @@ static const struct backlight_ops dp_aux_bl_ops =3D= { > * Backlight will then be handled transparently without requiring > * any intervention from the driver. > * > - * drm_panel_dp_aux_backlight() must be called after the call to drm_pan= el_init(). > + * drm_panel_dp_aux_backlight() must be called after devm_drm_panel_allo= c(). > * > * Return: 0 on success or a negative error code on failure. > */ > diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c > index d1e6598ea3bc0..e3e1c5ceb8ff8 100644 > --- a/drivers/gpu/drm/drm_panel.c > +++ b/drivers/gpu/drm/drm_panel.c > @@ -56,8 +56,9 @@ static LIST_HEAD(panel_list); > * Initialize the panel structure for subsequent registration with > * drm_panel_add(). > */ > -void drm_panel_init(struct drm_panel *panel, struct device *dev, > - const struct drm_panel_funcs *funcs, int connector_type) > +static void drm_panel_init(struct drm_panel *panel, struct device *dev, > + const struct drm_panel_funcs *funcs, > + int connector_type) > { > if (connector_type =3D=3D DRM_MODE_CONNECTOR_Unknown) > DRM_WARN("%s: %s: a valid connector type is required!\n", __func__, de= v_name(dev)); > @@ -69,7 +70,6 @@ void drm_panel_init(struct drm_panel *panel, struct dev= ice *dev, > panel->funcs =3D funcs; > panel->connector_type =3D connector_type; > } > -EXPORT_SYMBOL(drm_panel_init); > =20 > /** > * drm_panel_add - add a panel to the global registry > @@ -708,7 +708,7 @@ EXPORT_SYMBOL(devm_drm_panel_add_follower); > * A typical implementation for a panel driver supporting device tree > * will call this function at probe time. Backlight will then be handled > * transparently without requiring any intervention from the driver. > - * drm_panel_of_backlight() must be called after the call to drm_panel_i= nit(). > + * drm_panel_of_backlight() must be called after devm_drm_panel_alloc(). I think we can drop that sentence entirely. Now that we can only get a panel structure through devm_drm_panel_alloc, and that it also initializes it, we can't call drm_panel_of_backlight before having an initialized drm_panel. Maxime --3la7iaptlro7xr2g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCafyoSwAKCRAnX84Zoj2+ dvSIAX9U56ZHrDNtQnIQRYt3f8eEAzO6UVKoMIMDAm/gvUcNk3EafoLUQP8NeQYj 3So15UcBf19f/KH9ZAWRXGI3flN+olcDyE73XIJKV2mZSsLQ5Al7XAzy/81rBJV/ C7t3214oFg== =jEIC -----END PGP SIGNATURE----- --3la7iaptlro7xr2g--