Message ID | 20230401161938.2503204-25-u.kleine-koenig@pengutronix.de |
---|---|
State | Changes Requested |
Delegated to: | Miquel Raynal |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=nEAfq5pG; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=kq91fkVb; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ppj9D1PWLz1yZB for <incoming@patchwork.ozlabs.org>; Sun, 2 Apr 2023 02:22:08 +1000 (AEST) 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:References:In-Reply-To: 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: List-Owner; bh=gBawTKemVZevQxgtAlOdEOynkn7W8kjl90nRR3gh+DI=; b=nEAfq5pGcNufOZ dRk5SnKW0Or27VhBePHsKrxzHPOOgbT4iy04Q3T0ZuAjMJB2vzMu4Of8zYC1XX4gdn9Rh6pg+BxKV jqWmmwQBWu1dU7q2G23Z8WyHmCsg2PjnnEin3y3+tlJsilkUid4o8S8baoAhoJqZVgWSWPImM31ms Ce5A6/sHp5l9OAyS7URbSfx39ZrCmXMiml+MtgTDX1na1v8NkHHQOTPc2Oc1yOf7dFTd77KFfbkem i41nby7dTFWxAOWPlZCmmDkArNA0eHOZLkYNn9B9Rzg66vxxb6pFw1sSfvcsniiLGRChHOFA/ycPc b9cRR3UdpYazbQm6at7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pidyy-00AtDt-2J; Sat, 01 Apr 2023 16:21:36 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pidxf-00AsIx-0c for linux-mtd@bombadil.infradead.org; Sat, 01 Apr 2023 16:20:15 +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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=U1ZVdiFEE2IcIgO9RpwX5XO4FLEKO9wpt6OXzQrcZGY=; b=kq91fkVbz7UKJmoTjTzCGsALYQ nfNKLhYTW9WC/I2EE4CHXMOpl1O+Oqc7lCP8U1Hvre4UML8hVOpQ37UqyOVpgxOsdXRsI9bRLbnLV wSDyKSFAEmQ8SEYubd22kE16ccOQCBDsSEohZzNZhDmjeBX/ZkuocKrimeCup3w0dW3BSND0ERIKI SK84npq6IMCrvO42+zOcDw3hx6poS51Mf1Bynxh9HBf221H45O8UZEP4CezIPpi4iQtsAZRflfxG7 lpcCqhhXS0WkDAZfxfjlHsO/+/AdN4N7JD4bmgTQoukEUM6BrZjb0ffQgSZneyjimn0uUR3hXT8aE MmdvU6Zw==; 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 1pidxX-008DKp-0n for linux-mtd@lists.infradead.org; Sat, 01 Apr 2023 16:20:14 +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 <ukl@pengutronix.de>) id 1pidxJ-0008MN-KG; Sat, 01 Apr 2023 18:19:53 +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 <ukl@pengutronix.de>) id 1pidxI-008GRP-7g; Sat, 01 Apr 2023 18:19:52 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ukl@pengutronix.de>) id 1pidxH-009kgY-8x; Sat, 01 Apr 2023 18:19:51 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de> To: Miquel Raynal <miquel.raynal@bootlin.com>, Vignesh Raghavendra <vigneshr@ti.com> Cc: Richard Weinberger <richard@nod.at>, linux-mtd@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 24/49] mtd: rawnand: marvell: Convert to platform remove callback returning void Date: Sat, 1 Apr 2023 18:19:13 +0200 Message-Id: <20230401161938.2503204-25-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230401161938.2503204-1-u.kleine-koenig@pengutronix.de> References: <20230401161938.2503204-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1794; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=UH8mman7FpH1I+NbmK+dcyenV48z9RiSFvkc+mUbSUs=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkKFkk62BUOEslPj+Q3mC8dAUUueXFuyusv4PIo VObbrHvAMaJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZChZJAAKCRCPgPtYfRL+ TpfDB/4wm1dWN/uAYfQuytapit1JR7K/uedI7C9hZ1yc2bRuJ5tv0dhfyy2rGj38FvuyZwiIgKe N7/H48uRcrfx0N4FnsiwoJiZR9iloQ8W4N08lDpwAcEhjrETmx9p1IYdPm39c/xiDtK71fbCQVl 7NTFHb+L/w2XgE8Y7EPVswLs0X7IZMz2/D2QaGN1QWbEOla5YOUEmCiy2bG304e+TF2XOoSM/lO HykZ8Bh8gMqqkGCFwevf2GrIoAwkBHkXpQO/DOWTsdymPFrWpeDjv2suisTiCR+Cly1w40M8qMi /3ql5TkD25AgvysYnt9D+JEXPhSO6TaUZaSOpkB/5kVFeyxm 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-mtd@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230401_172007_534087_7952B966 X-CRM114-Status: GOOD ( 15.26 ) X-Spam-Score: -2.3 (--) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is [...] Content analysis details: (-2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [2001:67c:670:201:290:27ff:fe1d:cc33 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
mtd: nand: Convert to platform remove callback returning void
|
expand
|
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c index 3034916d2e25..afb424579f0b 100644 --- a/drivers/mtd/nand/raw/marvell_nand.c +++ b/drivers/mtd/nand/raw/marvell_nand.c @@ -3004,7 +3004,7 @@ static int marvell_nfc_probe(struct platform_device *pdev) return ret; } -static int marvell_nfc_remove(struct platform_device *pdev) +static void marvell_nfc_remove(struct platform_device *pdev) { struct marvell_nfc *nfc = platform_get_drvdata(pdev); @@ -3017,8 +3017,6 @@ static int marvell_nfc_remove(struct platform_device *pdev) clk_disable_unprepare(nfc->reg_clk); clk_disable_unprepare(nfc->core_clk); - - return 0; } static int __maybe_unused marvell_nfc_suspend(struct device *dev) @@ -3154,7 +3152,7 @@ static struct platform_driver marvell_nfc_driver = { }, .id_table = marvell_nfc_platform_ids, .probe = marvell_nfc_probe, - .remove = marvell_nfc_remove, + .remove_new = marvell_nfc_remove, }; module_platform_driver(marvell_nfc_driver);
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/mtd/nand/raw/marvell_nand.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)