From patchwork Mon Nov 6 15:48:08 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: 13447147 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 6C02DC0018A for ; Mon, 6 Nov 2023 15:49:20 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject: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=Frx7PxsBfTh09uTiHHcY7fJxR2D87VA4qlhXZyCHInU=; b=TO4E9QILmeBvBy a+g7Cyjrs8qXbtytyPR+iyZ2QGMXbZeEKWq79WAMfioTPYjt2RzDzzb2YP/Tqm0SSS1pyanOSyhTJ XBWykqqhCB7zaDoD/MPMH+OpKtoaIoPxOm3klwxZGbry1g2DA1MhoxFa3z+wyv1LbmCBIJcLqbxDU fj5qpfJ5lwfDsjOqUNairAMgB4Tq6EKQH8DJvqzeKhQVN/ZZznUJVTzpbLuJC5GMK/U3Va/VGyWEv d7Snt55ZUZoG0lkb7IIX0Zrr4AH8y60i0dgQD2fbteJ2cETxBb5whfR25yRrr1BY1GWj6R2tJyVXq Ahq0n4IPR0X2khJkPDuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r01qP-00H1h1-2T; Mon, 06 Nov 2023 15:48:53 +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 1r01qM-00H1fy-2f for linux-arm-kernel@lists.infradead.org; Mon, 06 Nov 2023 15:48:52 +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 1r01qD-0007h7-4a; Mon, 06 Nov 2023 16:48:41 +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 1r01qA-0074pI-CD; Mon, 06 Nov 2023 16:48:38 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1r01qA-00Dn7l-2k; Mon, 06 Nov 2023 16:48:38 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wim Van Sebroeck , Guenter Roeck Subject: [PATCH 0/5] watchdog: Drop platform_driver_probe() and convert to platform remove callback returning void (part II) Date: Mon, 6 Nov 2023 16:48:08 +0100 Message-ID: <20231106154807.3866712-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0.586.gbc5204569f7d.dirty MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2092; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=CsAAXZNfJagYUNn9G20OK8DcPy3GbXjNMDl1T3VSBYQ=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlSQq3aUszaj3irVk4cMap4zE+bCpxad780bIG4 3QZVmi9wpyJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZUkKtwAKCRCPgPtYfRL+ TgRfB/oDmIgi03zoEKPaCUBxzxR+pVxsVJEghmbFYqG6Gksf8sRf0Ya7nwonZJP5VL3BEUbubr7 f8gZ0LP9tOFtCI95/WCJqvFNRpj/gGUsL8XgFgTcHi1d25NBzaJ9BP6J+uDavCMt4jSFg+FINyt rbVtjF2uG/1sG0Gkoja/wCpGH1NTxb/x0tFFJ2bgl+pZGfzL+FXMFcRWr+1lNVCzI1j90qR7+zl CKjm70zCOlPcDLu9RPTCey2LgMJqSQZApTijn4Q8tN5+nVELVn71AYD1OiY3n6ov28jnUPIzck8 qMd9TKQQLgYnR5YQs3cIcskmI4kIfM2AFZYM082YxXQRS2bY 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-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231106_074850_863428_CA5A94CF X-CRM114-Status: GOOD ( 14.26 ) 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: , Cc: Alexandre Belloni , linux-watchdog@vger.kernel.org, linux-kbuild@vger.kernel.org, Claudiu Beznea , Samin Guo , kernel@pengutronix.de, Xingyu Wu , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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 independent I chose to put them in a single series. The first two 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 drivers here got it nearly right. The alternative to these patches is to add __refdata 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"). Note that the warning only happens starting with commit f177cd0c15fc ("modpost: Don't let "driver"s reference .exit.*") that is expected to be part of v6.7-rc1. The remaining three 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. Some time ago I already did this to watchdog drivers, but I missed the at91sam9_wdt and txx9wdt driver, because my coccinelle patch failed to detect these as patch opportunities (because of the __exit_p annotation). the starfive-wdt driver is new since then. Best regards Uwe Uwe Kleine-König (5): watchdog: at91sam9: Stop using module_platform_driver_probe() watchdog: txx9: Stop using module_platform_driver_probe() watchdog: at91sam9_wdt: Convert to platform remove callback returning void watchdog: starfive-wdt: Convert to platform remove callback returning void watchdog: txx9wdt: Convert to platform remove callback returning void drivers/watchdog/at91sam9_wdt.c | 12 +++++------- drivers/watchdog/starfive-wdt.c | 6 ++---- drivers/watchdog/txx9wdt.c | 11 +++++------ 3 files changed, 12 insertions(+), 17 deletions(-) base-commit: 3ff7a5781ceee3befb9224d29cef6e6a4766c5fe