Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp875390rbb; Sun, 25 Feb 2024 07:56:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUHP646vs/45Q43nLdCeSRiKdnAkeHd49dvlbFPcbEbN9KgaAWt72Ijm2ewEtpqjMTktcg8SeC7RRTesoDXBdcPcidDIc7+AC/OyBGSNQ== X-Google-Smtp-Source: AGHT+IFV6q+6zb+ZpfgG9haZMHDXwmCoxKGbGbyF1uJHdSG8TmyJjwErqe+E0PFuxjMF4a+4jxdL X-Received: by 2002:ac8:44d2:0:b0:42e:701a:cc92 with SMTP id b18-20020ac844d2000000b0042e701acc92mr4717368qto.58.1708876576430; Sun, 25 Feb 2024 07:56:16 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f1-20020a05622a1a0100b0042e7efdd23esi1137211qtb.568.2024.02.25.07.56.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 07:56:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80175-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-80175-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80175-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 330901C20FD8 for ; Sun, 25 Feb 2024 15:56:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 678C01B7FB; Sun, 25 Feb 2024 15:55:20 +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 25C4417BA0 for ; Sun, 25 Feb 2024 15:55:17 +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=1708876519; cv=none; b=Fy6jMAflEDVo4CnFc8qYMxiJOP+lpF8ObVNH7F94UmKAZynmG7cKWen1nk++VC8ygPZSChxumDwWuNpGHUZpMDzMyayfz5jhDzi+4zdKGbTPEn2NW5wm2PVwsbFmPEyGOqA+U3HW70vEcKH2vg9ywOayaF5KJ7eh+H6QH6Ey+jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708876519; c=relaxed/simple; bh=lNC/jkKjyMMhL1AbItdI166xPrl21UQXTGooYKkG08A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XwLi3Tr8BN+Mi6nLTvMeLW9rPMQzJReNq1bP0CJuhLUVvX/G9lWlmIRyKk6Q4FcDqOnUa2W9qQhKq2gCE2sSUlKBK2HrQdMOVKp9CNXtJaOcpmvpXi2HTkxsT4h4AY+e3WzRHjozUqtxHfXcHs9MpTKPLTKxgadkGatp4OP+SwI= 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 1reGqN-00006n-PY; Sun, 25 Feb 2024 16:55:11 +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 1reGqN-002pKL-Cu; Sun, 25 Feb 2024 16:55:11 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1reGqN-00BKp4-11; Sun, 25 Feb 2024 16:55:11 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: MyungJoo Ham , Chanwoo Choi Cc: linux-kernel@vger.kernel.org Subject: [PATCH 4/7] extcon: max3355: Convert to platform remove callback returning void Date: Sun, 25 Feb 2024 16:54:53 +0100 Message-ID: <2c017ea490f721646bd472e7d427eb377e4e8423.1708876186.git.u.kleine-koenig@pengutronix.de> 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=1776; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=lNC/jkKjyMMhL1AbItdI166xPrl21UQXTGooYKkG08A=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBl22LTLyXXIKJjBKLJgy5ASgg+jYNeJfflvaKsJ 8fauJJcUX2JATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZdti0wAKCRCPgPtYfRL+ TiSuB/43VdydmkpZlhwkU5iMQ1XZ2Ybo9gVzHvRx27qpTLrBXC+Q3AwEnoGWeaD3fAZiire+clr pCfFqlcu2/uacxE00cShaW/Y2bvGacOgEFYHEz5SNBi2wVnDfOi4K+xKomgKk1E09LYFkO9HQ6c 2J9FQu2E6p3EXMux/IB1lXPzwg81Al4K/NeRbZ/p6UM+hhF/QqmbNtE+sBWSGQ/1HqOmC4Am8GH J+JFa6ZQiJBlTLRLbVVNvqbUhay09OEOm4+7gI7jy9ZKlst7LxpVMVxjCzvyg4ob4wfIBi4GN8r RnLrcxjYg+oTMCW1R7mP6WhNhUECZcV3eWp3JIZ21Z4i+cC+ 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/extcon/extcon-max3355.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/extcon/extcon-max3355.c b/drivers/extcon/extcon-max3355.c index d7795607f693..e62ce7a8d131 100644 --- a/drivers/extcon/extcon-max3355.c +++ b/drivers/extcon/extcon-max3355.c @@ -112,13 +112,11 @@ static int max3355_probe(struct platform_device *pdev) return 0; } -static int max3355_remove(struct platform_device *pdev) +static void max3355_remove(struct platform_device *pdev) { struct max3355_data *data = platform_get_drvdata(pdev); gpiod_set_value_cansleep(data->shdn_gpiod, 0); - - return 0; } static const struct of_device_id max3355_match_table[] = { @@ -129,7 +127,7 @@ MODULE_DEVICE_TABLE(of, max3355_match_table); static struct platform_driver max3355_driver = { .probe = max3355_probe, - .remove = max3355_remove, + .remove_new = max3355_remove, .driver = { .name = "extcon-max3355", .of_match_table = max3355_match_table, -- 2.43.0