From patchwork Thu May 4 19:44:35 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: 13231860 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 A3411C77B7C for ; Thu, 4 May 2023 21:40:29 +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=d3IMLd6nAyCuq+y8eeexHb2Vmhp5yJQ+atOsrUE3Mgs=; b=E1dbZ1wTUopgj/ VqpOFuucfAK8kEQUQEncVj4pM3crKPLpplrl8FuZdY0oKKXeRYvLbGY4UJQC6GLEEUEQgXc8n/04d zQf/+wGSlt4S5DE6Ra/HoY/u+u7M28mz+44q8HY0rCQidGfnAYGaw13AZtI+kI4+tY2jtzfQqxfTw 2HM/AWGc/WkyRo26Vq1rf8M1VzAYuppWFB9FxKcBZ5oWkY1KgyR6BNXdK3hRL2j92m11aYNMosEr0 BdFMiSJ5xIgd6fDWOmIO9PVVbZT4s900NqEUfeEFtZrNUx5Lvl8LFzhxhW+VsaqiZkiCHHc+vk0hD eam6T9hi2LD9K/B521Yw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1puggV-0094mo-36; Thu, 04 May 2023 21:40:19 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puggU-0094mW-37 for linux-amlogic@bombadil.infradead.org; Thu, 04 May 2023 21:40:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=0K0vp6Hrdr6rprmlW88AczO8LMzPogTZr7OWCcYdWGU=; b=XYmES8WjjoJhvjRhxqlvY3bONv Iu8XDML8sRtFWbl0tKSpr8Ter585aELhMFZ8zYPtTRXRJHpuRxI3+IScfENdb3MZNBnFHJ0OU4eEX xF5sLfITJv1z3fF0C7PQDEe37xK6G7g02lbUYidd9jjeq8rjFgeetVim1O5m3ejg3Q7OKJ7zKTGL1 oe2Jl3axyiNR8otUzM/b/kFeF8aNR8Ge1CcMw8JPwR9/ZN0syE8TmdqKC/zbrr4T/hh7GUnTW/Exf LyG8TxqJHMxF7ZsL4qKusCipEPlN5NcPgLu96s0Vq0RxteFxqmjWd/yfCBVaguEDaeLFLVxqQQ0hS BZCI5RfQ==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puetP-001ovV-2q for linux-amlogic@lists.infradead.org; Thu, 04 May 2023 19:45:34 +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 1puet3-0007eG-9l; Thu, 04 May 2023 21:45:09 +0200 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 1puet1-0018F4-3j; Thu, 04 May 2023 21:45:07 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1puet0-001JhD-03; Thu, 04 May 2023 21:45:06 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Neil Armstrong , Kevin Hilman , Matthias Brugger , Andy Gross , Patrice Chotard , Maxime Coquelin , Alexandre Torgue Cc: linux-remoteproc@vger.kernel.org, kernel@pengutronix.de, Fabio Estevam , NXP Linux Team , linux-arm-kernel@lists.infradead.org, Jerome Brunet , Martin Blumenstingl , linux-amlogic@lists.infradead.org, AngeloGioacchino Del Regno , linux-mediatek@lists.infradead.org, Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 00/18] remoteproc: Convert to platform remove callback returning void Date: Thu, 4 May 2023 21:44:35 +0200 Message-Id: <20230504194453.1150368-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3577; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=1MtyBZrEfa4B8pF3gNxwA18Zw/gtonyelyJbi+5OOFE=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkVAm8mOKc9b0/danYJCdc61k/Zj773LlxBpbUo 6ju5XkgRdqJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZFQJvAAKCRCPgPtYfRL+ TiAxCAC1E8bg6I203hTsrJ3wz7jlhRBG+fWX/irJYFYhOed/WIzieyXyY+YZZGF/caBCQuNl/H2 EULhxcNYvCWrNjmBRI2piNO1ZuXOFto63zWyAhJTPQS/uggSvQbcfHNyOiYTw+E1WbsQfb/7M/0 EOM9LXiivD71kmmMXWccckezN3teMuquCvd1trbFddSRdCChxk18k0WQHX+OZeFnQkvAvVLiXSi XfaTFa/jEyblKAeusAq7t4qaGgHsVYZ5AwobaS9C6vwD4koSOeOH0MKmDL+JgToipyEaSNtlaAo VlUdExOqycUZ2WBDSRZ6kr8sK7G70uAtTEfaN/SN2UzfTwnZ 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-amlogic@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230504_204532_297054_BC65556C X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hello, this patch series adapts most platform drivers below drivers/remoteproc 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. One driver suffering from this problem (s3c2410) is fixed by the first patch. By changing the remove callback to return void driver authors cannot reasonably (but wrongly) assume any more that there happens some kind of cleanup later. There is one driver (i.e. ti_k3_dsp_remoteproc.c) that might return an error code in .remove(). I didn't look in detail into this driver, but if that error happens, we have exactly the bad situation described above. (Note that kproc->mem and the register mapping goes away.) Best regards Uwe Uwe Kleine-König (18): remoteproc: da8xx: Convert to platform remove callback returning void remoteproc: imx_dsp: Convert to platform remove callback returning void remoteproc: imx: Convert to platform remove callback returning void remoteproc: keystone: Convert to platform remove callback returning void remoteproc: meson_mx_ao_arc: Convert to platform remove callback returning void remoteproc: mtk_scp: Convert to platform remove callback returning void remoteproc: omap: Convert to platform remove callback returning void remoteproc: pru: Convert to platform remove callback returning void remoteproc: qcom_q6v5_adsp: Convert to platform remove callback returning void remoteproc: qcom_q6v5_mss: Convert to platform remove callback returning void remoteproc: qcom_q6v5_pas: Convert to platform remove callback returning void remoteproc: qcom_q6v5_wcss: Convert to platform remove callback returning void remoteproc: qcom_wcnss: Convert to platform remove callback returning void remoteproc: rcar: Convert to platform remove callback returning void remoteproc: virtio: Convert to platform remove callback returning void remoteproc: st: Convert to platform remove callback returning void remoteproc: stm32: Convert to platform remove callback returning void remoteproc: wkup_m3: Convert to platform remove callback returning void drivers/remoteproc/da8xx_remoteproc.c | 6 ++---- drivers/remoteproc/imx_dsp_rproc.c | 6 ++---- drivers/remoteproc/imx_rproc.c | 6 ++---- drivers/remoteproc/keystone_remoteproc.c | 6 ++---- drivers/remoteproc/meson_mx_ao_arc.c | 6 ++---- drivers/remoteproc/mtk_scp.c | 6 ++---- drivers/remoteproc/omap_remoteproc.c | 6 ++---- drivers/remoteproc/pru_rproc.c | 6 ++---- drivers/remoteproc/qcom_q6v5_adsp.c | 6 ++---- drivers/remoteproc/qcom_q6v5_mss.c | 6 ++---- drivers/remoteproc/qcom_q6v5_pas.c | 6 ++---- drivers/remoteproc/qcom_q6v5_wcss.c | 6 ++---- drivers/remoteproc/qcom_wcnss.c | 6 ++---- drivers/remoteproc/rcar_rproc.c | 6 ++---- drivers/remoteproc/remoteproc_virtio.c | 6 ++---- drivers/remoteproc/st_remoteproc.c | 6 ++---- drivers/remoteproc/stm32_rproc.c | 6 ++---- drivers/remoteproc/wkup_m3_rproc.c | 6 ++---- 18 files changed, 36 insertions(+), 72 deletions(-) base-commit: 1a5304fecee523060f26e2778d9d8e33c0562df3