From patchwork Tue Feb 27 17:21:57 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: 207340 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2846695dyb; Tue, 27 Feb 2024 09:26:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVgqyDLWRLtQaO3rm80kUfoohRWahPEneMpl6yMJOSRrA2/ItTlmQIbXyQ2mBR48+GyBjcTc9D3TyoRYMPflAinAKACGQ== X-Google-Smtp-Source: AGHT+IEKggxnaAvlwJc5oL4IjKLOArt6Q5pVNoU7BHCKmhEUXGfmGLQVUyDqkVfWdLQaBWqerxjB X-Received: by 2002:a05:6a21:2d8c:b0:1a0:d240:c77d with SMTP id ty12-20020a056a212d8c00b001a0d240c77dmr2858164pzb.17.1709054770071; Tue, 27 Feb 2024 09:26:10 -0800 (PST) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q139-20020a632a91000000b005d92a3f1196si5736995pgq.592.2024.02.27.09.26.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:26:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83703-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; dkim=neutral (body hash did not verify) header.i=@linutronix.de header.s=2020 header.b=sjZPwv+j; 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-83703-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83703-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E79FD2849CE for ; Tue, 27 Feb 2024 17:25:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDDC914A4C1; Tue, 27 Feb 2024 17:22:03 +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="sjZPwv+j"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ETpDwKwr" 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 A1B2814AD2E; Tue, 27 Feb 2024 17:21:59 +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=1709054521; cv=none; b=ZfalHVOaXSNlOTPOVX7svQkdfUNEALMPgawjz1UAZY7I7j8LCUUVapUSYNJMJ0KhlRPoeKgvOVp6khFKdSIyXB7jkvMLVDijfPw7Iyo43PJDUVQWVBZ+DEljTbx2LhTiXisvb0PPxYN004MUkUmf2hHr5rTLZ8/rUBbMnYkyI8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054521; c=relaxed/simple; bh=R8g2H2I6plpx5pN/lj3b8Pe/c6VrII1cU21kCQQ1spo=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=FZT/1CzuvsN0BdGYXnxb4SdJNaMpUDwDr2KCRH/hL/dRorll/KPw0AAtRkASnRXDFJdevnaka/XBK2RDsDChS6+EM1r9vVv3nCLMgLDyp8LhC3XA+8WugIqB887eoXs99QfuUtPtOlTdAVrnQkXwsEbVIyXE/yhXqRZqHNdhz9M= 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=sjZPwv+j; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ETpDwKwr; 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:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709054517; 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=7dnpyg4THHby13IlGSuMEKZU58Q5gGYrPricbeVgsSs=; b=sjZPwv+jxr3JngkAFnU5otlOO3Q1UPADmdIkq4F1Wa8F2n0/oytk3qvK7CJqapL7AzECkl hSSN+9nECKFTSnrSNnAJjGCppLMOXxwL0noSPk+/aw87T9hGgNPE0PCB+l/r42KtaTzyks /MgyWpMBIh81ekb+CJSd4yZ51JMWt/aOhSVUAKVobrTrqDMYZb8PCtymS7DzdH5gHfu1H9 uQiJPD6hBPPoEbycv5mutbxQCrBjNnyUk8u2BXKBthFJlEx26ux/ph+Qycvv6E/6xos9EO AvQ/y9JCDUT4OnexWUsIces5zJALKVrUQB04hmlAAoo9t0CTiPbRoYBLJy6V9Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709054517; 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=7dnpyg4THHby13IlGSuMEKZU58Q5gGYrPricbeVgsSs=; b=ETpDwKwroD8WcJO+r8FoEJLqXqyXMuI7IDXTZlbWSBSXPJqBCFT5K6yluCWBFDe9e6y8YZ RPosSgDOrpQWAQCA== 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/imgpdc: 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?=3C472fc6f6bcd54b73f8af206d079a80cb8744d0ca=2E1703284?= =?utf-8?q?359=2Egit=2Eu=2Ekleine-koenig=40pengutronix=2Ede=3E?= References: =?utf-8?q?=3C472fc6f6bcd54b73f8af206d079a80cb8744d0ca=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: <170905451714.398.2278907850835414879.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: 1792073814168966378 X-GMAIL-MSGID: 1792073814168966378 The following commit has been merged into the irq/core branch of tip: Commit-ID: b7357ec21df979b9f72bac61df195dd30eab3381 Gitweb: https://git.kernel.org/tip/b7357ec21df979b9f72bac61df195dd30eab3381 Author: Uwe Kleine-König AuthorDate: Fri, 22 Dec 2023 23:50:32 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 27 Feb 2024 18:12:09 +01:00 irqchip/imgpdc: 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/472fc6f6bcd54b73f8af206d079a80cb8744d0ca.1703284359.git.u.kleine-koenig@pengutronix.de --- drivers/irqchip/irq-imgpdc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c index 5831be4..b42ed68 100644 --- a/drivers/irqchip/irq-imgpdc.c +++ b/drivers/irqchip/irq-imgpdc.c @@ -461,12 +461,11 @@ err_generic: 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[] = { @@ -479,8 +478,8 @@ static struct platform_driver pdc_intc_driver = { .name = "pdc-intc", .of_match_table = pdc_intc_match, }, - .probe = pdc_intc_probe, - .remove = pdc_intc_remove, + .probe = pdc_intc_probe, + .remove_new = pdc_intc_remove, }; static int __init pdc_intc_init(void)