From patchwork Tue Feb 27 17:21:54 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: 207365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2863025dyb; Tue, 27 Feb 2024 09:56:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUhysvffX4paJynonsCVOxIkDYTtZv6NPcyuorJfzLmhGPWWpVcW3kPDINcLJuKfjJVrf0hvLMsT5+0bnyHp9sjmR8KMA== X-Google-Smtp-Source: AGHT+IHliUSACwK2fkRMjoqX+C9NO1HKngtZSDc5UGO8WEktbwZnze5kjcrCtAkSiZyjDhAQ1iVK X-Received: by 2002:a9d:65d7:0:b0:6e4:8c93:7406 with SMTP id z23-20020a9d65d7000000b006e48c937406mr11286938oth.14.1709056594140; Tue, 27 Feb 2024 09:56:34 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y186-20020a638ac3000000b005dca7a43069si5733602pgd.603.2024.02.27.09.56.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:56:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83700-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; dkim=neutral (body hash did not verify) header.i=@linutronix.de header.s=2020 header.b=aN13lyFC; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=rrHOunMM; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-83700-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83700-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 01746B2D10D for ; Tue, 27 Feb 2024 17:24:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EDE814D425; 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="aN13lyFC"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rrHOunMM" 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 BA198149019; Tue, 27 Feb 2024 17:21:56 +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=1709054518; cv=none; b=i5jOQOI0oPbzfrCF4HauNR7TyNUcRLplF8844CfYvazOubbAs3dT/kS4Ro1kQk2j/2hfSPdywueKrUPRQn7Wdzj+gdswakUBf5WpyuCbyN5dSyuxgsoBKCK/2IENkK9wcqQ9PRSGm1W2gHOdNNMMPdn9BSq2q18GE0fhHXR1/+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054518; c=relaxed/simple; bh=0/pVB9EZEXoJoZ+6Jjm5qijRu3AN1iKN11txN7tPars=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Jjw7N1kuk782WH5S+SzaY7kI3ZXOFhSm5yIKj8hMfWhBZFGffubFQiMHA7dFBsRO4+zfFQNpJMjCGkKhDxoILbZHgxOa/4jgQ+akk0V/SBixA8Al0+RdlhTsHoFWbBWNI7NXHo0mkdxD0UaT6ExpM30jZKwjDb2Se7j9lcj/hCE= 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=aN13lyFC; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rrHOunMM; 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:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709054515; 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=LjEjUqo4UiNhBKNUZvXJz6TB81Ch3kHkG/dRiGcl7bo=; b=aN13lyFCEkIIw5visMXasmo2HFqQDHPGHrPIKMckcScnOTKCLsEwLCiJ4tEMo9dJsJjGcK xiQhu95HMD4PcA5CTk49kVSETK2BaXgD7Kkap02J7OlsJIgS9x+9wUal+pAyEck+ZSvoSl IeWd6gbrig2NSv/z90sEj5R/BMnMXMG6JeyCPvA2OIAad0MQyc7/ATffQbI117e/cLg5hi ypxeB+8GforlWOV6J/dISSBVH5ZruGGeUtLj/jpDc4RWGqe6XbtPPR2c06kqgpqG9VVGfn xvtjuZrzHWVThxtf+eLjVEeM+crV2E8hs9JamYEqbVMSKoIu4SzYrM0k1byTsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709054515; 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=LjEjUqo4UiNhBKNUZvXJz6TB81Ch3kHkG/dRiGcl7bo=; b=rrHOunMManewCDPqv3uUZBALSzX5iLF0yWFqfftILynmSRPEOZ1tJ0EgfxZuXkmqvIEEcR iCitJECsP4cqUhDg== 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/keystone: 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?=3C4c852a3359aa06bedcf3a10f3fd8c1e008cc5a3a=2E1703284?= =?utf-8?q?359=2Egit=2Eu=2Ekleine-koenig=40pengutronix=2Ede=3E?= References: =?utf-8?q?=3C4c852a3359aa06bedcf3a10f3fd8c1e008cc5a3a=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: <170905451437.398.10908785391629055095.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: 1792075727059919748 X-GMAIL-MSGID: 1792075727059919748 The following commit has been merged into the irq/core branch of tip: Commit-ID: e58e0b5290bfb3ae022d95794499ae62e38c73b5 Gitweb: https://git.kernel.org/tip/e58e0b5290bfb3ae022d95794499ae62e38c73b5 Author: Uwe Kleine-König AuthorDate: Fri, 22 Dec 2023 23:50:35 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 27 Feb 2024 18:12:09 +01:00 irqchip/keystone: 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/4c852a3359aa06bedcf3a10f3fd8c1e008cc5a3a.1703284359.git.u.kleine-koenig@pengutronix.de --- 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 a36396d..30f1979 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),