From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6247ECA5FAC for ; Tue, 29 Sep 2026 21:27:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:To:Cc :Subject:From:Message-Id:Date:Content-Type:Content-Transfer-Encoding: Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tyCWPKcs7/u/awFV7vdEON0Q6Y8m/fWoaG5L+nCraDc=; b=gdR1JkSBKf7fXtx69XuuBVqkXK ysgJhxsS99IiEqqKFhR/coNJWnRzjPXKYEQKNoiW6dms/vWv/IbB3V2zp39bNH1HpR8u1lXnLKGKQ vscIKwnZSsEw2SbDONykHC4tgtAARvOpDcBQw3+ogmsG2mvGzjzPRy+5LesxG1pWCKoLchzkrXsrz OqBZniAFKTli3r5PqX09R7ZrMJ8BDY8CB7TjqyTbEv352/LksagFkK2BHHaXSfLmFACG9ZdsV7TYz y5hvCfeDuIRBIhS/donz6/G6BXVTcDcPtHnGMA9w2to92oTe8H1uSmDC/VtN/9eYHOBO1DYUoHkfs vMO2EZOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBfM0-00000004ahQ-18j0; Tue, 29 Sep 2026 21:27:12 +0000 Received: from smtpout-03.galae.net ([185.246.85.4]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBfLx-00000004agz-01uy for linux-arm-kernel@lists.infradead.org; Tue, 29 Sep 2026 21:27:11 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 9F2604E410BD; Tue, 29 Sep 2026 21:27:05 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 527F9601BD; Tue, 29 Sep 2026 21:27:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 42A3E103295D5; Tue, 29 Sep 2026 23:26:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790717218; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=tyCWPKcs7/u/awFV7vdEON0Q6Y8m/fWoaG5L+nCraDc=; b=hEDAHwYakn5fRG4BUqIJO2Nc30p4PMlNz2fj/hv9u5oIYxFTNITCpy13PVRNtyY3TfIP4D k7jJU1roWG08YKb+1I8DM4KpYXcjGdkvBVVnmNFMn5+EBn9jC6Uh0jXXV5PKV+GhHpJQsT S9iWGlmrD0ZOKOKCkpyyRoR7Ao382WBj9MX7dbQoYWZHjooOEl+IQvBYTAOTixSWzsHJc9 e5d+9lXIl5FrPOnUx1GVztDB5fjD4JBjpieZrAZa/M4aJuOhVPcFY0tDHEAl5pfc5S6c9p WxdZmPtYu1kfOZIBzqMvqblrCge95WF2E0SmMoPMsQqDkPM0SRajhSjVeMKaHg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 29 Sep 2026 23:26:43 +0200 Message-Id: From: "Luca Ceresoli" Subject: Re: [PATCH v2 2/7] drm: verisilicon: stop using deprecated devm_drm_of_get_bridge() Cc: "Arnd Bergmann" , "Doug Anderson" , "Hui Pu" , "Ian Ray" , "Thomas Petazzoni" , , , , , , "kernel test robot" To: "Icenowy Zheng" , "Luca Ceresoli" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Frank Li" , "Sascha Hauer" , "Pengutronix Kernel Team" , "Fabio Estevam" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Dave Stevenson" , =?utf-8?q?Ma=C3=ADra_Canal?= , "Raspberry Pi Kernel Maintenance" , "Geert Uytterhoeven" X-Mailer: aerc 0.22.0 References: <20260929-drm-fix-of_get_bridge-build-regression-v2-0-6da431d8f180@bootlin.com> <20260929-drm-fix-of_get_bridge-build-regression-v2-2-6da431d8f180@bootlin.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260929_142709_193845_BB35EBA6 X-CRM114-Status: GOOD ( 17.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, On Tue Sep 29, 2026 at 4:42 PM CEST, Icenowy Zheng wrote: > =E5=9C=A8 2026-09-29=E4=BA=8C=E7=9A=84 15:39 +0200=EF=BC=8CLuca Ceresoli= =E5=86=99=E9=81=93=EF=BC=9A >> devm_drm_of_get_bridge() is deprecated, switch to >> of_drm_get_bridge_by_endpoint(). As of_drm_get_bridge_by_endpoint() >> returns >> a refcounted bridge, ensure it is put by using bridge.next_bridge. >> >> Fixes build failure when CONFIG_OF is disabled. >> >> Fixes: aa8a8c7e4641 ("drm/bridge: panel: move all code to >> drm_panel.c") >> Reported-by: Arnd Bergmann >> Closes: >> https://lore.kernel.org/r/20260928161605.2271412-1-arnd@kernel.org >> Reported-by: kernel test robot >> Closes: >> https://lore.kernel.org/oe-kbuild-all/202609291109.OIsGTysr-lkp@intel.co= m/ >> Closes: >> https://lore.kernel.org/oe-kbuild-all/202609290408.BOs7sk55-lkp@intel.co= m/ >> Signed-off-by: Luca Ceresoli > > Checked the code in drm_bridge.c, and it looks like the lifetime of > next_bridge should be indirectly managed by devm when > devm_drm_bridge_alloc() successes and the next_bridge field assigned, > so the only explicit put needed here should be in the alloc failure > path. Exactly. I think vs_bridge_init() could be simplified a bit by moving the 'next =3D ...;' statement (with error management trailer) to after devm_drm_bridge_alloc. This would avoid the explicit drm_bridge_put() call added by this patch. However for this regression fix I preferred to keep the diff minimal. The cleanup mentioned above can be done later. > Reviewed-by: Icenowy Zheng Thanks for reviewing! >> Changes in v2: >> - fix bridge reference leak on attach error path > > It should be `bridge alloc error` instead of `attach error`, but I > don't know how to correct the error in the changelog, and anyway it > won't be part of the final commit. Ah, right, that's a copy-paste leftover. It's correct that it won't appear in the commit, so I won't sent a new iteration for this. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com