From patchwork Tue Feb 27 17:21:47 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: 207332 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2845508dyb; Tue, 27 Feb 2024 09:23:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV1558e9lCCY1Qeq+p2IsPtV4+g3ljN7Wjb4uRGCJLgL/lyhX6QYuCHhNPhPqtmvMo0qUqR1wO4WrWyzShQB4DoGVtsrA== X-Google-Smtp-Source: AGHT+IFycvSZvSm7JC9t3ANrtlNJ+QBZrV5HSjN1ZLCP1vaGhC2o+Nr6KMpalmTVPInzZpB7+Ew/ X-Received: by 2002:a17:90a:4683:b0:29a:4b13:786f with SMTP id z3-20020a17090a468300b0029a4b13786fmr8504563pjf.36.1709054639395; Tue, 27 Feb 2024 09:23:59 -0800 (PST) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id so17-20020a17090b1f9100b0029961c8e354si5938739pjb.133.2024.02.27.09.23.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:23:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83692-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; dkim=neutral (body hash did not verify) header.i=@linutronix.de header.s=2020 header.b="e/uensmX"; 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-83692-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83692-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 3B71928A517 for ; Tue, 27 Feb 2024 17:22:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFA314F5FD; Tue, 27 Feb 2024 17:21:53 +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="e/uensmX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yhXQyuqI" 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 B25B3487BF; Tue, 27 Feb 2024 17:21:49 +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=1709054511; cv=none; b=s3EvV57e0FFWkyv9bSDfsKOMzDgrQV/1wW294Yrg33yBHLugKNj9akcdCzCxT5hL80VQYXVE2oDXxbqjrUv/6i4PJy9VhDfkLdQCcMFkPO1zxEaqbIAIg+MlfAFQxSxJFGuLmzn2Txg4a2WQA6DnQaXV9kvC6889JqLiTeltTmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709054511; c=relaxed/simple; bh=DzTD68zEDvhLvLxHiXxBJuv3hxzGjOVaeWvtnpxutzM=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Q4VTQURE+wAQw47RLZZh1G2LnfwQB6LkY79RD87HoSpGI+yOkgbDTMwN5y9TWgEwAJPcz+grvgB4/rtRz92Ic5DOYngnzVO205PbZW3X5la/JFpOgDB+aqyYpGKph4D3y2RH1mm5xd7CidLTCnBVKsMBh8FRwBarUkEDeh2/n4Q= 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=e/uensmX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yhXQyuqI; 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:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709054507; 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=id6NycFhFwY6HehodIjnCrrOzXGMEt7BHkAhNvK7AlE=; b=e/uensmX6AnBIaCVMb6f5Lg3WWsNbtu+WRPcHhD5Hk3StPpnPE0Kn40BpH/FMsdoK4jz6J EKEzEru5OSPU4x9qp0GaKeG9uyf/AtQEQTIEF+1UnlLAjNzJr6vh46NMzEonfYfO1FVu1C tZW2klXWfaPEa3/oy2dPGdnFaUGzcmjMwdqXNEdVSTsU9JIjlqfrzs4xD+7VLo1iId4U8O B5Owp8eO6tc5r6oX+BFW0xt3NKvdZV+C/WvIOYR7luGGieQWxsrk2YY0Mpx5ezuVYqIKkW KNdGyNzS9YShCQYSEQh7wuScfW0HZO0OberTbfFOTc3eSftz79pYFHJL2Ws5cg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709054507; 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=id6NycFhFwY6HehodIjnCrrOzXGMEt7BHkAhNvK7AlE=; b=yhXQyuqI61Jc/bjwLq+aa2JDy94XvOLTQeqVdHDFGq2bD4qa9JGmariXAQdJPQonR58hZG zmIl+6oOs3nGMjAw== 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/stm32-exti: Convert to platform_driver::remove_new() callback Cc: u.kleine-koenig@pengutronix.de, Thomas Gleixner , Antonio Borneo , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: =?utf-8?q?=3Cac551b89025bafadce05102b94596f8cd3564a32=2E1703284?= =?utf-8?q?359=2Egit=2Eu=2Ekleine-koenig=40pengutronix=2Ede=3E?= References: =?utf-8?q?=3Cac551b89025bafadce05102b94596f8cd3564a32=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: <170905450706.398.17494117981857072821.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: 1792073677750420021 X-GMAIL-MSGID: 1792073677750420021 The following commit has been merged into the irq/core branch of tip: Commit-ID: 935603e8199991ac1f72c47a41a558f43f1a6004 Gitweb: https://git.kernel.org/tip/935603e8199991ac1f72c47a41a558f43f1a6004 Author: Uwe Kleine-König AuthorDate: Fri, 22 Dec 2023 23:50:43 +01:00 Committer: Thomas Gleixner CommitterDate: Tue, 27 Feb 2024 18:12:10 +01:00 irqchip/stm32-exti: 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 Reviewed-by: Antonio Borneo Link: https://lore.kernel.org/r/ac551b89025bafadce05102b94596f8cd3564a32.1703284359.git.u.kleine-koenig@pengutronix.de --- drivers/irqchip/irq-stm32-exti.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index 971240e..26a5193 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,10 +990,10 @@ 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, + .name = "stm32_exti", + .of_match_table = stm32_exti_ids, }, };