Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp248657lqe; Wed, 10 Apr 2024 00:17:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXnXYBACsBAQPPEPa/cUP27Hz9K8Ozh7zZuQ0Jufdl0OBAM/YjpwjZl8G/XOTzG74978i6RXakBsvbQfNZT5IzigVfnYbcpRlSjkzv7oA== X-Google-Smtp-Source: AGHT+IHHoyLQGQmGNcXVQ1c1/ZNJPPDGadQfgRN3TvE4CgXizgEEQ6LdiE+94gj/fNYKy86MnfuE X-Received: by 2002:a05:620a:100d:b0:78d:6323:d283 with SMTP id z13-20020a05620a100d00b0078d6323d283mr1845770qkj.77.1712733477885; Wed, 10 Apr 2024 00:17:57 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i19-20020a05620a0a1300b0078d645cbc39si6356755qka.174.2024.04.10.00.17.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 00:17:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-138061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138061-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 62F4D1C214A2 for ; Wed, 10 Apr 2024 07:17:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48A4113CFA7; Wed, 10 Apr 2024 07:17:30 +0000 (UTC) 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 1AC9613C916 for ; Wed, 10 Apr 2024 07:17:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712733449; cv=none; b=mJuH3tgQe7D00qow7aW5P/LOe1D1N3Q/DdTjiu4ONC4gLCUI5dx0DRvIjHJKwY7iqf1SiO+V2TWSbK8YKggS4CNHzDqhbbpIOM7q5q+GucGpUdVII1opcdTCYL6n3dXrlKXDv5HEgxplpnwWsgUdNTjkl7qm4/Zkoa/zF0YwPd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712733449; c=relaxed/simple; bh=7M6GxdU+Qx1cq5JsMTSSXBCuCLJoumFg+NqADPAkAGE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dW/cV5e1ontJ8kFPOENJihGoJugYj7bj/PhxnApRJvgNYSJa+G2wsw1IvHzna4Zcz7raGLcc8kvBf+VenGPRcThejxHfdr5L489vHS2JUdur5Kx8LC64uC7Zag2anpHuzm/NTzDEBMNj26VwLZWlo9qtAnHye3RZhozhjjTbYY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 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 1ruSCk-0007Oh-C6; Wed, 10 Apr 2024 09:17:10 +0200 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 1ruSCi-00BRwN-Sz; Wed, 10 Apr 2024 09:17:08 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1ruSCi-00HPjQ-2d; Wed, 10 Apr 2024 09:17:08 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 1/3] x86: platform: iris: Convert to platform remove callback returning void Date: Wed, 10 Apr 2024 09:16:51 +0200 Message-ID: X-Mailer: git-send-email 2.43.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=1671; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=7M6GxdU+Qx1cq5JsMTSSXBCuCLJoumFg+NqADPAkAGE=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBmFjzk8WXIlzsfdIcgLQ98mfT2M+ZRFfylvLnGB WqznffqRBmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZhY85AAKCRCPgPtYfRL+ TgrcB/95SwnDVkR6RLvGR9moOyosr/g6ZgoWP9EJxktRfkz9e4W2sd6hs/KXyZ5F+PABc034bmn 4G1r+unIG3Sxcs5zcxboZDyh3nDDzob1gj899YovU06z36uUZ14LWXhC6jxgqbaGm+GxTRmaKzd 08MO2NkSuswLMBxg4d1orDe5lisrhYx64Iu8sIlSWVXexoouNZ4g/IFsf4+zOroqgPomysQBlwf +ncjXcb/1XKkPbJ44sUI1qU2UOFBZL0u65U4+TEXAvGNawpMsVvTE4HKysnK4inQROJa5bHP0TA 9hNfsgH1dQg3HJw9bDBXkR8Mi9g1b4ObRDIClBkTo0TD3q/X 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 --- arch/x86/platform/iris/iris.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/platform/iris/iris.c b/arch/x86/platform/iris/iris.c index b42bfdab01a9..c5f3bbdbdcfe 100644 --- a/arch/x86/platform/iris/iris.c +++ b/arch/x86/platform/iris/iris.c @@ -62,11 +62,10 @@ static int iris_probe(struct platform_device *pdev) return 0; } -static int iris_remove(struct platform_device *pdev) +static void iris_remove(struct platform_device *pdev) { pm_power_off = old_pm_power_off; printk(KERN_INFO "Iris power_off handler uninstalled.\n"); - return 0; } static struct platform_driver iris_driver = { @@ -74,7 +73,7 @@ static struct platform_driver iris_driver = { .name = "iris", }, .probe = iris_probe, - .remove = iris_remove, + .remove_new = iris_remove, }; static struct resource iris_resources[] = { -- 2.43.0