Message ID | 20230401161938.2503204-34-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=ZYpwWEfT; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=oH2vw32Y; 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 4PpjXX1NHlz1yZB for <incoming@patchwork.ozlabs.org>; Sun, 2 Apr 2023 02:38:52 +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=1HqEmC+mh0ZMjgSIqafs3VuZpSnDYL1xPiUZirIEHcU=; b=ZYpwWEfTY4dpsb gqC3LaLncBfQ8y4oh1AY4KUrCbpozE7+mUdX/ZwSU662GGiPXoAz5BqHWrHl5UPPUqrF9WPIZ3j+w /xx7cISmJ9nCreFpq40O1xdcZi7aF/soLngSdy+gCTn43Gk8sRiSWBjg3uQ6GF+E1V8X7z3SAJZaE E+DPCO6k86f51bzd79KcYr9kKE+f4Pe3oTCz5NVlTGtpOnq4caKzJI/Gdi1+I8gK520TWLk7IBuwB gYB1kSfLt9lZGkEgr7bM9jUcqXXHpYVEMTm4jfX0FQxjEfN7pNqlhAkCqx+0phvboegy/3OOr2ZSD ntJFOEbrmdI7AMEkhGBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pieFE-00AxAB-0I; Sat, 01 Apr 2023 16:38:24 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pieEP-00AwRk-0p for linux-mtd@bombadil.infradead.org; Sat, 01 Apr 2023 16:37:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=du27Q0n/f1QePymWPzjyyEdCxXBBRCPBaY+ZxA+VYGY=; b=oH2vw32YrdHfC/wqM00efTMOcK KNwkNtllzzjq48sXbXUqbO8iVx2q0yq9g0NZp7hvtSFkfY9eOyfxmAxsBKgSYAm5DJlUxz8I0ZmIo Jy6SGO3KEw7Cov0NuAnHc1QiTwRywiYeLMdHDHhP8afXtMpBbb11z8c5nbqIGMjkAnwUUirMyFgXI 4ekYuCbNZ09dMWMb1P0XgPYaLuXvT0A0H5UWWITzQImTY8IzUQozLjeHPXIWKSlgiBwIG2Zjk3EyT I4930PAj0eWqafw1sfpx+T8qiF4An2rE8pH1HobeGLenGrZ1QUh6r0JoqlXMBsUbkMVrr6NwCTGK5 8TbCztTg==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pidxS-00CYO9-TF for linux-mtd@lists.infradead.org; Sat, 01 Apr 2023 16:20:07 +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 1pidxL-0008SO-D6; Sat, 01 Apr 2023 18:19:55 +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 1pidxK-008GSO-JB; Sat, 01 Apr 2023 18:19:54 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ukl@pengutronix.de>) id 1pidxJ-009khC-6c; Sat, 01 Apr 2023 18:19:53 +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>, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Richard Weinberger <richard@nod.at>, linux-mtd@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 33/49] mtd: rawnand: orion: Convert to platform remove callback returning void Date: Sat, 1 Apr 2023 18:19:22 +0200 Message-Id: <20230401161938.2503204-34-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=1791; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=W+UYBgQAJFZeZsDfcOBfTmR0jObXHTo9YMzd82OzR4A=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkKFk9+UQ+F5lK3o+3fgK7D1bp9dyovfn51We/3 fmkM0dwqDKJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZChZPQAKCRCPgPtYfRL+ TrluCACDw5GELQM8EroSOXvPTA15GbyyDqV3n+WwfjlkxQJn4hAJSd3AoIPXvzE8kztRHhEUnr7 R9gilRSIYvDFRnVc3RRRJ2Fjeq28rViA/CYaApOe9twT2eDJ6XwKeuHk7zCQymFEdNzaOpuMWpB ai2t/0hequ367xyMS/RuPHtH0f65hzWNT66vDX+P5un7v5RsAcJ9tpGuy+U7LzIfQQw6DIQ7GVK DpIHJLZYJ+Bu/tOzZplxsiu8XrpT57+VzkI4IF0afS+o7FhsKgt7cnIwr6Gf82tF8iVOfzFbpJT Q9BWtYA/o9YqSk3R1mDZvJFwo6u7iY+6pIDbpOn+k8Jug7ZU 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_172003_029790_0C39CD0D X-CRM114-Status: GOOD ( 12.88 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.6 on casper.infradead.org summary: Content analysis details: (-4.2 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] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c index 1bfecf502216..39a6c6360588 100644 --- a/drivers/mtd/nand/raw/orion_nand.c +++ b/drivers/mtd/nand/raw/orion_nand.c @@ -207,7 +207,7 @@ static int __init orion_nand_probe(struct platform_device *pdev) return ret; } -static int orion_nand_remove(struct platform_device *pdev) +static void orion_nand_remove(struct platform_device *pdev) { struct orion_nand_info *info = platform_get_drvdata(pdev); struct nand_chip *chip = &info->chip; @@ -219,8 +219,6 @@ static int orion_nand_remove(struct platform_device *pdev) nand_cleanup(chip); clk_disable_unprepare(info->clk); - - return 0; } #ifdef CONFIG_OF @@ -232,7 +230,7 @@ MODULE_DEVICE_TABLE(of, orion_nand_of_match_table); #endif static struct platform_driver orion_nand_driver = { - .remove = orion_nand_remove, + .remove_new = orion_nand_remove, .driver = { .name = "orion_nand", .of_match_table = of_match_ptr(orion_nand_of_match_table),
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/orion_nand.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)