From patchwork Fri Mar 3 18:54:15 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: 13159426 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 7CADFC7EE2D for ; Fri, 3 Mar 2023 19:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tvHLIIdh6FVfD4Sx8UFS2W+AeOBcGoBcEXGT9cJMIFE=; b=fyfWOLUVakivKc oIbKkCzhlQWI6qjSaxbiqHFL62YzBn05+ZasdrcW3TCkhQRebz9G8WqIijW8CgNDJml+qABnQKHb6 IWKlThjJEV0B4GPM+1688xkXIA3qNcCmPCsv3HicbfsMQwb2bXg96qQUUzKKQarPV3+ZcoVDsQ5Wc jTfIi27584MXHE5hzMxIih4Qzhfu4jv3xOkStIdaGFS+qTyKoDKAODJ77v92bDSnxReqvLTnDagtP Ko2fQ+HtXr4nUY9BFAl4VnZrXkz6lwAIVw44UpPHuMvnRe5NFWxTt0DQc1HVS6n46U9QQKxPV4iay Lvi83Tt59JA6ni570z3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYAdy-007Fhs-HV; Fri, 03 Mar 2023 19:00:38 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pYAYz-007CzR-JU for linux-riscv@lists.infradead.org; Fri, 03 Mar 2023 18:55:31 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYAYY-0006AS-EQ; Fri, 03 Mar 2023 19:55:02 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pYAYT-001cTO-L9; Fri, 03 Mar 2023 19:54:57 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pYAYS-001ujd-Vg; Fri, 03 Mar 2023 19:54:56 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thierry Reding , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Florian Fainelli , Benson Leung , Shawn Guo , Sascha Hauer , Vladimir Zapolskiy , Matthias Brugger , Heiko Stuebner , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Orson Zhai , Baolin Wang , Chunyan Zhang , Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Jonathan Hunter , Sean Anderson , Michal Simek Cc: kernel@pengutronix.de, linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Broadcom internal kernel review list , linux-rpi-kernel@lists.infradead.org, Guenter Roeck , chrome-platform@lists.linux.dev, Fabio Estevam , NXP Linux Team , AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, Alim Akhtar , linux-samsung-soc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org Subject: [PATCH 00/30] pwm: Convert to platform remove callback returning void Date: Fri, 3 Mar 2023 19:54:15 +0100 Message-Id: <20230303185445.2112695-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4518; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=0T84eVJj5zms3XJcCemeo6tbGagiWg7FsqOn9O28VD8=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkAkHgL+hOWzMEGr3pJ+k7l131cW/u0VRGYd/bj C6SJ3/IMe2JATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAJB4AAKCRDB/BR4rcrs CaChB/9690Y0j69SwC7ah25tZA8zQepQ8HC5QoKJRtoGAE18zwPCd9i6Ah2GskRAHqpYY0uNm04 Ofb+Baq5kb52LxrrBMQmedZl3aJYZWofch+1g4d/hEf9ipUk1cY0J534mp4cGBxRfPQgNmj16IF Tz/dORDGUT6OLi4ZeGBhKRuh6aZBIqkrcvRyINJxJlgmQA0q2BGM2qwLZ5OSrCnu3bmCMIkxRWw 2x28v+TFl6h7Cz/hIoA/Z/10PnlupKviCktbI5hdQj824S0rA4YCq307ujpcdKH73fHV5YQNuKp y+q2ulHmEZ8gwbJaQYr3UGERAiuKSo1A/FmH1rTX55+FSi4U 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.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230303_105529_825880_6C0CDFBD X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hello, this patch series adapts the platform drivers below drivers/pwm to use the .remove_new() callback. Compared to the traditional .remove() callback .remove_new() returns no value. This is a good thing because the driver core doesn't (and cannot) cope for errors during remove. The only effect of a non-zero return value in .remove() is that the driver core emits a warning. The device is removed anyhow and an early return from .remove() usually yields a resource leak. By changing the remove callback to return void driver authors cannot reasonably assume any more that there is some kind of cleanup later. All drivers touched here returned zero unconditionally in their remove callback, so they could all be converted trivially to .remove_new(). Note that this series depends on commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") that is already in Linus' tree but not yet included in a tagged version. Best regards Uwe Uwe Kleine-König (30): pwm: atmel-hlcdc: Convert to platform remove callback returning void pwm: atmel-tcb: Convert to platform remove callback returning void pwm: atmel: Convert to platform remove callback returning void pwm: bcm-iproc: Convert to platform remove callback returning void pwm: bcm2835: Convert to platform remove callback returning void pwm: berlin: Convert to platform remove callback returning void pwm: brcmstb: Convert to platform remove callback returning void pwm: clk: Convert to platform remove callback returning void pwm: cros-ec: Convert to platform remove callback returning void pwm: hibvt: Convert to platform remove callback returning void pwm: img: Convert to platform remove callback returning void pwm: imx-tpm: Convert to platform remove callback returning void pwm: lpc18xx-sct: Convert to platform remove callback returning void pwm: lpss-platform: Convert to platform remove callback returning void pwm: mtk-disp: Convert to platform remove callback returning void pwm: omap-dmtimer: Convert to platform remove callback returning void pwm: rcar: Convert to platform remove callback returning void pwm: rockchip: Convert to platform remove callback returning void pwm: samsung: Convert to platform remove callback returning void pwm: sifive: Convert to platform remove callback returning void pwm: spear: Convert to platform remove callback returning void pwm: sprd: Convert to platform remove callback returning void pwm: sti: Convert to platform remove callback returning void pwm: stm32: Convert to platform remove callback returning void pwm: sun4i: Convert to platform remove callback returning void pwm: tegra: Convert to platform remove callback returning void pwm: tiecap: Convert to platform remove callback returning void pwm: tiehrpwm: Convert to platform remove callback returning void pwm: vt8500: Convert to platform remove callback returning void pwm: xilinx: Convert to platform remove callback returning void drivers/pwm/pwm-atmel-hlcdc.c | 6 ++---- drivers/pwm/pwm-atmel-tcb.c | 6 ++---- drivers/pwm/pwm-atmel.c | 6 ++---- drivers/pwm/pwm-bcm-iproc.c | 6 ++---- drivers/pwm/pwm-bcm2835.c | 6 ++---- drivers/pwm/pwm-berlin.c | 6 ++---- drivers/pwm/pwm-brcmstb.c | 6 ++---- drivers/pwm/pwm-clk.c | 6 ++---- drivers/pwm/pwm-cros-ec.c | 6 ++---- drivers/pwm/pwm-hibvt.c | 6 ++---- drivers/pwm/pwm-img.c | 6 ++---- drivers/pwm/pwm-imx-tpm.c | 6 ++---- drivers/pwm/pwm-lpc18xx-sct.c | 6 ++---- drivers/pwm/pwm-lpss-platform.c | 5 ++--- drivers/pwm/pwm-mtk-disp.c | 6 ++---- drivers/pwm/pwm-omap-dmtimer.c | 6 ++---- drivers/pwm/pwm-rcar.c | 6 ++---- drivers/pwm/pwm-rockchip.c | 6 ++---- drivers/pwm/pwm-samsung.c | 6 ++---- drivers/pwm/pwm-sifive.c | 6 ++---- drivers/pwm/pwm-spear.c | 6 ++---- drivers/pwm/pwm-sprd.c | 6 ++---- drivers/pwm/pwm-sti.c | 6 ++---- drivers/pwm/pwm-stm32.c | 6 ++---- drivers/pwm/pwm-sun4i.c | 6 ++---- drivers/pwm/pwm-tegra.c | 6 ++---- drivers/pwm/pwm-tiecap.c | 6 ++---- drivers/pwm/pwm-tiehrpwm.c | 6 ++---- drivers/pwm/pwm-vt8500.c | 6 ++---- drivers/pwm/pwm-xilinx.c | 5 ++--- 30 files changed, 60 insertions(+), 118 deletions(-) base-commit: 2eb29d59ddf02e39774abfb60b2030b0b7e27c1f