From patchwork Sun Dec 17 14:29:41 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: 180028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp737338dyi; Sun, 17 Dec 2023 06:41:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEksd40/s9jccKKV1wg3fIrqXfXdHX50+X71MjoTGTE9pICewnhH64rMK3zZvfvHmgyxQ8J X-Received: by 2002:a92:cdaf:0:b0:35d:6497:3548 with SMTP id g15-20020a92cdaf000000b0035d64973548mr23222980ild.55.1702824116773; Sun, 17 Dec 2023 06:41:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702824116; cv=none; d=google.com; s=arc-20160816; b=HmRR7c9wtTA1majxPFafZv+k2vG2caz0WPAjT71D8YYFzpBC2QLCh1xdLgPCg7NlxU hFWuLx+n+jRrC9VYhqcY98PQ04243y+ZWSDZ7QvEZYr6531wpKjAx1MbK7cakQZTWU0o Uvb+9avgz2eHZb3BUZPTPD1m7Ugu1ZtkcDcTsbvx2/gHRRWDbv5fLDs8Pd56c8m7s2eq YgtKthpnQwh1aper8K2i2cbaF41OJNqQOJu2pjgZcoptNHiz0N1ypKE1cyjEhvnytRj9 Y3gYPfwyZkkdVsLQoj+y91C7lMpsJd38fWzBYM1UlawiifYyUBmRqxwi6WrdDqWrQzaI WwiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=snmEQSlAEPGTTnYmOExy1ClzPrrdeSrXNuvXygHbSDU=; fh=U565yqmgZMcvr3E5NWk2zB3l8gfOALKowPOdrK24J5o=; b=Jf0Hlez0mVBUK5OcilIG7M7XwdmbUYx6njg/U0k+rwPjWoweKEvVsHXYrxUoijOwyR xlIgcHHYp42DCR+65MR7yusqzdn3MwtRcVK7G40BqN8jB78SpMSrZrcD6MZzCbz6x3E/ DNwv7EIp5apaxUlG3Y6gMh9gNPcceWwrHsi3w4Vc0+Sthlfp57pwZRWmFKNei+wjjWMz 4tiQKc0bGFj9z8WSYOTHjnM9jAkwsF98L105nvnbXp/g7VFjEkNpQfLeDUfYSmA1tFg/ gNYjAdunFKOaheJFPGrABhYvZecaBHrCL0lk0bkTeT2n3uXce1xeQUa+nrSKcDg3HT5E qV1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2638-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2638-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j14-20020a170903024e00b001d1ce46f067si16543415plh.485.2023.12.17.06.41.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 06:41:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2638-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-2638-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2638-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C730E2883D1 for ; Sun, 17 Dec 2023 14:33:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9D304A9A1; Sun, 17 Dec 2023 14:30:29 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6636144C81 for ; Sun, 17 Dec 2023 14:30:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de 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 1rEs9f-0006b0-O8; Sun, 17 Dec 2023 15:30:07 +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 1rEs9f-00GUhw-4D; Sun, 17 Dec 2023 15:30:07 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rEs9e-004hzs-RU; Sun, 17 Dec 2023 15:30:06 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Krzysztof Kozlowski Cc: kernel@pengutronix.de, Santosh Shilimkar , linux-kernel@vger.kernel.org Subject: [PATCH 15/15] memory: ti-emif-pm: Convert to platform remove callback returning void Date: Sun, 17 Dec 2023 15:29:41 +0100 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1748; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=WJZhwPTIlOIcqqLEYHwjtW0719qozbE7mBK83LkfWTk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlfwXWitg8IFqEzU/x3i9wOHluf61iEJdKFWz4e sP6AwJyr2WJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZX8F1gAKCRCPgPtYfRL+ TgQcB/4+1a//3wge4lcfstHDq+FtIiQnRK37NbknYbLzRn5tWA54WLLrR4a0XofCL0GN7YSRAHU 4tu7BUdnZCOxDdTjz/RR1yEFaLgGcij11HxXSoguQ8KEQqsynys0RfRr9AgK687x9PEQeE4+jwg iBLkifzP7BlGxsEpEwtjXc7MsLsFthQ0n80xxHwYrTEZrcFNFUXb/tTkZ8wcn6tTKpS0xeTjAyO rnJNt7KewIhXFdaYSDGNCrXPpPC6DuvbNzoD3e1G+nqPdPsEDotvhJn9KQaQnhFq7Ie074cWR8J nOhS3nF+wQonHYpPT2GhaRRqVFOzI5vIZTIkGTNQ0DXlxpO2 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785540501194016071 X-GMAIL-MSGID: 1785540501194016071 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 ignored (apart from emitting a warning) 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. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- drivers/memory/ti-emif-pm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/memory/ti-emif-pm.c b/drivers/memory/ti-emif-pm.c index cef0d3beb63b..592f70e9c8e5 100644 --- a/drivers/memory/ti-emif-pm.c +++ b/drivers/memory/ti-emif-pm.c @@ -315,15 +315,13 @@ static int ti_emif_probe(struct platform_device *pdev) return ret; } -static int ti_emif_remove(struct platform_device *pdev) +static void ti_emif_remove(struct platform_device *pdev) { struct ti_emif_data *emif_data = emif_instance; emif_instance = NULL; ti_emif_free_sram(emif_data); - - return 0; } static const struct dev_pm_ops ti_emif_pm_ops = { @@ -332,7 +330,7 @@ static const struct dev_pm_ops ti_emif_pm_ops = { static struct platform_driver ti_emif_driver = { .probe = ti_emif_probe, - .remove = ti_emif_remove, + .remove_new = ti_emif_remove, .driver = { .name = KBUILD_MODNAME, .of_match_table = ti_emif_of_match,