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,