From patchwork Fri Dec 22 22:50:44 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: 182794 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371495dyi; Fri, 22 Dec 2023 14:53:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKJbNH+iUqgzkYbwFWzHmC8IS3nlmYeIGE5RFFKSODw7TgCh7e4W25sKseobKo5Y2kSr6M X-Received: by 2002:ad4:5963:0:b0:67f:40d3:c9ee with SMTP id eq3-20020ad45963000000b0067f40d3c9eemr2581744qvb.78.1703285593340; Fri, 22 Dec 2023 14:53:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285593; cv=none; d=google.com; s=arc-20160816; b=pdtQs6d1stSeQv3RocK6EsuzM7ufzH5D4SFlxPuYdX4rcTS3KGHmoqSZHd5pUkSok7 uwTXHq7Ice3PCZVMvJpOcsrqnZg4qRbULLmCJHuZ1q8vqPjAATEajpiASlx5wDvmioXA YJAfjRoMev1h4sqB0oEFS8JDGmMnZRJzo6FIDYoXz0F4lWxIG2hfUQP+mGXm5rArrFqT CAwYT+meRiT7zbMNvr2QFxeNJG/+MgXgrFsJ6h9braY/5XBi5+XYxdTrTo6ZovEnASa1 VArPyFVgiw6NuXgNeN5DVZgBKlVDt001Em70j+kYNJQYx+LjDrAgVJFlv1klMMPJuiGS u71Q== 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=MZKRtMJsJB3FE5xBwnZlTwbXK2/2LzvYuFH7YFIWmGo=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=sDfoPnupigQqUYsidGAMbZ6oGBJfGSeVFqXUDRjc5J4UzgewLsMtyRA62UDwxDPlgI r5drvt7856niMrgcopM4C7sh76p0fu/EzDx5WFnuLjM69o46qg7XvGBZuQvaWSxzXqaj XUsitjA+9M3s0v6N3KmTpeXWu+dN2sVSg6fOZz9w1GM6sdBhk0pa6FD5IMTQIouhT0hs Y+cvO92yCJ5jKaVg5Doc+MZY1zKrGc7iMI7FGpS/8nKL5H6duFHVJSi5iUfZeQlrUsFm 46sT4Li4Z16DCy9+h20M4fYATnsKfMCz0vn2t3z1z9HRFspJvCYLGGH87TexHxI3wAMl g7yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10097-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10097-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h9-20020a0cb4c9000000b0067f8c92249csi3598254qvf.78.2023.12.22.14.53.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:53:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10097-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10097-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10097-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 220C21C2307B for ; Fri, 22 Dec 2023 22:53:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAA3535F10; Fri, 22 Dec 2023 22:51:21 +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 43A9A2F848 for ; Fri, 22 Dec 2023 22:51:17 +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 1rGoMN-0005kS-D2; Fri, 22 Dec 2023 23:51:15 +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 1rGoML-000qve-Pv; Fri, 22 Dec 2023 23:51:14 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMM-000Ffq-2d; Fri, 22 Dec 2023 23:51:14 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 13/13] irqchip/ts4800: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:44 +0100 Message-ID: <0bdce86b50e5aa50cffbc4add332cbfbad87521e.1703284359.git.u.kleine-koenig@pengutronix.de> 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=1756; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=9P+LbVGo/TTFNAJ4I3GeO7ieNbGzcoms9p3NIoglRlk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLGp3MhPzeMepy+cjVPc+NFm3S9EHw6HmeBh C7a4Nuop7OJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSxgAKCRCPgPtYfRL+ TmboB/9qmaYqiy97cqHTGGuAQvFVvZN4gGMqto4Kaaf0xFalfX9pPt9PfNIz/7t+QxpeotlQFgS /46uwjiI6Y6L1SPM/zHhu4nCz1w45mE6n3UKrpUa6uzDhRBPSmgD9IMBSFP8UUDDXM4gzVipw/i QLqjO/jZ8fVNs/JTgSgCBHY+az5lkrqaY5LuuceqGDp/CIx9hAzAJbpm8gF0gn5ATmpKIiUISf4 Y1xADOcIOkLrJ/ExX815lXkXnH2NhgyPkH0air7oi+r0ajNbIjAVhpELfUB7r1WLf78cDRpHA9H LXGXg6e5DbirV+XyQ/LNyzCg5NLQsC/CG7EHB42w4kO/Mipv 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: 1786024394529673323 X-GMAIL-MSGID: 1786024394529673323 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/irqchip/irq-ts4800.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-ts4800.c b/drivers/irqchip/irq-ts4800.c index b2d61d4f6fe6..c69a819f099c 100644 --- a/drivers/irqchip/irq-ts4800.c +++ b/drivers/irqchip/irq-ts4800.c @@ -139,13 +139,11 @@ static int ts4800_ic_probe(struct platform_device *pdev) return 0; } -static int ts4800_ic_remove(struct platform_device *pdev) +static void ts4800_ic_remove(struct platform_device *pdev) { struct ts4800_irq_data *data = platform_get_drvdata(pdev); irq_domain_remove(data->domain); - - return 0; } static const struct of_device_id ts4800_ic_of_match[] = { @@ -156,7 +154,7 @@ MODULE_DEVICE_TABLE(of, ts4800_ic_of_match); static struct platform_driver ts4800_ic_driver = { .probe = ts4800_ic_probe, - .remove = ts4800_ic_remove, + .remove_new = ts4800_ic_remove, .driver = { .name = "ts4800-irqc", .of_match_table = ts4800_ic_of_match,