From patchwork Tue Feb 27 17:21:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 207337 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2846025dyb; Tue, 27 Feb 2024 09:24:55 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW61L3KJCe+nPLOcj4PU6BN2MnVf+M2GZd7nbJEYPxQKI4ljfMl/Q9amGMM13tMx9v4+f9rVuguZytQB8yGzYxIMq5n5w== X-Google-Smtp-Source: AGHT+IFguqb3DbrWy7q4/zEbpHfGDSI5TvfYOQZYfSRmDCRObbKx6rjRm1b/ISnvnvBWcnR6Rq/P X-Received: by 2002:a05:622a:1111:b0:42e:8ca9:b42 with SMTP id e17-20020a05622a111100b0042e8ca90b42mr5350097qty.32.1709054695212; Tue, 27 Feb 2024 09:24:55 -0800 (PST) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c26-20020ac86e9a000000b0042e63529e86si7466423qtv.487.2024.02.27.09.24.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:24:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83701-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; dkim=neutral (body hash did not verify) header.i=@linutronix.de header.s=2020 header.b=mGCv5zMw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-83701-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83701-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 01A111C23890 for ; Tue, 27 Feb 2024 17:24:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6C35149019; Tue, 27 Feb 2024 17:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mGCv5zMw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ahxP/0/V" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 6DFF0149DF3; Tue, 27 Feb 2024 17:21:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054519; cv=none; b=MtT13nmfINl/NPOJA813q5XRdLx7mpnrwXh9PNQlS8jaIw5dHhGbVah4WMsXW+ucnvQ0ld6/QG3T8+ZanTXaWyerpe29Ycs+N9oD5kyimIJakJgTaVYHmlWhxWu8lMBhQt50eZFMTVTJkH8Y96ZfDt8VARcFs5se7UYyMa7TI10= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054519; c=relaxed/simple; bh=yBia7iFXnSkBkPGE5Bmhn6YjuNem06IVGXexDC03CnA=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=QaqkpV4ybkuHTvnSjxhFFf7bRUcP8DOA8EysCDs9C6ZEqgi3JOnHx0QmKBWXeaYtl1KxWr2N0z1MZKls819mWJ2mkWHHe83+1pZihRVco5KUoa7dknhnzzFW4yCKxaCLswDDwmsHI2SgGCWfu1pd11oZ882o1U9GviagnWwoYKo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mGCv5zMw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ahxP/0/V; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 27 Feb 2024 17:21:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709054516; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QgOnFrCZwQRBYgC32DiNVf4dHEsJCOH2FKLwFRaMliM=; b=mGCv5zMw0zkwzYWox2buCSjkQ1QGSRVWID8gLgvwdIxTVfhmL5e7NA4Kfq4On5zC39NR4l QgDKHrYXD5h6y4NxcSgQTYL5uMuyHectN6DumRC4kzx915/np5vm9Rtd2TJ65/TEUxOMoL v+Si3erRwdHtbuY8xWx5tL8b2fLBZ10tk+1LcgKMIBfnQb+sipvkg9krDGYFHenQk1/6I0 yyQNQ2WAdkqDZyyOyhxVgM4Tbh+L0tTRdT0BeYN6PE+cwgalWHKb385qtl05alWff5nfQG CZxD23upAcCAQnGJQDJZQH+uzc6oMLWOZ5XYzZnd/iJkwbHq+yntEDgckiLKPw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709054516; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QgOnFrCZwQRBYgC32DiNVf4dHEsJCOH2FKLwFRaMliM=; b=ahxP/0/V/9n9gK2lqdDYeyIdTvGJjDZ7m1vO/h5e3dJAPhAY/Ku3WIAZZcAhQG9FMIuEY3 HQMVi6yedpfG2yBA== From: tip-bot2 for Uwe =?utf-8?q?Kleine-K=C3=B6nig?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/imx-irqsteer: Convert to platform_driver::remove_new() callback Cc: u.kleine-koenig@pengutronix.de, Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: =?utf-8?q?=3Cc0e5afe62256860150d25bcf644f2b8d62794c86=2E1703284?= =?utf-8?q?359=2Egit=2Eu=2Ekleine-koenig=40pengutronix=2Ede=3E?= References: =?utf-8?q?=3Cc0e5afe62256860150d25bcf644f2b8d62794c86=2E17032843?= =?utf-8?q?59=2Egit=2Eu=2Ekleine-koenig=40pengutronix=2Ede=3E?= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170905451528.398.16822133116774035735.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792073735803345058 X-GMAIL-MSGID: 1792073735803345058 The following commit has been merged into the irq/core branch of tip: Commit-ID: 5fcf3688e8755cb81fa48fc0fe724cde877491c3 Gitweb: https://git.kernel.org/tip/5fcf3688e8755cb81fa48fc0fe724cde877491c3 Author: Uwe Kleine-König AuthorDate: Fri, 22 Dec 2023 23:50:34 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 27 Feb 2024 18:12:09 +01:00 irqchip/imx-irqsteer: Convert to platform_driver::remove_new() callback 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 Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/c0e5afe62256860150d25bcf644f2b8d62794c86.1703284359.git.u.kleine-koenig@pengutronix.de --- drivers/irqchip/irq-imx-irqsteer.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c index bd95433..20cf7a9 100644 --- a/drivers/irqchip/irq-imx-irqsteer.c +++ b/drivers/irqchip/irq-imx-irqsteer.c @@ -231,7 +231,7 @@ out: 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 @@ -307,11 +305,11 @@ static const struct of_device_id imx_irqsteer_dt_ids[] = { static struct platform_driver imx_irqsteer_driver = { .driver = { - .name = "imx-irqsteer", - .of_match_table = imx_irqsteer_dt_ids, - .pm = &imx_irqsteer_pm_ops, + .name = "imx-irqsteer", + .of_match_table = imx_irqsteer_dt_ids, + .pm = &imx_irqsteer_pm_ops, }, - .probe = imx_irqsteer_probe, - .remove = imx_irqsteer_remove, + .probe = imx_irqsteer_probe, + .remove_new = imx_irqsteer_remove, }; builtin_platform_driver(imx_irqsteer_driver);