lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250916-jade-seal-of-cleaning-5ee2bd@houat>
Date: Tue, 16 Sep 2025 11:03:41 +0200
From: Maxime Ripard <mripard@...nel.org>
To: Luca Ceresoli <luca.ceresoli@...tlin.com>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>, 
	Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>, 
	Laurent Pinchart <Laurent.pinchart@...asonboard.com>, Jonas Karlman <jonas@...boo.se>, 
	Jernej Skrabec <jernej.skrabec@...il.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, 
	Simona Vetter <simona@...ll.ch>, Miguel Ojeda <ojeda@...nel.org>, 
	Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <nick.desaulniers+lkml@...il.com>, 
	Bill Wendling <morbo@...gle.com>, Justin Stitt <justinstitt@...gle.com>, 
	Tomi Valkeinen <tomi.valkeinen@...asonboard.com>, Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, 
	Chaoyi Chen <chaoyi.chen@...k-chips.com>, Hui Pu <Hui.Pu@...ealthcare.com>, 
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>, dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	llvm@...ts.linux.dev
Subject: Re: [PATCH v2 7/9] drm/bridge: remove drm_for_each_bridge_in_chain()

On Mon, Sep 15, 2025 at 05:58:05PM +0200, Luca Ceresoli wrote:
> On Mon, 15 Sep 2025 14:22:24 +0200
> Maxime Ripard <mripard@...nel.org> wrote:
> > On Fri, Aug 08, 2025 at 04:49:14PM +0200, Luca Ceresoli wrote:
> > > All users have been replaced by drm_for_each_bridge_in_chain_scoped().
> > > 
> > > Signed-off-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
> > > ---
> > >  .clang-format            |  1 -
> > >  include/drm/drm_bridge.h | 14 --------------
> > >  2 files changed, 15 deletions(-)
> > > 
> > > diff --git a/.clang-format b/.clang-format
> > > index 1cac7d4976644c8f083f801e98f619782c2e23cc..d5c05db1a0d96476b711b95912d2b82b2e780397 100644
> > > --- a/.clang-format
> > > +++ b/.clang-format
> > > @@ -167,7 +167,6 @@ ForEachMacros:
> > >    - 'drm_connector_for_each_possible_encoder'
> > >    - 'drm_exec_for_each_locked_object'
> > >    - 'drm_exec_for_each_locked_object_reverse'
> > > -  - 'drm_for_each_bridge_in_chain'
> > >    - 'drm_for_each_bridge_in_chain_scoped'
> > >    - 'drm_for_each_connector_iter'
> > >    - 'drm_for_each_crtc'
> > > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> > > index a8e2f599aea764c705da3582df0ca428bb32f19c..6adf9221c2d462ec8e0e4e281c97b39081b3da24 100644
> > > --- a/include/drm/drm_bridge.h
> > > +++ b/include/drm/drm_bridge.h
> > > @@ -1358,20 +1358,6 @@ drm_bridge_chain_get_first_bridge(struct drm_encoder *encoder)
> > >  						       struct drm_bridge, chain_node));
> > >  }
> > >  
> > > -/**
> > > - * drm_for_each_bridge_in_chain() - Iterate over all bridges present in a chain
> > > - * @encoder: the encoder to iterate bridges on
> > > - * @bridge: a bridge pointer updated to point to the current bridge at each
> > > - *	    iteration
> > > - *
> > > - * Iterate over all bridges present in the bridge chain attached to @encoder.
> > > - *
> > > - * This is deprecated, do not use!
> > > - * New drivers shall use drm_for_each_bridge_in_chain_scoped().
> > > - */
> > > -#define drm_for_each_bridge_in_chain(encoder, bridge)			\
> > > -	list_for_each_entry(bridge, &(encoder)->bridge_chain, chain_node)
> > > -  
> > 
> > I think I'd go a step further and rename
> > drm_for_each_bridge_in_chain_scoped to drm_for_each_bridge_in_chain,
> > there's no need to have a "scoped" variant if it's our only variant.
> > 
> > It can be done in a subsequent patch though.
> 
> Sure, that's the plan. There's a note in patch 3:
> 
> Note 1: drm_for_each_bridge_in_chain_scoped() could be renamed removing the
>         _scoped suffix after removing all the users of the current macro
>         and eventually the current macro itself. Even though this series is
>         converting all users, I'd at least wait one kernel release before
>         renaming, to minimize issues with existing patches which would fail
>         building.

No need to wait that long, and the best time to do it is right now
actually, about the time we start collecting the patches for a new
release.

Maxime

Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ