Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1773805rdb; Mon, 9 Oct 2023 02:23:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfcQrGCAA0MjoliGn2LkPhxmwvtUyi9RMdNTXNq1eC3iHzQ3CYubrJko+YCUkTD46EX4Hs X-Received: by 2002:a17:90a:d815:b0:277:1070:74a2 with SMTP id a21-20020a17090ad81500b00277107074a2mr12606151pjv.23.1696843434055; Mon, 09 Oct 2023 02:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696843434; cv=none; d=google.com; s=arc-20160816; b=GFtHXnOaysylR8UYUq8+W+99iXdP9UCiGpVDi2RM3a+/1y3sbSVsWfow4h4Ay+obOs PdyoydDlTGo/+NiIAJBSY7RICDjczG6SRcQqwnjSSMOIc/HWFGHKWlAE0iEPOWcscfI2 T5ORDS/KxF9FKCDw4mCAmz0UTqh7OiZBt+VD1Dah7yms3avHT3wG/K6AHddTH4NSCqC8 bZR8r+xcy1PAOIdbNFVWBc9b1jNSEXxLWLcsTFUsmkeHl0MxvQd4Gd8wdo179woC3yXC 7kWionN69pxAK9jnUte0Y1TIjCHyTX/eXZeRoMgl4Lp+4+2EYMSDMNUOZToy1JQAHwvF JZwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Sk1j9wNXeq8vF3a+f0oXGOtGgrr0JlRkXrqVozWrg50=; fh=dJXZ9AKnq+9P1sEpeYBIKd7ZLoPiu8RghfPaOZun9t8=; b=E5iG6k4OEpjUwLIhGwQSd+r/kxcemrRMuaQ1BLiGC3hxgTdw7ki14u49O3JOMUS9Ij qLD8AJcD8NKiXzalq6RXjKdQOCdlfa/xqYzUbWtsvhqGmYJLejUeSupDy6Hozw5TsDUV 2DTOx8/p/4qq19cj8cjFWPcgWt5r5rh8WxELVCuUVVqZUa2Ecl0GDCF+2a6K3ebS7oNN hS0vBYh/YPsZYzesJwBN9DW27BXLvLg+I4sWkTh7bNfcXr8ofCJgsmZoRO/vbMRs17l2 rhX0kcXQoUqua3nSQ4TYFGyKRL6GgciVSfC6BwQ5G6pL3wriF6TW0YCP2LgFSJMXBGij F1+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id a12-20020a17090acb8c00b00274b668b762si9149676pju.172.2023.10.09.02.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 02:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4BE57804285D; Mon, 9 Oct 2023 02:23:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345979AbjJIJXa (ORCPT + 99 others); Mon, 9 Oct 2023 05:23:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345852AbjJIJW5 (ORCPT ); Mon, 9 Oct 2023 05:22:57 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CBA610D for ; Mon, 9 Oct 2023 02:22:46 -0700 (PDT) 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 1qpmTE-0006ts-SJ; Mon, 09 Oct 2023 11:22:36 +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 1qpmTE-000NWz-F4; Mon, 09 Oct 2023 11:22:36 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qpmTE-00C4pT-5l; Mon, 09 Oct 2023 11:22:36 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Linus Walleij Cc: Heiko Stuebner , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/20] pinctrl: rockchip: Convert to platform remove callback returning void Date: Mon, 9 Oct 2023 10:38:47 +0200 Message-Id: <20231009083856.222030-12-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231009083856.222030-1-u.kleine-koenig@pengutronix.de> References: <20231009083856.222030-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1992; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=1r75hWhFIwS3Xxx1rg10xcxelpQqUr47pBcp8katCvo=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlI7wLOmza0DUzIsCY9zfipvZ36aTSt6DU6kjvl EYs+uaL1TSJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZSO8CwAKCRCPgPtYfRL+ TnXnB/9xI3Eby3413pFsFuP6EKG8aPL42C5OSRsytr3PhPLwgGp3LeX4/f2CzGzcQvQ1x/iXOLl mnhbwlPcElww+ahQoXDEsvpW4wLsNmZjTbrttMB+eHZ4TdXWn8dW6qsnosiATY3xSAgYsVn3UF8 t+K1fNRR9o5yOWL5uTaH06nXwmqZ2ZTFt3Kghc4NpMcJw5QeI0e89NdlHfR7lgUCFbLXgRUFkJa oCxEl53LUOeQSti/1W5K5dL7lAeLhX3H87pGo0fDnnXDfS9tEfty6ZoAXQTzp9sBf5oi8e13aYb qRGs+RIDCz2PyhmyH+dx8TTA+OCZH1VE4pVnXA+OpmzaD+1y X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit 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-Spam-Status: Yes, score=5.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, SUSPICIOUS_RECIPS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 02:23:47 -0700 (PDT) X-Spam-Report: * 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS * [2620:137:e000:0:0:0:3:0 listed in] [zen.spamhaus.org] * 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level * mail domains are different * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list * -0.0 SPF_PASS SPF: sender matches SPF record * -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list * manager X-Spam-Level: ***** 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/pinctrl/pinctrl-rockchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 45e416f68e74..3bedf36a0019 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -3429,7 +3429,7 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev) return 0; } -static int rockchip_pinctrl_remove(struct platform_device *pdev) +static void rockchip_pinctrl_remove(struct platform_device *pdev) { struct rockchip_pinctrl *info = platform_get_drvdata(pdev); struct rockchip_pin_bank *bank; @@ -3450,8 +3450,6 @@ static int rockchip_pinctrl_remove(struct platform_device *pdev) } mutex_unlock(&bank->deferred_lock); } - - return 0; } static struct rockchip_pin_bank px30_pin_banks[] = { @@ -3982,7 +3980,7 @@ static const struct of_device_id rockchip_pinctrl_dt_match[] = { static struct platform_driver rockchip_pinctrl_driver = { .probe = rockchip_pinctrl_probe, - .remove = rockchip_pinctrl_remove, + .remove_new = rockchip_pinctrl_remove, .driver = { .name = "rockchip-pinctrl", .pm = &rockchip_pinctrl_dev_pm_ops, -- 2.40.1