From patchwork Tue Apr 23 08:06:57 2024 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: 13639588 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 69A4DC16B13 for ; Tue, 23 Apr 2024 08:08:02 +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=Y2CDFN7+OH+Ughv2tpkSJWEke7us5ziUgiiI3oFeK58=; b=t4C0uvVtJOmO6J ZgcuOF7zFVyRnC/omwyaTWd1eZg+edOA1q+71zv6nrHkhGnvrurCc+yV4wCGgdJm+hDCvP+8ETxSj ZrpiLYp+Vtoj+jzr8nNVflUUaVbtc1OGw9emiNbeZSgcdrTiMxGCT6bkBLHI5eAvhJ8xvlyq2uWE1 Yu8qaHWuNuRU12THBD0BkxGA9KwrKoMwYruSTWizynQ0pfu+m5TuuRmQzuiXwpLaqyjGheSusxhw0 KYiHkAYhqjuS7BBfU8feqsoK2VL0rPLPHJCJ/mPTxnjj3X9rBRc2k2nwPEmMabzQDY61kv2pQxyKS spvlbvlxKA/HaDkQx9/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzBBs-0000000GP8u-0ACt; Tue, 23 Apr 2024 08:07:48 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzBBY-0000000GOyA-3HBE for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 08:07:30 +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 1rzBBL-000355-JC; Tue, 23 Apr 2024 10:07:15 +0200 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 1rzBBJ-00Dq1P-PO; Tue, 23 Apr 2024 10:07:13 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rzBBJ-006nfj-2B; Tue, 23 Apr 2024 10:07:13 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Suzuki K Poulose , Alexander Shishkin , Sudeep Holla , Anshuman Khandual , Maxime Coquelin , Alexandre Torgue Cc: Mike Leach , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-stm32@st-md-mailman.stormreply.com, Greg Kroah-Hartman Subject: [PATCH 0/5] coresight: Convert to platform remove callback returning void Date: Tue, 23 Apr 2024 10:06:57 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2749; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=gTA+U5yuGNOEcXpkq6H/RGP6EzMzw98g+E2AQI6/KKc=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBmJ2wkJtP7uKVFJr65YKlun3Sa3zIpF0mVkZzyW S0lUmWw2TWJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZidsJAAKCRCPgPtYfRL+ TlX8B/9sNmg+kwtLiSfGlytMonwVogJbiWU0a4RnUphy0xrt85UtOvn62fa+qR2YdtKX3MENfFi cBNWgFgjvKg4zEKjmFEk+rEzq4fMkj/ZNwq1SJsZmA6fPeq/0bRXpR9G3a8Z0d2sY4/D/fKFxoM d5Kd6j5ZqVm1SaClarCbatqmUNBEAf9f6X4gVqgXS9bujI+5qHisMw8OW9N1UJ8vNqOOlXyEWpQ Zu0ikOjAN5fL6oh4qF5l4niKZur5STuUMb6Qf50+VeswDxRD+ljMEr4f9QiX0Hzh6Fyhit21Rqn SsXw97V9dimGckGbLSU+pKKaXmw+r5uCiMXqm1aRleWR9pJa 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-20240423_010728_913308_F4D38869 X-CRM114-Status: GOOD ( 11.43 ) 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, this series converts a few platform drivers below drivers/hwtracing/coresight that recently started to implement a .remove() callback to implement .remove_new() instead. See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. All conversations are trivial, because the driver's .remove() callbacks returned zero unconditionally already. There are no interdependencies between the five patches, so they could be picked up individually if need be. After the merge window leading to v6.10-rc1 (assuming Linus has >= 10 fingers this cycle :-) I want to switch the prototype of struct platform_driver::remove to return void. So please either merge this series together with the commits introducing .remove() that currently sit in the next branch of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git, or accept me sending them together with the patch changing the function's prototype for inclusion to Greg's driver-core tree. Having said that, the patches adding platform driver support for these could be improved: - dev_get_drvdata() never returns NULL in these .remove() functions because .probe() called dev_set_drvdata(). For the usage of WARN_ON also see https://lwn.net/Articles/969923/. (That link's content is behind a paywall until May 2, the TLDR is: Don't use WARN_ON().) So the respective checks with the early return could better be dropped IMHO. - IS_ERR_OR_NULL(drvdata->pclk) is never true in .remove(). Also note that IS_ERR_OR_NULL is ugly and gives hardly ever the right condition to check for. Note further that clk == NULL isn't usually a problem, NULL is used as dummy clk returned by clk_get_optional() and all clock API functions handle that just fine. So if at all, better check only for IS_ERR(drvdata->pclk). Best regards Uwe Uwe Kleine-König (5): coresight: catu: Convert to platform remove callback returning void coresight: debug: Convert to platform remove callback returning void coresight: stm: Convert to platform remove callback returning void coresight: tmc: Convert to platform remove callback returning void coresight: tpiu: Convert to platform remove callback returning void drivers/hwtracing/coresight/coresight-catu.c | 7 +++---- drivers/hwtracing/coresight/coresight-cpu-debug.c | 7 +++---- drivers/hwtracing/coresight/coresight-stm.c | 7 +++---- drivers/hwtracing/coresight/coresight-tmc-core.c | 7 +++---- drivers/hwtracing/coresight/coresight-tpiu.c | 7 +++---- 5 files changed, 15 insertions(+), 20 deletions(-) base-commit: a59668a9397e7245b26e9be85d23f242ff757ae8