From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 3104721CA0D for ; Tue, 16 Sep 2025 13:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758028743; cv=none; b=qKFNcxXmSLZxGIJvRRBeHQJGY0EPkWGdrRwCi1z+jZ7WcjM4o5n1UtTZQDxb9h1AbSGJi/cgpueGIYEwp2NcH9JrhR/W4PLbasUOijwmh9ZfQmtxHkv7vnnoxqJxwtYOK23TvlYETRju18dk4m+D1pRul2nDMoad/HalA+3B1eM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758028743; c=relaxed/simple; bh=BkuQcbeHhp5ZKWXkLnecpeDwwZi8XUXwuZXJn+ZkKXU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cOQ90DBcZXgCF+OD9tfie61ery7KfXG5YhYjuuDzdZSkLCVe6bctI0Ni4LoRrCy3Y7TnXDPfF/NbuGNRjqeyBrn/DtKb9vMLj7mXUoF6CpoIjCbV/6W1KmK5MkNA1YqZX5NwBaaY/mK5JMw3SphvSTDOt+LsQ0cUEY07JMiylLg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=dyKVxWHh; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="dyKVxWHh" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 48D3C4E40C41; Tue, 16 Sep 2025 13:18:59 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 14D266061E; Tue, 16 Sep 2025 13:18:59 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5A876102F16EE; Tue, 16 Sep 2025 15:18:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1758028736; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=hZcaro1fx4n72AQLpyGPBESFnCpWzT17H3DCwpOtEXY=; b=dyKVxWHhl1Wixgqwi8S7OiryNCQU1TDd+uXP4raQu5n+kHknr09kNi/wdrZhP3POIhT5Xu 81QbBGI35IaD1yniNOt7joSVlo/tm+f/LaqWpO6UF1RpLv10aeyhrRX475H/5xNnrYpCen +VB04xiHy5vDEjrlsUT5I9tmgoeHf6Y9ZKmeUT9sX4Gd1uWfrXrRHCT28aO0TDPzEI+Mfb PvGwCY3x+14g42leiaLh8nb3WQwyrHkjZ+/A8SkQIMAoM00AgjIlkccIARhXCIxHS8Y0HI tmhRbqMw45zAjSTW8u3zfDp/XSVV7hhBSGn+O+SxwyIJDgOxGCNfeZIbMKg6HQ== Date: Tue, 16 Sep 2025 15:18:35 +0200 From: Luca Ceresoli To: Maxime Ripard Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Miguel Ojeda , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Tomi Valkeinen , Dmitry Baryshkov , Chaoyi Chen , Hui Pu , Thomas Petazzoni , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v2 7/9] drm/bridge: remove drm_for_each_bridge_in_chain() Message-ID: <20250916151835.0c0d2e7b@booty> In-Reply-To: <20250916-jade-seal-of-cleaning-5ee2bd@houat> References: <20250808-drm-bridge-alloc-getput-for_each_bridge-v2-0-edb6ee81edf1@bootlin.com> <20250808-drm-bridge-alloc-getput-for_each_bridge-v2-7-edb6ee81edf1@bootlin.com> <20250915-optimal-hornet-of-potency-efa54a@penduick> <20250915175805.6e8df6ef@booty> <20250916-jade-seal-of-cleaning-5ee2bd@houat> Organization: Bootlin X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 On Tue, 16 Sep 2025 11:03:41 +0200 Maxime Ripard wrote: > On Mon, Sep 15, 2025 at 05:58:05PM +0200, Luca Ceresoli wrote: > > On Mon, 15 Sep 2025 14:22:24 +0200 > > Maxime Ripard 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 > > > > --- > > > > .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. Ah, thanks, good to know! Applied, but 'b4 ty' does not behave so no automatic notification email at this time, sorry. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com