From patchwork Fri Nov 10 15:29:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13452483 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 18E011CA81 for ; Fri, 10 Nov 2023 15:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A4913AE39 for ; Fri, 10 Nov 2023 07:32:59 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r1TT8-00065R-WB; Fri, 10 Nov 2023 16:30:51 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r1TSy-0083Ie-0c; Fri, 10 Nov 2023 16:30:40 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1r1TSx-00Gnuj-JI; Fri, 10 Nov 2023 16:30:39 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman , Jiri Slaby , Tony Lindgren , Alexander Shiyan Cc: John Ogness , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Thomas Richard , Arnd Bergmann , Thomas Gleixner , kernel@pengutronix.de, linux-serial@vger.kernel.org, Richard GENOUD , Christophe JAILLET , Yangtao Li , Joel Stanley , Andrew Jeffery , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Al Cooper , Andy Shevchenko , Paul Cercueil , Vladimir Zapolskiy , Matthias Brugger , AngeloGioacchino Del Regno , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Petr Mladek , Biju Das , Johan Hovold , Chen-Yu Tsai , Andi Shyti , Rob Herring , Geert Uytterhoeven , =?utf-8?q?Duje_Mihanovi=C4=87?= , "Rafael J. Wysocki" , Jacob Keller , linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-rpi-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, Tobias Klauser , Russell King , Lino Sanfilippo , Jiamei Xie , Hongyu Xie , delisun , Fabio Estevam , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Arend van Spriel , "Maciej W. Rozycki" , Christophe Leroy , Baruch Siach , Thierry Reding , Max Filippov , Zhang Shurong , Sherry Sun , Shenwei Wang , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , Sergey Organov , Tom Rix , Martin Fuzzey , Bernhard Seibold , Karol Gugala , Mateusz Holenko , Gabriel Somlo , Jacky Huang , Shan-Chun Hung , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Dmitry Rokosov , Lucas Tanure , Pavel Krasavin , linux-amlogic@lists.infradead.org, Taichi Sugaya , Takao Orito , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , linux-actions@lists.infradead.org, Yuan Can , linux-unisoc@lists.infradead.org, Krzysztof Kozlowski , Alim Akhtar , linux-samsung-soc@vger.kernel.org, Laxman Dewangan , Geert Uytterhoeven , Palmer Dabbelt , Paul Walmsley , Ben Dooks , Nick Hu , Samuel Holland , Ruan Jinjie , linux-riscv@lists.infradead.org, Orson Zhai , Baolin Wang , Chunyan Zhang , Patrice Chotard , Maxime Coquelin , Alexandre Torgue , Valentin Caron , Marek Vasut , Sebastian Andrzej Siewior , Erwan Le Ray , linux-stm32@st-md-mailman.stormreply.com, "David S. Miller" , sparclinux@vger.kernel.org, Hammer Hsieh , Peter Korsgaard , Timur Tabi , linuxppc-dev@lists.ozlabs.org, Michal Simek , Julien Malik Subject: [PATCH 00/52] serial: Convert to platform remove callback returning void Date: Fri, 10 Nov 2023 16:29:28 +0100 Message-ID: <20231110152927.70601-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0.586.gbc5204569f7d.dirty Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=8575; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=uSjGK//3oFZ52v8CbMudZ2zWDpIf+rV/Bz06fMr6GWo=; b=owGbwMvMwMXY3/A7olbonx/jabUkhlQ/nwgpw9SOtCV6v+pmM2qvy30b4Lq49LLWF9d7/DeVZ WUfT6vrZDRmYWDkYpAVU2Sxb1yTaVUlF9m59t9lmEGsTCBTGLg4BWAit63Y/3DeWbXNbsaN6owD v7zeKjbpJWlH1DLLuAtpXzizckMmx203llrb1/+nvTIsPrdq+5X595O9r7k579Bw9+82qJzub57 xYRLnlnOf3z5I0jkjI3+hnSlh3u7CZtWj17OsTwtF9Zh1VPec575QJnDf2cNMZ92auiNbfa0U1I K4NMS4nGKWL9M2r8plO87j5ygYa/6+RbEk4fm2VxMXr107Q7gswU3y947dArnBDXHf36sIsmiEc f/g4GZMEG/dF80S1BrAt/VW0ITwlZUaT7adCHP/6ih/oXzv47Wsk5b57sm0tYvXmXys/bGln80K A/VHR2RlH3V3/5h2e8W6Lbt3hnOZavQfU+68c0/+U304AA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-msm@vger.kernel.org Hello, this series starts with two fixes. The first one fixes a resource leak and use after free. The second only improves error reporting. I added a Fixes: marker to these. I let you decide if you want to drop them (or the second only) or add a Cc: stable (to both or only the first one). After that all drivers below drivers/tty/serial are converted to struct platform_driver::remove_new. See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. The TL;DR; is to prevent bugs like the two fixed here. After these two fixes all conversations are trivial, because all .remove() callbacks returned zero unconditionally. The conversion patches are merge window material. The two fixes might go in also before v6.7, but given the fixed problems are already old (v6.1-rc6 + v3.10-rc1) there is probably no urge. Best regards Uwe Uwe Kleine-König (52): serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed serial: sccnxp: Improve error message if regulator_disable() fails serial: 8250: Convert to platform remove callback returning void serial: altera_jtaguart: Convert to platform remove callback returning void serial: altera: Convert to platform remove callback returning void serial: amba-pl011: Convert to platform remove callback returning void serial: ar933x: Convert to platform remove callback returning void serial: atmel: Convert to platform remove callback returning void serial: bcm63xx: Convert to platform remove callback returning void serial: clps711x: Convert to platform remove callback returning void serial: cpm: Convert to platform remove callback returning void serial: digicolor: Convert to platform remove callback returning void serial: esp32_acm: Convert to platform remove callback returning void serial: esp32: Convert to platform remove callback returning void serial: fsl_linflexuart: Convert to platform remove callback returning void serial: fsl_lpuart: Convert to platform remove callback returning void serial: imx: Convert to platform remove callback returning void serial: lantiq: Convert to platform remove callback returning void serial: liteuart: Convert to platform remove callback returning void serial: lpc32xx_hs: Convert to platform remove callback returning void serial: ma35d1: Convert to platform remove callback returning void serial: mcf: Convert to platform remove callback returning void serial: meson: Convert to platform remove callback returning void serial: milbeaut_usio: Convert to platform remove callback returning void serial: mpc52xx: Convert to platform remove callback returning void serial: msm: Convert to platform remove callback returning void serial: mxs-auart: Convert to platform remove callback returning void serial: omap: Convert to platform remove callback returning void serial: owl: Convert to platform remove callback returning void serial: pic32: Convert to platform remove callback returning void serial: qcom_geni: Convert to platform remove callback returning void serial: rda: Convert to platform remove callback returning void serial: sa1100: Convert to platform remove callback returning void serial: samsung: Convert to platform remove callback returning void serial: sccnxp: Convert to platform remove callback returning void serial: tegra: Convert to platform remove callback returning void serial: txx9: Convert to platform remove callback returning void serial: sh-sci: Convert to platform remove callback returning void serial: sifive: Convert to platform remove callback returning void serial: sprd: Convert to platform remove callback returning void serial: st-asc: Convert to platform remove callback returning void serial: stm32: Convert to platform remove callback returning void serial: sunhv: Convert to platform remove callback returning void serial: sunplus: Convert to platform remove callback returning void serial: sunsab: Convert to platform remove callback returning void serial: sunsu: Convert to platform remove callback returning void serial: sunzilog: Convert to platform remove callback returning void serial: tegra-tcu: Convert to platform remove callback returning void serial: timbuart: Convert to platform remove callback returning void serial: uartlite: Convert to platform remove callback returning void serial: ucc: Convert to platform remove callback returning void serial: xilinx_uartps: Convert to platform remove callback returning void drivers/tty/serial/8250/8250_aspeed_vuart.c | 6 ++---- drivers/tty/serial/8250/8250_bcm2835aux.c | 6 ++---- drivers/tty/serial/8250/8250_bcm7271.c | 5 ++--- drivers/tty/serial/8250/8250_core.c | 5 ++--- drivers/tty/serial/8250/8250_dw.c | 6 ++---- drivers/tty/serial/8250/8250_em.c | 5 ++--- drivers/tty/serial/8250/8250_fsl.c | 5 ++--- drivers/tty/serial/8250/8250_ingenic.c | 5 ++--- drivers/tty/serial/8250/8250_ioc3.c | 5 ++--- drivers/tty/serial/8250/8250_lpc18xx.c | 6 ++---- drivers/tty/serial/8250/8250_mtk.c | 6 ++---- drivers/tty/serial/8250/8250_of.c | 5 ++--- drivers/tty/serial/8250/8250_omap.c | 7 +++---- drivers/tty/serial/8250/8250_pxa.c | 6 ++---- drivers/tty/serial/8250/8250_tegra.c | 6 ++---- drivers/tty/serial/8250/8250_uniphier.c | 6 ++---- drivers/tty/serial/altera_jtaguart.c | 6 ++---- drivers/tty/serial/altera_uart.c | 6 ++---- drivers/tty/serial/amba-pl011.c | 5 ++--- drivers/tty/serial/ar933x_uart.c | 6 ++---- drivers/tty/serial/atmel_serial.c | 6 ++---- drivers/tty/serial/bcm63xx_uart.c | 5 ++--- drivers/tty/serial/clps711x.c | 6 ++---- drivers/tty/serial/cpm_uart.c | 6 ++---- drivers/tty/serial/digicolor-usart.c | 6 ++---- drivers/tty/serial/esp32_acm.c | 5 ++--- drivers/tty/serial/esp32_uart.c | 6 ++---- drivers/tty/serial/fsl_linflexuart.c | 6 ++---- drivers/tty/serial/fsl_lpuart.c | 5 ++--- drivers/tty/serial/imx.c | 6 ++---- drivers/tty/serial/lantiq.c | 6 ++---- drivers/tty/serial/liteuart.c | 6 ++---- drivers/tty/serial/lpc32xx_hs.c | 6 ++---- drivers/tty/serial/ma35d1_serial.c | 5 ++--- drivers/tty/serial/mcf.c | 6 ++---- drivers/tty/serial/meson_uart.c | 8 +++----- drivers/tty/serial/milbeaut_usio.c | 6 ++---- drivers/tty/serial/mpc52xx_uart.c | 7 ++----- drivers/tty/serial/msm_serial.c | 6 ++---- drivers/tty/serial/mxs-auart.c | 6 ++---- drivers/tty/serial/omap-serial.c | 6 ++---- drivers/tty/serial/owl-uart.c | 6 ++---- drivers/tty/serial/pic32_uart.c | 7 ++----- drivers/tty/serial/qcom_geni_serial.c | 6 ++---- drivers/tty/serial/rda-uart.c | 6 ++---- drivers/tty/serial/sa1100.c | 6 ++---- drivers/tty/serial/samsung_tty.c | 6 ++---- drivers/tty/serial/sccnxp.c | 13 +++++++------ drivers/tty/serial/serial-tegra.c | 5 ++--- drivers/tty/serial/serial_txx9.c | 5 ++--- drivers/tty/serial/sh-sci.c | 6 ++---- drivers/tty/serial/sifive.c | 6 ++---- drivers/tty/serial/sprd_serial.c | 6 ++---- drivers/tty/serial/st-asc.c | 6 ++---- drivers/tty/serial/stm32-usart.c | 6 ++---- drivers/tty/serial/sunhv.c | 6 ++---- drivers/tty/serial/sunplus-uart.c | 6 ++---- drivers/tty/serial/sunsab.c | 6 ++---- drivers/tty/serial/sunsu.c | 6 ++---- drivers/tty/serial/sunzilog.c | 6 ++---- drivers/tty/serial/tegra-tcu.c | 6 ++---- drivers/tty/serial/timbuart.c | 6 ++---- drivers/tty/serial/uartlite.c | 5 ++--- drivers/tty/serial/ucc_uart.c | 6 ++---- drivers/tty/serial/xilinx_uartps.c | 5 ++--- 65 files changed, 137 insertions(+), 249 deletions(-) base-commit: 8728c14129df7a6e29188a2e737b4774fb200953