From patchwork Fri Dec 22 22:50:32 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: 182791 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371178dyi; Fri, 22 Dec 2023 14:52:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/BbRza9mdsSzlJzxwVecXVB8GYyl58T2HmsvKRVX5H6vvZQ7bjKFKw0pKvpsAUq5P/V1L X-Received: by 2002:a17:902:e84d:b0:1d4:35b7:35f9 with SMTP id t13-20020a170902e84d00b001d435b735f9mr305325plg.34.1703285535884; Fri, 22 Dec 2023 14:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285535; cv=none; d=google.com; s=arc-20160816; b=JJFWkNgqkYVZ+K7oVFlQOFztdReRV4nqt01fn/CBXa5IwVYkA0DsCnnUH2Tv9x7m6l FxFQZ2YdWrJyykva39E17Pu6cG+Yxcwk9TccKpFYO0wyvJwayVi9UQvIv6fa6aBqcQ+g VWJGMZxM4LA95ktNyJMcOUD/yLsI2bICssMkylapewsvm1yZcXUoQIAnFh0HQZgB19Mq oM3vLkl887hsb90cPy9AyO7iqfK/GlLKYb+H5EUojcB35inq1lTxV2diqctdwe85ks40 4CIE1TsQjyLgdPEyXDbE6pWJs7xJGnD2YA+KewFUZyiL9stdsOzcIazQaIp6R5rNrrP5 8Y0g== 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=fNzfWq1M39TgiT2+Dq9sRCypc7D7ktvH46WSe4JEnWU=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=OhX0IsV98ZDmVrvZNePL2V9AJMNW3Ms70CLKelVH8J1tIldsaYSVVhzxxkeUpaiXJU Pg/tkWphtqbqXHUvn+hBWzDry+YLRhEHcynS6iiJdJ3sw3e8664XlphPEZwCT3v0Tj3q mp7rHLuCJI+iAue5eSBjYjRz/1SCA8RRGBT1auNNrMwXUqQNOvWnM3nkV5XrtO8a7qMW l83YN6BQKvzIS53ADxdQLyFMjFEmKnfmiSHLNYNOycmeJb9M5r6Y+eSdFxVLqu7Haqzk JcKOwKSA31fMevwF6wgZSgPP0rUwUsnzzBrwOO99Gu4woaFCfLHYKRzpFF/T+rAFyqn2 OfBg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10091-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10091-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d5-20020a170902728500b001d406f83496si3394448pll.398.2023.12.22.14.52.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:52:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10091-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10091-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10091-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9EC39B2101E for ; Fri, 22 Dec 2023 22:52:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1336231757; Fri, 22 Dec 2023 22:51:20 +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 3FA1E2EAFA for ; Fri, 22 Dec 2023 22:51: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 1rGoMK-0005ZU-RX; Fri, 22 Dec 2023 23:51:12 +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 1rGoMJ-000quv-CD; Fri, 22 Dec 2023 23:51:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000Ff4-1G; Fri, 22 Dec 2023 23:51:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 01/13] irqchip/imgpdc: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:32 +0100 Message-ID: <472fc6f6bcd54b73f8af206d079a80cb8744d0ca.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=1698; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=ikkg4JLsV23pZpK+eXaO/MNjdovcQlGL4kRwoXR9+eQ=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtQ2oR3rk4JSF9mdDfhk+6o3Y+ZUM7XqrHiNO2F7OyxE9 /SJdnZ1MhqzMDByMciKKbLYN67JtKqSi+xc++8yzCBWJpApDFycAjARh0L2f6pVXTPsjf3vRq78 p+1ab/Lj7GY5e+nkh3f1Uybzusz9GnX456zNSZ/uzZ1X5Bh4sq8mf9a5ktPlV0qdXh66VGqzhP2 6dPc7C21nPmm1xrUbe9dK+MTFsUyelS1zzDBgk96b5HW+yg45l5peTLTKYZ5+gpnZal2xjv2zx2 nqniUVk74b+dw4Z5n+PJl1bvh8Fctc9Zj/G1amROiFzys+InujQfKD/QbvGYExWXlhTh+W/Zy+v yP0Zte5A/3qF89VfZoZyXf80dzY3IPRUluKQ3fpHvd6aZD0gclp2SO3iZFMDzvmmpvZxme09cbW eUlLsZf+jl9jH/7EQtz9oePi/1lml3bHLD79zENFi9kRAA== 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: 1786024334348064554 X-GMAIL-MSGID: 1786024334348064554 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-imgpdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c index 5831be454673..be7451c52f3b 100644 --- a/drivers/irqchip/irq-imgpdc.c +++ b/drivers/irqchip/irq-imgpdc.c @@ -461,12 +461,11 @@ static int pdc_intc_probe(struct platform_device *pdev) return ret; } -static int pdc_intc_remove(struct platform_device *pdev) +static void pdc_intc_remove(struct platform_device *pdev) { struct pdc_intc_priv *priv = platform_get_drvdata(pdev); irq_domain_remove(priv->domain); - return 0; } static const struct of_device_id pdc_intc_match[] = { @@ -480,7 +479,7 @@ static struct platform_driver pdc_intc_driver = { .of_match_table = pdc_intc_match, }, .probe = pdc_intc_probe, - .remove = pdc_intc_remove, + .remove_new = pdc_intc_remove, }; static int __init pdc_intc_init(void) From patchwork Fri Dec 22 22:50:33 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: 182798 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371814dyi; Fri, 22 Dec 2023 14:54:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWKDA2AOnw04xb0QM7X1aCMq3WoRgF6shUg0HpNb1z9HkdvEHvWXH2OOcUrfHlm2Use8DL X-Received: by 2002:a05:6a00:2af:b0:6d9:93f1:dfe1 with SMTP id q15-20020a056a0002af00b006d993f1dfe1mr789169pfs.5.1703285657243; Fri, 22 Dec 2023 14:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285657; cv=none; d=google.com; s=arc-20160816; b=LiQa/rDeQch8883Ji/bDt1N88eeO7UgQI1jwZ8toUCQpt+JOqs2Azhrp+t9hcfYqol KeY8e83dHFdKXPh8wJ5uVTiFKTIQoSJhhq7nnuHsY95x/7uNq4YytqRcUs8tI/A77pjy uigi2Z8YwuHBBGdqrris1l9H8FWP/1Y78vQQz4wzwsS4ZeiM0mv4tShWh0e3Lwp7Qm5N ld9adckyahm67KStnL0R4vJ8ipFDkdPTDB0mXV76CfTCznMEds0oJaWOP6dfXaCzQIAl WDJ4Pl1TrZJ3H8BLOrpk+1FokM3Z4gwxwwim5D2H1Xws73mGMOpS/8V+rqMM4og+csGo bZyw== 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=XjuM9OCJRDwjYrfDyUzbBy8oQyOLp1qPzrmWQx0dTGM=; fh=/7k3G5kYgdzNREH7N5X6ApKxsFgwBo/+qx/r7G5UAw8=; b=PIQHzcdbF9t5+rRFg67hGC8UXbd7CS6kdbUMshekrWoe4Cm+EJ9j/hQGolmKuhWw84 1BOJX0q2I9NEP/KEzPWMDWnBvhY9KUEZZz2EJM58olG/Ffbr0IfBXa9AIRLVPjrCAh1T bR662ecGAn6Cm7iMQMPfeKtSEiVyzomSTkcM+nNc96nV5FJMbaHUlICbct7ELevSzw8K DKsyJVXnWPtgutYmmo4kmEhJNmYuUC1Ip7YVbvp3ncpMRbyUhWGy+uHjaUOLZJJAsZip XasVzvwt1dYu+9tr6MnKpg+Lpk3R4ra9rWx8eSsq7GttNGcus3+/heXpfRKEL470EaAw xmrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10101-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10101-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id cj22-20020a056a00299600b006d99b0fc958si395503pfb.155.2023.12.22.14.54.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:54:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10101-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10101-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10101-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 08CC7B23E2A for ; Fri, 22 Dec 2023 22:54:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1063E3987B; Fri, 22 Dec 2023 22:51:28 +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 0981F381BE for ; Fri, 22 Dec 2023 22:51:24 +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 1rGoML-0005Zb-AE; Fri, 22 Dec 2023 23:51:13 +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 1rGoMJ-000quy-IS; Fri, 22 Dec 2023 23:51:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000Ff8-1s; Fri, 22 Dec 2023 23:51:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 02/13] irqchip/imx-intmux: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:33 +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=1784; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=4EOrr+KkEGskg0P1J9XoWIGL8rKAKsaZhlgGBH5sOgo=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK5wCvDc6ILPQThuf+7sez3z1TdJh7yxJ24I 1sfizwPvvyJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSuQAKCRCPgPtYfRL+ TurYB/9xFiFUgWxcVzchQkEssIjqdO3bOh0+LZnN5kDZlcdcvByn6cNaEDhBNexJcJBzYHNqcnv 4Y4PM8PpVw07Bq2T3PpWwyP50Qnqx+hAL8ULOFvYY8FSL88chdUC5ERpkqPXXwugOuInqnoMzIE m/3922hXTJ7IZIxDJbL/0aXIGWbdsZPI9l1GNAXPCSgdvgMNKqXNiRTQ0yv5xDEzZ+ZbJ77DJwS u5rQ2hFjE6rmzQ11yq66KKK8onKBiJgc6JtsTX4FCuMXJuv3OQQXFh7P0Tltq7CCLd/rixwmIjJ +xfL9Fwyh4PYJRDuPXh8xuwM2kJ4rSYwz06GqW4YRIk9exUk 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: 1786024461383709780 X-GMAIL-MSGID: 1786024461383709780 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-imx-intmux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c index aa041e4dfee0..de292bde058f 100644 --- a/drivers/irqchip/irq-imx-intmux.c +++ b/drivers/irqchip/irq-imx-intmux.c @@ -282,7 +282,7 @@ static int imx_intmux_probe(struct platform_device *pdev) return ret; } -static int imx_intmux_remove(struct platform_device *pdev) +static void imx_intmux_remove(struct platform_device *pdev) { struct intmux_data *data = platform_get_drvdata(pdev); int i; @@ -298,8 +298,6 @@ static int imx_intmux_remove(struct platform_device *pdev) } pm_runtime_disable(&pdev->dev); - - return 0; } #ifdef CONFIG_PM @@ -359,6 +357,6 @@ static struct platform_driver imx_intmux_driver = { .pm = &imx_intmux_pm_ops, }, .probe = imx_intmux_probe, - .remove = imx_intmux_remove, + .remove_new = imx_intmux_remove, }; builtin_platform_driver(imx_intmux_driver); From patchwork Fri Dec 22 22:50:34 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: 182799 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371899dyi; Fri, 22 Dec 2023 14:54:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5/4ys9V1cjCP1gv8DQYdvjQEpPIcExUGsZBZvNJVxOAP8TMLviyKM0dghGWSg6/q751zw X-Received: by 2002:a05:6214:509e:b0:67a:a72d:fbc3 with SMTP id kk30-20020a056214509e00b0067aa72dfbc3mr4138866qvb.65.1703285669633; Fri, 22 Dec 2023 14:54:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285669; cv=none; d=google.com; s=arc-20160816; b=TYXW1lSEQaAzKqz/ECwcmxBKLpmK3EeATrFAmSBS5kFFl5If3W7KD0Emmd3VyLjDBz YHIzgNTyI9TcyyZc+os9zNjmPKu6Rj1E49kT61z21fZsZG3LOGUR/G+E8teFKwq1H8Tg 7RLFvg9jskZ6AnfpMU127ljz4nRODpp9RExPkBfETn/prxjKmsCyEsDP+Huid5q0sXLT +bh5LtcuHWQoNlfaqidCbXcKLphWBuQOWFweasMwOUY5k87bbw8SH7TyNxLsPwV3hLeK /d2ZzqaSZtt/wgRtN3L/lWX8GqeRrkUeozU7InGxj0i+N9pQXY06qXjcZyiVW+7+WeJX /ogg== 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=EoNta1dtKSyZz4ucdS/hyuhoZVoMCIQkrFp6Lysn4pw=; fh=/7k3G5kYgdzNREH7N5X6ApKxsFgwBo/+qx/r7G5UAw8=; b=IIyQslZ0Fxns3OSznMD9Sie5eb2VWTYwWqGkFgM1aLOCUaoypXfTcxMCWvDyYql1Yl YVQoV6IlUQ5jt9mAwH23NgODOoY7Pxpo7EUyuW95bI8OufhMuXQDQa0NktmZVvo+TFOA D043QKC+fk2PSPMa0/XN4zo8kOpD1fcYkjzXYI8zFs1eaSCmsx9VOzdhCvRSQwg3qk7c n1a1pwLhjtLFDqP9/pIghX0g4PZJJmJWJL2Bqx9sKKn4evzCYk8h/Z8CqJafP8FWaXwT YIB/D4YswcmbQJeF54hi+VJQtf1gH9KFOzY8Wxxv01/FrKKHKfMTFItwSmSof+fOxlng FBKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10104-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10104-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 u21-20020a0cb415000000b0067f235a34bcsi5133867qve.79.2023.12.22.14.54.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:54:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10104-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-10104-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10104-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 6C98D1C22D20 for ; Fri, 22 Dec 2023 22:54:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85CB03BB36; Fri, 22 Dec 2023 22:51: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 C8BCC1EB43 for ; Fri, 22 Dec 2023 22:51:25 +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 1rGoML-0005Zf-AD; Fri, 22 Dec 2023 23:51:13 +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 1rGoMJ-000qv1-PE; Fri, 22 Dec 2023 23:51:12 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000FfC-2Y; Fri, 22 Dec 2023 23:51:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 03/13] irqchip/imx-irqsteer: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:34 +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=1880; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=xfWwPsMpemUSHTIcU/EikGDBKd36foZe+1G4fTs3hqo=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK6Fur6CUd1UOKaLZ5K33vkMMIOKWjwsqHiH 25whVgrJMeJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSugAKCRCPgPtYfRL+ TmM1B/0dtKRdQR04yQXFSmzwaKbsX5SOncdt4JztEDpjk9maci6FPNbO2abC9u92f4VLYrEnQbO WyEdYipdt3kPefqWG8bmhncSmyWaAK5Q95KMUDzm+zD66K5GQM9YjaZrGXyALfPMUAK2mHx5563 4aZblITVqigT8nGGU2xr0oI4OGTlBTBCJrYF65ypXXvXJbubUiMrnk/Pdfw2iHWkuLKvNH5Xcue SlDTOQuUDCUMGtkmkC7aS/xJfTHZGAP2gQwrLKx5ewD5ahv+L391QchrYo3AYQsLCRPeuWuj5qP 3eUQObHtwIkaRfDnEh9PCXgEqAXakiYb81I+xLYTBkygm3v1 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: 1786024474557297493 X-GMAIL-MSGID: 1786024474557297493 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-imx-irqsteer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c index bd9543314539..05f6b5e8370d 100644 --- a/drivers/irqchip/irq-imx-irqsteer.c +++ b/drivers/irqchip/irq-imx-irqsteer.c @@ -231,7 +231,7 @@ static int imx_irqsteer_probe(struct platform_device *pdev) return ret; } -static int imx_irqsteer_remove(struct platform_device *pdev) +static void imx_irqsteer_remove(struct platform_device *pdev) { struct irqsteer_data *irqsteer_data = platform_get_drvdata(pdev); int i; @@ -243,8 +243,6 @@ static int imx_irqsteer_remove(struct platform_device *pdev) irq_domain_remove(irqsteer_data->domain); clk_disable_unprepare(irqsteer_data->ipg_clk); - - return 0; } #ifdef CONFIG_PM @@ -312,6 +310,6 @@ static struct platform_driver imx_irqsteer_driver = { .pm = &imx_irqsteer_pm_ops, }, .probe = imx_irqsteer_probe, - .remove = imx_irqsteer_remove, + .remove_new = imx_irqsteer_remove, }; builtin_platform_driver(imx_irqsteer_driver); From patchwork Fri Dec 22 22:50:35 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: 182793 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371274dyi; Fri, 22 Dec 2023 14:52:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1ajhhBmdfymNLevDkOm87NJY/x6pXTuR4YuADlY+SKms0sWJb7zIzbIIXcP7Ueq6/K+NN X-Received: by 2002:a05:622a:190c:b0:425:4043:8d50 with SMTP id w12-20020a05622a190c00b0042540438d50mr2608564qtc.107.1703285551986; Fri, 22 Dec 2023 14:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285551; cv=none; d=google.com; s=arc-20160816; b=CWooXpS+VSzPnpAfBJbarZXWg9rnrRaNm5SrN9/DKTIog4TjQcCCxJFIPGlXT/0cYm W+HA1Wjup87q4cBNhErri7QeiaIXBKD5oGDrmiQs9ojX5wO1vZzqitnK4hQARNpbJV52 R8X2phB1LqfVXyF8I0g9Em2v6AfKB06g70m9RUvBTUxZMiAk+SWyNsLHnIZeKyGMnIP7 QHNfkeQrkPTmhDZEGKj0+g1Ydf+h6obKkCe9QNZHVmvG4ACY6ZpdwJ9ES1yJVwATCAZq I81x53d6l57LlkDVKrWtS4upfLCIfwE8ZCrPXJU0N+91VUkdCFIwlH53ahhbPDFzVJ6e La6A== 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=IRfgm6czYth1rKzdGje9RSuqEU2aVnXjXmQeqBvoKEo=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=SdGEr41PA+ahh0GPAy0SXSqanI4IK0iOkseoxCHWweJIOwpi3wIIjGSvADjqElHxvm sKz/bE3A9NMa1qO3MArczeFpo7XwDjVvaDlb2igKtRXILzCp/EVd2N0rOMGRtTod8Jek pdIcGqCUaR0WbD5jBF/06IBMVZObd95x0H+KX4NlYUALOnHHVINSz4qSVro0SwthNAml IurnJhu/PGzGr3wmjAmAWHBrLdrSQcKFSiN698VhLqIHKmTuAzoCk2lmICbXVUaUdS4g MdaHJkn0sE+NcD6EB+qVnIdsnddK9RUCkItoTnZd0/gZD7gK3aa+VqCpEUtcsq1hNtYZ ixmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10095-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10095-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 fg21-20020a05622a581500b004239e77fc70si5606457qtb.796.2023.12.22.14.52.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:52:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10095-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-10095-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10095-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 C5E291C22ABC for ; Fri, 22 Dec 2023 22:52:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4D643308C; Fri, 22 Dec 2023 22:51:20 +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 A1E812EAFD for ; Fri, 22 Dec 2023 22:51: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 1rGoML-0005aA-FC; Fri, 22 Dec 2023 23:51:13 +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 1rGoMJ-000qv5-VE; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoMK-000FfG-39; Fri, 22 Dec 2023 23:51:12 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 04/13] irqchip/keystone: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:35 +0100 Message-ID: <4c852a3359aa06bedcf3a10f3fd8c1e008cc5a3a.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=1968; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=+EDCUP6ePG/o+3slA3AQpIK7gkTvq8KdHgzdFcR2yug=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK7wEMzZpDvgUxYeqw07y4uj4q89h2lKndDj gIK7Plj5u2JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSuwAKCRCPgPtYfRL+ Tql4CACibtjb7MoMPwK/QFusOJrRV/PTZB0AK1KY73AwyE6W0xfcGAHQMsdXhy6e71UZL6JpVr/ P920+t1qHobfHNZHgpZMFLOiRlIEHWJ4KVpEUuNxHSUa9zQzNpPZLpKwmgnhSlXTzT6+XU/tmXj HQCLEVFfT0v9XcYCiJ57oFu1dFDXsOXr0yVzztk8s6WKL8j2Hr1MrRFki+WTWN/Lo8MPGOrPHG0 nL7V4RHDcGysnieTH3mg7tEdoyOfir/aPgFD8bIDR1GwXf4NLgXhahVBXdH+MTBdQdLr8nG/8nL 8dmlDQ9FhM9/o6EzydOvIOwWginPpiCLxDr7j06R6z48wDUp 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: 1786024350819477979 X-GMAIL-MSGID: 1786024350819477979 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-keystone.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c index a36396db4b08..30f1979fa124 100644 --- a/drivers/irqchip/irq-keystone.c +++ b/drivers/irqchip/irq-keystone.c @@ -190,7 +190,7 @@ static int keystone_irq_probe(struct platform_device *pdev) return 0; } -static int keystone_irq_remove(struct platform_device *pdev) +static void keystone_irq_remove(struct platform_device *pdev) { struct keystone_irq_device *kirq = platform_get_drvdata(pdev); int hwirq; @@ -201,7 +201,6 @@ static int keystone_irq_remove(struct platform_device *pdev) irq_dispose_mapping(irq_find_mapping(kirq->irqd, hwirq)); irq_domain_remove(kirq->irqd); - return 0; } static const struct of_device_id keystone_irq_dt_ids[] = { @@ -212,7 +211,7 @@ MODULE_DEVICE_TABLE(of, keystone_irq_dt_ids); static struct platform_driver keystone_irq_device_driver = { .probe = keystone_irq_probe, - .remove = keystone_irq_remove, + .remove_new = keystone_irq_remove, .driver = { .name = "keystone_irq", .of_match_table = of_match_ptr(keystone_irq_dt_ids), From patchwork Fri Dec 22 22:50:36 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: 182795 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371502dyi; Fri, 22 Dec 2023 14:53:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmyISEsrtxtsyIJ7NAQnZHXZA+Xc+rpU3ERk7pe0KfZEuQ7vEE4UEWj6mrsHxgoGL0X902 X-Received: by 2002:a05:622a:1491:b0:425:4043:96f3 with SMTP id t17-20020a05622a149100b00425404396f3mr3410689qtx.128.1703285593872; 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=Oy9MmGtpoM2JBBjLkgL23KK1EGH0S6Ts1Vnx9winKFEIK1H3CGorbRJlJH9S41eIT/ FT8hb/GckhIzfAW+0q+H44+4FjM4/PoxJ4VJ7q1sV9kfXv4a+i0tqPg4YxnNF07i3e5a q0iJRNPdvtuTgHBlE9tCG3iDaUOaEK+3RGaVpKB+VVVKpNpIDuORM2IBRBweo3D9065b 4kysMZWfvVS3BicFehh0VvlocP5y6qbepDn32oQvvxNJSapeZsuoenmkjT2nl+8xQiTP qeR0YExRcCrzNVlCXR1WbHw0iytQnsm5ZxIxSZ9B9icdHCafA1IQeYLsUy2833qioZXM bXNg== 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=IBgZL8UxGEidGSKjk16ahlwi2umK7LnpuZYlXHSYFJA=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=SS6nymMNB66ITQ3OFhq2lQVWFJQO+mzEk31xSZh0cU7E0iS9H5qLXA6i4TCPsqlObH piiMdaqJsTpmE+JnSc06bKP38yuWuw/VDDoSB3sewaWZzuo6weQRmenWkyJqc7hwagzM 3E+0R/PklFWdj6zQwhiWrJWJaj5nCEiVfGb4Ir50sk8hLjpakhyPICfVTynCuUTGcCyq nMU0CKwIJFuFKmDZ1dBlazwVoud1aVP0TAm3mUEgHBvOvnOeXK/F3+dcBvnY+Lfw6Bk2 UrrE4rLyJbkvm9goaHrfIjYB/lX4TYvI6t4OvNWNs33Q+93nGJUzRt7twBgNyM3Ugh7R uBfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10096-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10096-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 y15-20020a05622a004f00b00423b9bac0f5si5575429qtw.453.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-10096-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-10096-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10096-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 A8A231C22195 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 EC6B135F11; 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 A1E482EAE2 for ; Fri, 22 Dec 2023 22:51: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 1rGoML-0005b4-L1; Fri, 22 Dec 2023 23:51:13 +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 1rGoMK-000qv8-4a; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfK-0V; Fri, 22 Dec 2023 23:51:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 05/13] irqchip/ls-scfg-msi: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:36 +0100 Message-ID: <1e7143ca68ff0715e0f954504e750fc92e8c6d80.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=1883; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=T1s6nZ+UFXNsHF/tEsghgxMk/3MV7Hfp5CW/lu69Rfk=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK8rTA2Zo9mskRHVQ0jTz8KMEyB9ljzLNQoN +Gi3RlkZuCJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSvAAKCRCPgPtYfRL+ Tvv0B/9h2A9o02TYkvoJ0+giW51E20iTqIUiYdsuoDmXjeHFnDtbR299IamdAInCPp+yIfyGuRA VsaWsYzr/A0+PLFJ+woG/PPCNyNhZCGSfjzsKZ6NqujBynxImio642zaas+u4O74nSTkdD8rxKN ASM+shm9aa+jn337GejBExGpd6Kl4wBO8aTCkbKZrwx6D2B4uHrL/YRy6O1m4ZB9JxzkFazRUAh J/UNcGrak8aKpWszKNPOl3M9WJ88sbxhFyd7WGl7r5Br8L1dCMowGOMnr6GcZIfBW9C/C1IfHiu DKM/VlQbxce3QjIqoW9ma9qGJ0k3lJ/hb9Djkz56O04eOzZt 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: 1786024395040875575 X-GMAIL-MSGID: 1786024395040875575 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-ls-scfg-msi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c index 15cf80b46322..0b9b598b206f 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -398,7 +398,7 @@ static int ls_scfg_msi_probe(struct platform_device *pdev) return 0; } -static int ls_scfg_msi_remove(struct platform_device *pdev) +static void ls_scfg_msi_remove(struct platform_device *pdev) { struct ls_scfg_msi *msi_data = platform_get_drvdata(pdev); int i; @@ -410,8 +410,6 @@ static int ls_scfg_msi_remove(struct platform_device *pdev) irq_domain_remove(msi_data->parent); platform_set_drvdata(pdev, NULL); - - return 0; } static struct platform_driver ls_scfg_msi_driver = { @@ -420,7 +418,7 @@ static struct platform_driver ls_scfg_msi_driver = { .of_match_table = ls_scfg_msi_id, }, .probe = ls_scfg_msi_probe, - .remove = ls_scfg_msi_remove, + .remove_new = ls_scfg_msi_remove, }; module_platform_driver(ls_scfg_msi_driver); From patchwork Fri Dec 22 22:50:37 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: 182800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371917dyi; Fri, 22 Dec 2023 14:54:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGAiAaBkLk41srDOlclCd7RAAjSScBm2ToW5TtXHZDM6Sjwa4XSBSR1VLNxLfUyrLM9oZ8 X-Received: by 2002:a05:6e02:144c:b0:35d:59a2:928e with SMTP id p12-20020a056e02144c00b0035d59a2928emr2572159ilo.34.1703285672156; Fri, 22 Dec 2023 14:54:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285672; cv=none; d=google.com; s=arc-20160816; b=PfEPZDky5pNDogz2wOPYug7GHIlLZ0byftw5FOxvx/3ephLV289frU02uPY1XDrFXp Zgubo/XRhU8pVyJMKWTSgq7Hq8CbbOxxxx11wPGuWtuRqCauOy/EgqjMSUrwQiN+yQ5E punO9ynehIbHSDUGpbt55CnaUAOQ5V0KNP0O8NZX7ZLqRCJED+drkbopRkpzxpTvx3g9 ho5RuFmsvRsrZ9KDtlVYN20taCqBWhR1JFJPJlP6/VuR3wK3eLR7dy0FzbTR+zSjmYOy t2b+yIEFTqgFB8DmkcdOdDRa0EbXHycPO7GkIUQmOjrZunLc/j5PnyhQrbAcACbmvLDC FYNA== 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=bv5qLyDC/TWxWnbjpfQ3UzMQDRwoN+k2BOJmy7Nxl2c=; fh=y/J4yqP4R7Toz4N/2ynQUTJwL0qWo8ILRyjY+kDfl/Q=; b=VNb00CR4sUG4TZdBpVl+FvnFfz8lIVloSI9F/ajLYdU3adIfs2140K9VycH8q/8V1G LwjEti09Lo2TUqOVrA9zaFJUZ9x1krbs/pacliP2rt6dfxzyh+4XOSNWESN2Jmrs8tVY PzKIfh8Yd8sqbGSob9wUCscdphBr9l/eOgr4OPvslaogbOENezBiuu6XZKhLs5XZruco lLnlY4DQaPpsgaxqZAvK9/qPKQzghbqNYhqmv6/9BHtXIrmgi3PycxrlwmYR3hjjvHIq a4K0Flour33Let//Y1E3ruKQmAu5PzOPPahYzFg+kgP+1kA+rJLemOCimpu2Xf6oabc5 6jnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10102-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10102-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 t19-20020a6564d3000000b005be34495eedsi1431497pgv.118.2023.12.22.14.54.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:54:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10102-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-10102-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10102-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 CF4F8286BC3 for ; Fri, 22 Dec 2023 22:54:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8C2D3A8EF; Fri, 22 Dec 2023 22:51:28 +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 EF51F2E853 for ; Fri, 22 Dec 2023 22:51:25 +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 1rGoML-0005bm-T8; Fri, 22 Dec 2023 23:51:13 +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 1rGoMK-000qvD-D7; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfO-1L; Fri, 22 Dec 2023 23:51:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Charles Keepax , Richard Fitzgerald , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 06/13] irqchip/madera: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:37 +0100 Message-ID: <64c2f79760c53f29651e7126418c407ff699317d.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=1755; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=oNyOtJmRK/PlWo4BKGbaCJgMzouADPvq3uSryPTzQhI=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK9Y8lRVhNFkK9eJWWYKEZRt6Vy9FJ7h2sj6 VryWfbz2laJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSvQAKCRCPgPtYfRL+ TngFCACHKhMzBPTBKVocA6VfvDGmuukvynuqR9RfEljwyjneu/L12qaidTDwjPFQtNSEm6HZUBa K7ywfUFIwGDqS1YVFVeBCOV8jGXoZQ1+LY1U/MmzIzFuLOaUIu8bU2Rtqzq4dKUaXpuQFQ4XgN/ zHN+B6RKZtpT46Rivq79vpIoz+ujbj3zvTwiti73wKa72M9tvxC8H0l0UV1oqbQtq8wqtMMTNru aZL67AYTcfqSmIXXkOi0XtADOuwcMMChC1mY4F/J7L2+ro3Wf8NrGMpdohxtssProziTgnyhXrJ LUKLwQ6vOC4EWnqbFzHzpsKePslWuOr8y1HurRhaWAvl7i9V 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: 1786024476871595170 X-GMAIL-MSGID: 1786024476871595170 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 Reviewed-by: Richard Fitzgerald --- drivers/irqchip/irq-madera.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-madera.c b/drivers/irqchip/irq-madera.c index 3eb1f8cdf674..b424c0a327f7 100644 --- a/drivers/irqchip/irq-madera.c +++ b/drivers/irqchip/irq-madera.c @@ -222,7 +222,7 @@ static int madera_irq_probe(struct platform_device *pdev) return 0; } -static int madera_irq_remove(struct platform_device *pdev) +static void madera_irq_remove(struct platform_device *pdev) { struct madera *madera = dev_get_drvdata(pdev->dev.parent); @@ -232,13 +232,11 @@ static int madera_irq_remove(struct platform_device *pdev) */ madera->irq_dev = NULL; regmap_del_irq_chip(madera->irq, madera->irq_data); - - return 0; } static struct platform_driver madera_irq_driver = { .probe = &madera_irq_probe, - .remove = &madera_irq_remove, + .remove_new = madera_irq_remove, .driver = { .name = "madera-irq", .pm = &madera_irq_pm_ops, From patchwork Fri Dec 22 22:50:38 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: 182801 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371929dyi; Fri, 22 Dec 2023 14:54:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYsVi1EPxnx2re09iBgvjATbxgMHOMCaYl3QCWxMU9yuhjZsc9xbaGf05TgNSKmKWWppaw X-Received: by 2002:a05:6870:648d:b0:204:48fe:46b with SMTP id cz13-20020a056870648d00b0020448fe046bmr2217886oab.77.1703285673437; Fri, 22 Dec 2023 14:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285673; cv=none; d=google.com; s=arc-20160816; b=K1wNQvfV7TuQsq8+3jnsB5bFc0fyrNQxd7GMk7CaG0f8GyQ7u6s1XNsA86Sz2kZJGU amHlGEDYoSV0rzg+CSX17MhjoioW971hrwvrECpIJa+NKV5FOnPX4IQ6MfxvY1W//nOB ZRD8qUcpc2KgtiVzFO+s9e95JmT+XRA0OOhAhA8N6P92F58pdUYJV28fIIW9QmgiTRM7 /htOG+1qfOU/THgOjjZW52MuYc/DkE671xfmUZrv+VhU1EAhtgbOmv2i9p3EmBK43lO1 GCsoO3jN9mjmqc+mMpcp5non0zjoV1BV7dBDxZ2Vo8O2TzXdIu59d3T/iQo2wD/JKZqW ojCw== 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=3Ob5a0YlomnMvZeb0ia8NW63hfkpeCkHBDIfOIGOs3w=; fh=3Ssjc9RSp5YBCDiXN3Xojrn4Aeyci/39VCtTXbItKyo=; b=XOH2EmdQ4hX92J11kJph24DBpmNCokllI+yY28Job7QnqexreNabsutKb6rTVgv7Az xX8tLn+UBjHxLC9hmMSdGMn+82/lCHHHOwj2cgvBtOMLwuHxuS8rDcd0fJHixGa/F1eS 9qcsUvGEH+Pv3jkPEQSd4cn05IpxxUPh6XYre2ZUJw0KX7fe47uUNvZv/BEFbnNVe6lW m3iPfYMYXM2b0f+sLZBKe4J1XuQ1o19F61w8XtK/mFrAEEGr52n1HLY8t7U9t7o1YGLh usXsa8iMp5tDjRmFgsndpWqV6+G3CJMUBpLLEFBY8vQcqpKy7/IVRre7sFOM47dL8Knk iDpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10103-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10103-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 bw37-20020a056a0204a500b005cdaa16ac24si3984622pgb.238.2023.12.22.14.54.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:54:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10103-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-10103-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10103-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 41F38281622 for ; Fri, 22 Dec 2023 22:54:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D98323A8F5; Fri, 22 Dec 2023 22:51:28 +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 EF4E62E84F for ; Fri, 22 Dec 2023 22:51:25 +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 1rGoMM-0005cI-Bt; Fri, 22 Dec 2023 23:51:14 +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 1rGoMK-000qvH-JV; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfS-1y; Fri, 22 Dec 2023 23:51:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 07/13] irqchip/mvebu-pic: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:38 +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=1815; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=YEdXLtjjB7MdLkwVRjWTzbmlfH5H3E2yBwtLiqFjuN8=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK/qY6qVh1CQvCesFeEHW82L2SThLnfZpHqn YQVEAd4ZOmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSvwAKCRCPgPtYfRL+ ToKsB/0YopidcAoPuZVZY8pzovI6MHDYU0tVfCD6UxIrJpBC2C6kFSoxYL7QN8up16WNvLYE2lR f1gTuaISvFVhWpGshqK81Awjdo4FwaBqZQMEgvVWG3niOKVIZ9WRi+DhoFSh0/uml6a3+Q3YZ5V zopiut6A9xnm6NHJuXcB08ukkBF1uFnSPgEnCk0tZs027gIymP93N83affj48eHQLFkzr74/Qhs gjiH+VFZ3cr4ae03XZq4s5kGp4pL2TS/Y1qVlDNxCQD6OtPxGjNIeo6Rj8xNBL5dr58IANxom1A 1uMIbpQ1Hk3z7J/0DZVCkbhf0PcGbknLCaPIJx0rR6vyLuc1 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: 1786024477902191039 X-GMAIL-MSGID: 1786024477902191039 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 Acked-by: Gregory CLEMENT --- drivers/irqchip/irq-mvebu-pic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c index ef3d3646ccc2..57e3f99b61f5 100644 --- a/drivers/irqchip/irq-mvebu-pic.c +++ b/drivers/irqchip/irq-mvebu-pic.c @@ -167,14 +167,12 @@ static int mvebu_pic_probe(struct platform_device *pdev) return 0; } -static int mvebu_pic_remove(struct platform_device *pdev) +static void mvebu_pic_remove(struct platform_device *pdev) { struct mvebu_pic *pic = platform_get_drvdata(pdev); on_each_cpu(mvebu_pic_disable_percpu_irq, pic, 1); irq_domain_remove(pic->domain); - - return 0; } static const struct of_device_id mvebu_pic_of_match[] = { @@ -185,7 +183,7 @@ MODULE_DEVICE_TABLE(of, mvebu_pic_of_match); static struct platform_driver mvebu_pic_driver = { .probe = mvebu_pic_probe, - .remove = mvebu_pic_remove, + .remove_new = mvebu_pic_remove, .driver = { .name = "mvebu-pic", .of_match_table = mvebu_pic_of_match, From patchwork Fri Dec 22 22:50:39 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: 182789 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371153dyi; Fri, 22 Dec 2023 14:52:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQ2QUZcOIKZjM4fIsr3RGmMaB8vaMnM7wTc7XeugBOGMCJxYFIxQxj2Fu3+JpDphiRvG0e X-Received: by 2002:a17:902:cec4:b0:1d4:1c46:a9b3 with SMTP id d4-20020a170902cec400b001d41c46a9b3mr1717912plg.43.1703285532067; Fri, 22 Dec 2023 14:52:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285532; cv=none; d=google.com; s=arc-20160816; b=mrcIq4sk0FtQ/rlpNdjkSKbgL6NYvwBDEK7Lz0ZbkAHPXuKyAXlwpWzXFgIa5FhALb uulSfoYLqGmaQFXH2z2vHS1h+V8HXdS5nDqZD9SY9JJLkL39VXtyt34Zs09GUmlCrABV mKoPO4PP5a6WVZpu3AxcHQPoOJ1d4LyBp1U/grGiKdu01nPFMsFhP5rUcSbUJgLkAMwQ L0e4IT50s7OMqN1n74plDZ5a92oqhgatB1JuqTqzvQ6C604T9+ssghzssvvnTDp+WNMz rJ0reMxVoxrg305hSXnq8GW4rG+3hGhhAQWHq0ZFG+gAP2eCy0FhAkq+BTPWf25judwO kBvQ== 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=yaamO1kcRxzseVjTX3QsDBaDIh/FKYr+2VV9+eGWh2k=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=DueD0+NatuDwYhJVRPEfMKcL7e8RuPhnxWX5i937zjJph4niHA1H8f0eRpUbNV22bC Q3+7mI+NUKtAdQorUSG/cWKtb3dXGi6p/oTgdSaFDJkPeryc1WIJ+s7iCb7ZLl73mUMY Z5uKo86V19ByxkZfqc+Yo97XihHkzM/NXZ31rQoNTes+VzCL+trntnRNQY3lg6teqEJl mKTFgraSZpdN+EQ6bh1bl2LGUa+NqlUxksProoMUDV2FQrDyxwEWgBXngpWXQdcSPBo8 ELPta8heIAZjeTjV2NF2MyFQVTwJqYxwTVZel4W2Fbfn2hDZweErN+e5uxEwSispNaNb ufsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10092-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10092-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ix22-20020a170902f81600b001d3c00acddbsi3641809plb.652.2023.12.22.14.52.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:52:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10092-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10092-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10092-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 9E4ED283E39 for ; Fri, 22 Dec 2023 22:52:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1519F3175D; Fri, 22 Dec 2023 22:51:20 +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 930282F503 for ; Fri, 22 Dec 2023 22:51:16 +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 1rGoMM-0005cR-8Y; Fri, 22 Dec 2023 23:51:14 +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 1rGoMK-000qvL-PB; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfW-2Y; Fri, 22 Dec 2023 23:51:13 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 08/13] irqchip/pruss-intc: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:39 +0100 Message-ID: <071057cfdc0bc52c574f74156b410c0337adb69c.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=1947; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=zqHuEaXEImwnlCY9D26ACfYfCkuRPJSjdQSURwFRoRw=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtQ2oQOndrv++VI/M4H9w4wjfYf+qlmx3z0/zTJTOSrA/ JHM2ZTYTkZjFgZGLgZZMUUW+8Y1mVZVcpGda/9dhhnEygQyhYGLUwAmkt7H/oej4u+LBMdiBTGt taGZh1Q+6npnKR2q0xM/8rryX8CFqKd3U3pSDufzVPZenBRauOL3nczPNotFi6pKpytkOtW8Cbh dXRvrcPlJi9h2Xhat01NCdXySb8paZ5mmeabeufOp/aiKp5zILcUpfi1sNb8+P7577uKnrxcS69 9/Xj9lsY5BzNe0syKb196s8fyavO3QWakftxftqnbz/Zykfv5EEu/DlwuNH+XnRUbNtbTT7v0dn Z5ooVQek9KnX8H8zeugl4p6gKfv/UTJ8xmCZ5e7nflYkMh8nz2sqna1mP0+s5XbPn2ymr5btWCz 7xaDbxcdZputDmiNZP5REsTR2e+y/nCE2Ywo10Nu9Zn7AA== 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: 1786024329669664448 X-GMAIL-MSGID: 1786024329669664448 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-pruss-intc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c index 0f64ecb9b1f4..6daefa7c87bf 100644 --- a/drivers/irqchip/irq-pruss-intc.c +++ b/drivers/irqchip/irq-pruss-intc.c @@ -599,7 +599,7 @@ static int pruss_intc_probe(struct platform_device *pdev) return ret; } -static int pruss_intc_remove(struct platform_device *pdev) +static void pruss_intc_remove(struct platform_device *pdev) { struct pruss_intc *intc = platform_get_drvdata(pdev); u8 max_system_events = intc->soc_config->num_system_events; @@ -616,8 +616,6 @@ static int pruss_intc_remove(struct platform_device *pdev) irq_dispose_mapping(irq_find_mapping(intc->domain, hwirq)); irq_domain_remove(intc->domain); - - return 0; } static const struct pruss_intc_match_data pruss_intc_data = { @@ -650,7 +648,7 @@ static struct platform_driver pruss_intc_driver = { .suppress_bind_attrs = true, }, .probe = pruss_intc_probe, - .remove = pruss_intc_remove, + .remove_new = pruss_intc_remove, }; module_platform_driver(pruss_intc_driver); From patchwork Fri Dec 22 22:50:40 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: 182796 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371549dyi; Fri, 22 Dec 2023 14:53:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqDKCqCjG6inm3MzP62S4TrSzie4KPNaZLXYzBOrnk6GIv547xPXS+HP/hxuPrDancV7hF X-Received: by 2002:a05:6870:41d5:b0:1fb:a96:bd76 with SMTP id z21-20020a05687041d500b001fb0a96bd76mr2885055oac.15.1703285604383; Fri, 22 Dec 2023 14:53:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285604; cv=none; d=google.com; s=arc-20160816; b=xXBE3A94DuCp4xHxDoM20HIDlDx12+uo1563ZxTUbuSn+Dz1m3RHEt/gTBUFhm1Saw VqraDWxxqwHPcDPZEo5/BveBXUeAyE6bDXhrADeRDjywSJ3CEXOMmGShOXZUF1pKEjng qwoMP0IDnz/Xoy3HgIEMzbpP6frdgc6w1ifQDzRA45oauAA94c8UHH3FFS7jTvdNmy9m 2BWaMKj5LPDihfHm4wBBI6gImkcsrEY5dMHsgw2oE01xqATbYrfUBofo708S/IlSuBq+ 3UCEtM6wcQaUjgNKqacns9fcmX591fTib9OAi4Lyt03UXIm6uc5+8mvUYmF1SFVlINVP Dw3w== 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=J2JKbk4Sj92M33BnDrYq3YyiWnTPPvLZPiZutMesPEI=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=kOxjlfDxg2Zf7bunVktoem1CWaRm/VZTAmAdLbXj7bi22sPyCAsTzQnthcLEkN290t njCqnFQ0KzkWWA5sAWkja6gB3m5rq/iO5ntYOn9YRaeJURIbx30BfoL6zSCzJ7xoaLFN 2d1mbBA/RAZu8Z6V+HWfZctP3NM2lcI8Df8XDJnUYgAqAiv1TenYCquQwlrvkqQPkfeZ 7hIHn45kdec4VJKN3/CwEJpHCQCEpYHLcLQyl9FuGwHuF6b8NIAnH6fDi0NuOBu81cyO XfgGI89cNPMJfhshaGGk2hbg+il53WOHs5VWSsplgY/MM+zroSHMojzZ0h8KQK4JqK0e Drlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10098-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10098-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n187-20020a6340c4000000b005cdfc6a7982si1074785pga.312.2023.12.22.14.53.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:53:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10098-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10098-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10098-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 252D8B2222E for ; Fri, 22 Dec 2023 22:53:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F171035F15; 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 B20092F52A for ; Fri, 22 Dec 2023 22:51:16 +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 1rGoMM-0005d3-GQ; Fri, 22 Dec 2023 23:51:14 +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 1rGoMK-000qvP-Vp; 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-000Ffa-00; 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 09/13] irqchip/renesas-intc-irqpin: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:40 +0100 Message-ID: <6dc03cf63382d24f954c167aaa988f8e31d6b89d.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=1951; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=EKV4srlNWNOnWsCdCeZKIamXZGGpGXN+FOJhjjqDpnQ=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLBMcLIRm4Fn3o0htbqDSG0GLVzvYibnLsko 1zh9ZvKmXOJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSwQAKCRCPgPtYfRL+ TmtGB/oDXf+zULXmpxsxQh1t0lCC/BYHVX+wTolPVew/VD0Wp4cKkG4E1blL5qZl803SQwiYXwE bdx2R0Fx1NNZ0WpSFeB1SANiewzBGca0W73hTjNeIT2cqlYwWxo4MTgdNaGdLpEidaRZY78kJLy rVOFxJkufmkOur3PejIrXOFLc1heJTbKTqTaijc5WTcobEGpcdtmsMm+pFYltyw8DayW3Pdc2z5 F/ksE2HjOwry2GNqYRRY3LlEZB43pJrr9FHCvL/Bm8ig+inSLVK6PlOnSlv8aNJUEC82tStuLEa SRYW1AqB5bQHWN2uo9521jh9QtdBfZ+gj0dPrwpauul6W2bd 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: 1786024405436267091 X-GMAIL-MSGID: 1786024405436267091 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-renesas-intc-irqpin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c index fa19585f3dee..939293bc274e 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -561,14 +561,13 @@ static int intc_irqpin_probe(struct platform_device *pdev) return ret; } -static int intc_irqpin_remove(struct platform_device *pdev) +static void intc_irqpin_remove(struct platform_device *pdev) { struct intc_irqpin_priv *p = platform_get_drvdata(pdev); irq_domain_remove(p->irq_domain); pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); - return 0; } static int __maybe_unused intc_irqpin_suspend(struct device *dev) @@ -585,7 +584,7 @@ static SIMPLE_DEV_PM_OPS(intc_irqpin_pm_ops, intc_irqpin_suspend, NULL); static struct platform_driver intc_irqpin_device_driver = { .probe = intc_irqpin_probe, - .remove = intc_irqpin_remove, + .remove_new = intc_irqpin_remove, .driver = { .name = "renesas_intc_irqpin", .of_match_table = intc_irqpin_dt_ids, From patchwork Fri Dec 22 22:50: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: 182790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371169dyi; Fri, 22 Dec 2023 14:52:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEs1ljFpx3eR1DV1pgNxmFZFHQxqvjsFWO0Ko/F6TyQnrH7UTpFgo8ujCa3pnTZBT90iLfY X-Received: by 2002:a05:6870:d60f:b0:204:492b:c1ce with SMTP id a15-20020a056870d60f00b00204492bc1cemr2013335oaq.82.1703285534401; Fri, 22 Dec 2023 14:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285534; cv=none; d=google.com; s=arc-20160816; b=YmXEVRZ7oWdPpH5wdobyerucCo6M9gbOmGPuIEy69jbc7t4ABFz5hN01QLOC4tqIn7 zHdwRREGY65T08gJihdVc7mqhHcnC/rxy6mNFdjGOiZDjqTzV/xHEOIxRBXZAAZj1bMG kvC3iv/qPMXiD5y8E/gO8TzqrTysYU9xRExqmGKHsDbsjmiyhrIEbEN0gPYRdYn2rFLc 0tx5vzjZP348zSuK3BKuKVVoIiJt2LNbV09TUEgv0z+D8WtPJBgRgZpc87OHkMtBQDaK 78X/dF+e5xym2+dCdd8DSkZ3LivaN9MKEpLhHeeIBm4k3M5pJXXNPHqXJ8GvXI7Tllov 5hMw== 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=19Iq/ONWaXQAxdTnaMbWy1IMUHmdgBgTKlL55pT+B/s=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=VCsPth/J3U2n3nEUycLcFSGOMU8o4VGPMV4q/BMpBq0PkAra5hBJV6UCkiPaDAfLuK eiF2XCFw6vz5/mc0dmNRh1S/+/88YSmjrnXdEzvlpWvLi6QHaWySPd6Kb+78gKB5J6Qy szaSqerWhjqocW+mNs49k0N5ZPP7aZIOqh2oiWAn5CZ+Q5Th9Lr5WNpBTwW5PsorrNCV V55N5VuzhrAPyi+/tnlnNhCWKw6qS3/Hx9kyosoGxi1RsRet25fc0OrbEwlyOECXtsEn HBbVA9KfVmMQQajQa+gWhK4GNpbTrLxfnzgTbGh9DPUpKs1Qbvhv33tOuVrBCN9YzxW0 N7kA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10093-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bz14-20020a056a02060e00b005c63a36938fsi3838373pgb.809.2023.12.22.14.52.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:52:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10093-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 28BBF283C4C for ; Fri, 22 Dec 2023 22:52:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 272FD32188; Fri, 22 Dec 2023 22:51:20 +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 B20302F535 for ; Fri, 22 Dec 2023 22:51:16 +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 1rGoMM-0005eq-Pk; Fri, 22 Dec 2023 23:51:14 +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-000qvS-5O; 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-000Ffe-0a; 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 10/13] irqchip/renesas-irqc: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:41 +0100 Message-ID: <2d367ab738ed2e4cf58cffc10d64b0cbe8a1322c.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=1804; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=RbqlBUDyzNjJon1VjvvsSpLOKIrzb9IWsFsQQCiOHOs=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLCVKR7Dii+2+5hAaBXjQ5/Enl4dufiFJZ0x jLGSzewFjqJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSwgAKCRCPgPtYfRL+ TirvCACSQbDFKgHkODHm4EXqgX2Vuvl/DG6J6UhiYVJAd7U0cxPHzyxMmODqfiYB8dNKEnJPGVH 4FQxt11lrVOO/dhCckci/i8HHxPTBspbYYsb5F7IauDcdyzZ359zqd5L2MwKDUeE2xXSV+cW1KN w44SgmCGJ6i0W0tt1a08bmkX2ezW9poFgyAoOdmdWLmCwdoHXJNqADzDEoVeIL+UuyqjGf1FH8B u295ZZ4KWO5qTs1xRrFKFD9H3dbxQP6enA0nvZ9Dkp+xhfMypEc8hsJuj9lgI6TTMZ4zZx8LFZC itfj1XF5KF6U6iBrXqAntwuhDf2pA5eRWhNaQiT1jsGHErL9 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: 1786024332543617711 X-GMAIL-MSGID: 1786024332543617711 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-renesas-irqc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c index 49b446b396f9..2bcf14d0f34b 100644 --- a/drivers/irqchip/irq-renesas-irqc.c +++ b/drivers/irqchip/irq-renesas-irqc.c @@ -218,14 +218,13 @@ static int irqc_probe(struct platform_device *pdev) return ret; } -static int irqc_remove(struct platform_device *pdev) +static void irqc_remove(struct platform_device *pdev) { struct irqc_priv *p = platform_get_drvdata(pdev); irq_domain_remove(p->irq_domain); pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); - return 0; } static int __maybe_unused irqc_suspend(struct device *dev) @@ -248,7 +247,7 @@ MODULE_DEVICE_TABLE(of, irqc_dt_ids); static struct platform_driver irqc_device_driver = { .probe = irqc_probe, - .remove = irqc_remove, + .remove_new = irqc_remove, .driver = { .name = "renesas_irqc", .of_match_table = irqc_dt_ids, From patchwork Fri Dec 22 22:50:42 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: 182792 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371193dyi; Fri, 22 Dec 2023 14:52:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IErA9J72alH7kEz6kjdBcnnJPLsqGp6ZyrR3tIlo9JDOZAFpJXH8/LiLjzxhVdlCDrIp/QB X-Received: by 2002:a17:906:947:b0:a23:5939:759e with SMTP id j7-20020a170906094700b00a235939759emr2168285ejd.26.1703285537711; Fri, 22 Dec 2023 14:52:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285537; cv=none; d=google.com; s=arc-20160816; b=bHWMZGtV2IxMMd/ujdb+g3O2hUU01ZvBLzYZEJW2TBxXiaKNMPoAnLRsyoqB8JvGJN zwaCcLcrsCE0Zo60HQZ/G+d1HQt1kEeCKaG6LXJvBumvisMi7rU0CGhbvF4vbzrltOzg nvBSdfCT6zBHE8VYdHjtIfQy2dIFtButnALgDoaGLPMHIkMrDlAzVQbgqooybz2/jZx9 spyHtPVtmJhZVEoCTEa2TWGAfj/sjiZR5thP54cWtUxIr4BpLKEtoaK+7/cGK61lMS7J FAJzRoP+n38Ic/aAkG2HmozPx01dx8iK8EomA54TBzh9iS4H/78JxOr0LwfcFy/EnQPO KmXg== 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=xaNDJCK/96IM1ugzA9hVlWmVNepZn31ENu7oqwX8UrY=; fh=pRhPfQLlVYfHlKr8jnvugZHZivgJvP42cwXk4G+Q8Nc=; b=gZFGGJ4zJrA7Toz6XMheBk/gSuQ698MdGNetmSZKX4tAy34Y/SCwC07VI6R34ZXRum FGtY14a98UTLaO8C7qTqUJJn0q0iY616cwGrYfJJjZwT99CGxjbfXcdQwkmasRq9cqhu ejHG72NZaLEwgm8j6/ZvKMb5HY5X6nYqjFfUCSRiX4V12S80kNtxyb3YmEH9GuA4PDXa /tUl2qxnFQ3J5p7bMUKsQH/pfUN11K02HTXZfEn0tS+DwUGrXygGeh4hpuIopt2XW+RY kyXaX8LpXOTnD8n0A+JKbCauKnUNui7hie103p7RTN5o3eW4j4YDThpyNBAHfHpFtOWQ DAgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10094-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10094-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l10-20020a1709065a8a00b00a26ae4379dbsi1555221ejq.207.2023.12.22.14.52.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:52:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10094-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10094-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10094-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 57E941F23346 for ; Fri, 22 Dec 2023 22:52:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39BE63219D; Fri, 22 Dec 2023 22:51:20 +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 1E17A2F841 for ; Fri, 22 Dec 2023 22:51:16 +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-0005gq-0I; 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-000qvX-D7; 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-000Ffi-1M; 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 11/13] irqchip/renesas-rza1: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:42 +0100 Message-ID: <1a80e31525d0b02063d2ff1baaaa5e87418f54b6.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=1796; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=Bsz1h5QGxzBut3kdIXUNVPDmYjq+hBPugF7vd2mkQfE=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhLDGfDRrLiK/KeH7o6vmgeojd4haTpeIWkVf dHLHVF6VfmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSwwAKCRCPgPtYfRL+ Ti/6B/0Uc7C0uWLP+JiDX8poWb9fqLqVJkboTbGDuw8QKClnZ8GXnZ1kWfqxq+sEAxAzJ5kqVaw 1Z6yi6Fg8XYidEuyCh9wwlEqGPU/sojxhURWyGaLh2ZLUnW4yZzqZ5XbsPgGNUecuNJx0Ge1b1W mZu4V5EHMq0GFrq56K40kZbmluI1LIBr48WiXF5xYuRyLSzgn9EfNy7h4Qk1xEWj7bausZD73+P NqiU2OkIiT1Zltu0xSb/5zxZafiCctFRj4Xvygbl1LZPexPts3IfCyJ8NqU/N09G2u0GDAnB9HC rWPzyNQy9GGObqdVm6PVyA21KDXDAzvE6nuAmNXtX1faAqgP 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: 1786024335721079534 X-GMAIL-MSGID: 1786024335721079534 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-renesas-rza1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-renesas-rza1.c b/drivers/irqchip/irq-renesas-rza1.c index e4c99c2e0373..f293ad13809f 100644 --- a/drivers/irqchip/irq-renesas-rza1.c +++ b/drivers/irqchip/irq-renesas-rza1.c @@ -244,12 +244,11 @@ static int rza1_irqc_probe(struct platform_device *pdev) return ret; } -static int rza1_irqc_remove(struct platform_device *pdev) +static void rza1_irqc_remove(struct platform_device *pdev) { struct rza1_irqc_priv *priv = platform_get_drvdata(pdev); irq_domain_remove(priv->irq_domain); - return 0; } static const struct of_device_id rza1_irqc_dt_ids[] = { @@ -260,7 +259,7 @@ MODULE_DEVICE_TABLE(of, rza1_irqc_dt_ids); static struct platform_driver rza1_irqc_device_driver = { .probe = rza1_irqc_probe, - .remove = rza1_irqc_remove, + .remove_new = rza1_irqc_remove, .driver = { .name = "renesas_rza1_irqc", .of_match_table = rza1_irqc_dt_ids, From patchwork Fri Dec 22 22:50:43 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: 182797 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1371607dyi; Fri, 22 Dec 2023 14:53:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxWuk/hiUGEifiIj5CXNs2YM4Wn5zV4zA10dEYxNGAm4PBE8s+jAya/id6TN66K63SzQkb X-Received: by 2002:a17:902:e5c1:b0:1d3:d194:3560 with SMTP id u1-20020a170902e5c100b001d3d1943560mr1964050plf.99.1703285614741; Fri, 22 Dec 2023 14:53:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285614; cv=none; d=google.com; s=arc-20160816; b=A5JYB/OttTkjegFFSrinPH6KLoO6UY5t2RWHfKD7GhdxM4CPoLLSNKVHU85qYUcCvP uFFS/JX+3Bj3PePesgTmS254PbGQRdu8+c6tqK4v6WxaoP8oYe6fHosxR8Mop+Dtk9iL TU4FrFLZ1dfo61g/ulNhZaqwlVqlKxHbyZ76+IrwRNBfAXHrmmEboyM0looW01nj4Iuv wJfvVcdv8pO6vTFjwy6iEWzCdvFqcc3tW1V4/EnCAzYxn0LhAuSylvUePQcIUk2CsU8H kMvijMONIVj7MmSAtEeqhF3W6ijSsqcDJg3thjStP+O1IulBWb8ZndaJKwtGPu1V2OL6 H71Q== 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=/py4szMhfvgxw/lEDyYsH15F+1PlZkynt0LwlguvTts=; fh=xY/01gotSQszmtSgCl2j288Wfvlxmpgu4HS2upF09Oo=; b=j00+nAZSGDehiAQU5udxExVXX13Vt4ZxLgbMF1u6feC2k4hpifIvsZgNj+633gTtjG 3Y6gcr+JR4dZxm8I4oXpvb/Kuw6VpEgie3nCUv0dPRtkHxhOW1S/jJiddUwpPtoykjea UrBk0j9RpenPUb6rb7Aeh1KbnluvIbwHAtR/EKuoy76zDFLzChpHIAXGdDnQPYKi2pnt QhGAF8u1WE8Ctx8O3oHb7EqLmo18ZtorZA8rknoAyXKMSBeM+kys7vxnyS1bqFHJqFBa gsQRtrreY3AECEEsFbOveNIWmo7FPkrGbCNug2KgwTuYeAOVvNucw9vmjbYGddtr+vv2 Dt7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10100-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10100-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 p18-20020a170902e75200b001cfd0ddc5absi1689515plf.331.2023.12.22.14.53.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:53:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10100-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-10100-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10100-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 82FE92845B8 for ; Fri, 22 Dec 2023 22:53:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA190374C2; Fri, 22 Dec 2023 22:51:23 +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 F263133CD1 for ; Fri, 22 Dec 2023 22:51:20 +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-0005ie-Ah; 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-000qvb-K2; 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-000Ffm-21; Fri, 22 Dec 2023 23:51:14 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Maxime Coquelin , Alexandre Torgue , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 12/13] irqchip/stm32-exti: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:43 +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=1709; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=7EUZkiwcSMvqh8+WiN8ti4/qLswt+nYfqNb7cjNoDwE=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtQ2oSMTEhY9Zs929nbyD5xYoyjS+nYDj6jyi+el7leDn jmqlSzpZDRmYWDkYpAVU2Sxb1yTaVUlF9m59t9lmEGsTCBTGLg4BWAimw+x/3cIPnHvtvdmj4Ty 9ga120sKuFJanNI+Mpj72VXN6xZasHSLG+exki/JRu4BTzLFQxaf/n9Ia46uV3bt0S1yjLu/8Oo o67l8kHmUmCLvddSq+vfMPI6WCe8WZaotS5iiWytTeHbz+eQ0xrri5ZmFpxNF5kb8Zw0Sl9ytOi P61k7pGdeX6Uk++b5Wtt0urV9U8fn/l3O/BcfYrzQxWGjy5ckNNrEUc9Hv3lPXZp/jEBcx2G77u drG+t0defaoNfJ7d69dHquZ6bTg+OQAnwR+r0258158KVO97Hdsn2K0dSIDT+wPPuaM09J6+hF2 W11XSv7IOJe49VXOp8Y1LGVMARYJ0wtP/E0w/caizP0QAA== 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: 1786024417001484036 X-GMAIL-MSGID: 1786024417001484036 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 Reviewed-by: Antonio Borneo --- drivers/irqchip/irq-stm32-exti.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 971240e2e31b..c61a97caafc9 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c @@ -898,10 +898,9 @@ static void stm32_exti_remove_irq(void *data) irq_domain_remove(domain); } -static int stm32_exti_remove(struct platform_device *pdev) +static void stm32_exti_remove(struct platform_device *pdev) { stm32_exti_h_syscore_deinit(); - return 0; } static int stm32_exti_probe(struct platform_device *pdev) @@ -991,7 +990,7 @@ MODULE_DEVICE_TABLE(of, stm32_exti_ids); static struct platform_driver stm32_exti_driver = { .probe = stm32_exti_probe, - .remove = stm32_exti_remove, + .remove_new = stm32_exti_remove, .driver = { .name = "stm32_exti", .of_match_table = stm32_exti_ids, 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,