From patchwork Sat Nov 4 21:15:02 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: 13445600 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 71BFDC4332F for ; Sat, 4 Nov 2023 21:16:05 +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:Content-Transfer-Encoding: Content-Type: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=6M0D9BQ+lOg0p5KgeoB2Jl9hOTGWoaB4HcAGLuCtQrs=; b=gyOpRR++jgPJCMAAGZDHc5LsX+ WDwKu6iHfzVDJt7gKBtSf/U7cuU/5nq+Z06p92Ez3q6PTMYgmkaGD9NXkALBd17cQFdvWgE8BhXkF jwn2+0/NhINdQbH9aQl2bwwcshWlYAcrsZKT/GJZrUqItDsKbZLPtb0GXw3eZn9xZmXv+y1MTrokr FVsTHLqXETtJkX9MxZd10wIZLoL/ptsIO35wfTzTkYK2NDk9FQEhywf3pn4twlDUsqitioxuqNdQM BreQEhYe7sBArXekxqf1tYqV9C9AiuVdwaBzuduV3HXqGRB2pPReORmbNLdpgQDR86fUfCGUlER1k gAqBy2cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qzNzw-00E2M6-0g; Sat, 04 Nov 2023 21:16:04 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qzNzr-00E2JV-1T for linux-mediatek@lists.infradead.org; Sat, 04 Nov 2023 21:16:00 +0000 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 1qzNza-0007wk-IH; Sat, 04 Nov 2023 22:15:42 +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 1qzNzX-006e11-N8; Sat, 04 Nov 2023 22:15:39 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qzNzX-00D1ak-Dc; Sat, 04 Nov 2023 22:15:39 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Sebastian Reichel Cc: Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-kbuild@vger.kernel.org, Manivannan Sadhasivam , Cristian Ciocaltea , linux-actions@lists.infradead.org, Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org Subject: [PATCH 00/14] power: reset: Drop platform_driver_probe() and convert to platform remove callback returning void Date: Sat, 4 Nov 2023 22:15:02 +0100 Message-ID: <20231104211501.3676352-16-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3239; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=ASJpJ0PbRdt9ZtFZlOFmy3zBFQUV+f7OBE5g1UcY3qM=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlRrRW2nlD3Bq26a3P3sYG5qAEG5GwUfm6B9YOc 7QqQI7xub+JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZUa0VgAKCRCPgPtYfRL+ Ts6VB/9MYH4OE9JZxwtQ11ZFXv37CHQWuj2H7yDF2BNpbvz84sSUIBsB2cZ/P7qmXPmDGGnN9YH R/at02fE+3cIvpTPFySkqRu+sErOGGxzGIlcb+TY3IMtSpAfGsw19fH6vdOUiwweAAvFp6haRF6 ftt1EHSNdOTPHV3DMCX7XsfCW9JAuhaaDbXEoJwMB6JjqA4o/DJrEI+JANq5W/hKFvSY1C0Z0AT Q/XMroNdUYtHirVUJ7JqurjHCeYLVWXlHLSuEtyLMq6g+zpQOWbPuUdBP/iRLJx8dDd4b/IRuEa 5YUGw7TsAGg7bR/dIxQ3GGTak4rbbahwjrJV9xcC40W0gL7Q 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-mediatek@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231104_141559_500761_CFFF4C6F X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hello, there are two different types of patches here that would justify to different series. But as the patches are not independant I chose to put them in a single series. The first three patches drop usage of platform_driver_probe(). This is a concept that isn't so relevant any more today. I didn't check, but it saves typically only a few 100k and there are thoughts to deprecate it to simplify the core. Getting the usage right is not trivial though the at91 drivers got it nearly right. The alternative to these patches is to add __ref to the driver struct ideally with a comment describing the need like is e.g. done in commit 5b44abbc39ca ("platform/x86: hp-wmi:: Mark driver struct with __refdata to prevent section mismatch warning"). The remaining patches convert the platform drivers to .remove_new(), see commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. All conversions but one are trivial as the remove functions return zero unconditionally. The only exception is the tps65086-restart driver. Best regards Uwe Uwe Kleine-König (14): power: reset: at91-poweroff: Stop using module_platform_driver_probe() power: reset: at91-reset:: Stop using module_platform_driver_probe() power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe() power: reset: as3722-poweroff: Convert to platform remove callback returning void power: reset: at91-poweroff: Convert to platform remove callback returning void power: reset: atc260x-poweroff: Convert to platform remove callback returning void power: reset: ltc2952-poweroff: Convert to platform remove callback returning void power: reset: mt6323-poweroff: Convert to platform remove callback returning void power: reset: qnap-poweroff: Convert to platform remove callback returning void power: reset: regulator-poweroff: Convert to platform remove callback returning void power: reset: restart-poweroff: Convert to platform remove callback returning void power: reset: rmobile-reset: Convert to platform remove callback returning void power: reset: syscon-poweroff: Convert to platform remove callback returning void power: reset: tps65086-restart: Convert to platform remove callback returning void drivers/power/reset/as3722-poweroff.c | 6 ++---- drivers/power/reset/at91-poweroff.c | 11 +++++------ drivers/power/reset/at91-reset.c | 9 +++++---- drivers/power/reset/at91-sama5d2_shdwc.c | 9 +++++---- drivers/power/reset/atc260x-poweroff.c | 6 ++---- drivers/power/reset/ltc2952-poweroff.c | 5 ++--- drivers/power/reset/mt6323-poweroff.c | 6 ++---- drivers/power/reset/qnap-poweroff.c | 5 ++--- drivers/power/reset/regulator-poweroff.c | 6 ++---- drivers/power/reset/restart-poweroff.c | 6 ++---- drivers/power/reset/rmobile-reset.c | 5 ++--- drivers/power/reset/syscon-poweroff.c | 6 ++---- drivers/power/reset/tps65086-restart.c | 12 +++++++----- 13 files changed, 40 insertions(+), 52 deletions(-) base-commit: e27090b1413ff236ca1aec26d6b022149115de2c