Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1093941rdb; Fri, 22 Dec 2023 14:54:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+y0M1yrUUJougFhJbWtlhWxJ2P2yUAno8m2AKNJ3u8JvF7rNRFDExLxuyPjJMVilghROM X-Received: by 2002:a05:6a20:6294:b0:18f:e944:3d7c with SMTP id o20-20020a056a20629400b0018fe9443d7cmr1929135pze.3.1703285647851; Fri, 22 Dec 2023 14:54:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703285647; cv=none; d=google.com; s=arc-20160816; b=bjQJWDrXEcAVlgUjYv8PauWEmp0GORcsPkK5GRbmvZWWVD7MMDf/fZ+hggg+WJQWXq qXI0pAURerCbgbpcIpaVgDDgaHOXHnluWvjGdrV8oY3FQf8t8XXx7aahcP97hGr3zA+b 3Yd9S/RRTxzTtmRi+GKihbFKnK15uV1lqYFLqjwgOmtyMBzNYLqNFlEsdDyNkpK5gGGn OnGwkbv35X4D/qI6Mh0p2OraNwOwl1FC7xwvXfL0y28cMbqLhvS1oWdDy4LxnyhJ3P9A MIkMskTM0XiNVubtv8YIXxgJl2yTXj9yUwZG2PevNMndkHeO3/odrumo61LAfA7ZGV3G +b/w== 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=bv5qLyDC/TWxWnbjpfQ3UzMQDRwoN+k2BOJmy7Nxl2c=; fh=y/J4yqP4R7Toz4N/2ynQUTJwL0qWo8ILRyjY+kDfl/Q=; b=VNb00CR4sUG4TZdBpVl+FvnFfz8lIVloSI9F/ajLYdU3adIfs2140K9VycH8q/8V1G LwjEti09Lo2TUqOVrA9zaFJUZ9x1krbs/pacliP2rt6dfxzyh+4XOSNWESN2Jmrs8tVY PzKIfh8Yd8sqbGSob9wUCscdphBr9l/eOgr4OPvslaogbOENezBiuu6XZKhLs5XZruco lLnlY4DQaPpsgaxqZAvK9/qPKQzghbqNYhqmv6/9BHtXIrmgi3PycxrlwmYR3hjjvHIq a4K0Flour33Let//Y1E3ruKQmAu5PzOPPahYzFg+kgP+1kA+rJLemOCimpu2Xf6oabc5 6jnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10102-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10102-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 127-20020a630185000000b005cdf9a34830si1384170pgb.588.2023.12.22.14.54.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 14:54:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10102-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-10102-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10102-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7167EB23D68 for ; Fri, 22 Dec 2023 22:53:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3A6F381DF; Fri, 22 Dec 2023 22:51:27 +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 EF51F2E853 for ; Fri, 22 Dec 2023 22:51:25 +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 1rGoML-0005bm-T8; Fri, 22 Dec 2023 23:51:13 +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 1rGoMK-000qvD-D7; Fri, 22 Dec 2023 23:51:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rGoML-000FfO-1L; Fri, 22 Dec 2023 23:51:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner Cc: Charles Keepax , Richard Fitzgerald , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 06/13] irqchip/madera: Convert to platform remove callback returning void Date: Fri, 22 Dec 2023 23:50:37 +0100 Message-ID: <64c2f79760c53f29651e7126418c407ff699317d.1703284359.git.u.kleine-koenig@pengutronix.de> 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 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1755; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=oNyOtJmRK/PlWo4BKGbaCJgMzouADPvq3uSryPTzQhI=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlhhK9Y8lRVhNFkK9eJWWYKEZRt6Vy9FJ7h2sj6 VryWfbz2laJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYYSvQAKCRCPgPtYfRL+ TngFCACHKhMzBPTBKVocA6VfvDGmuukvynuqR9RfEljwyjneu/L12qaidTDwjPFQtNSEm6HZUBa K7ywfUFIwGDqS1YVFVeBCOV8jGXoZQ1+LY1U/MmzIzFuLOaUIu8bU2Rtqzq4dKUaXpuQFQ4XgN/ zHN+B6RKZtpT46Rivq79vpIoz+ujbj3zvTwiti73wKa72M9tvxC8H0l0UV1oqbQtq8wqtMMTNru aZL67AYTcfqSmIXXkOi0XtADOuwcMMChC1mY4F/J7L2+ro3Wf8NrGMpdohxtssProziTgnyhXrJ LUKLwQ6vOC4EWnqbFzHzpsKePslWuOr8y1HurRhaWAvl7i9V X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit 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 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 --- drivers/irqchip/irq-madera.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-madera.c b/drivers/irqchip/irq-madera.c index 3eb1f8cdf674..b424c0a327f7 100644 --- a/drivers/irqchip/irq-madera.c +++ b/drivers/irqchip/irq-madera.c @@ -222,7 +222,7 @@ static int madera_irq_probe(struct platform_device *pdev) return 0; } -static int madera_irq_remove(struct platform_device *pdev) +static void madera_irq_remove(struct platform_device *pdev) { struct madera *madera = dev_get_drvdata(pdev->dev.parent); @@ -232,13 +232,11 @@ static int madera_irq_remove(struct platform_device *pdev) */ madera->irq_dev = NULL; regmap_del_irq_chip(madera->irq, madera->irq_data); - - return 0; } static struct platform_driver madera_irq_driver = { .probe = &madera_irq_probe, - .remove = &madera_irq_remove, + .remove_new = madera_irq_remove, .driver = { .name = "madera-irq", .pm = &madera_irq_pm_ops, -- 2.42.0