Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp57325lqi; Wed, 6 Mar 2024 09:57:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX8QT246hnYmZNX2F/Gbl79mSU0xAhTPRsb5Wv9QqiiTsNP/XqO9OLL+qEmksJIEBK5RdLvf7PvPs8+6rIpdNDpXiX5nbDgNtaiLfJEKw== X-Google-Smtp-Source: AGHT+IFkj+iaZcpFoouWSpu1SYMHgyddBnaH1/biSdqbnoGybUvOFaSna1idTHlLHSPiD8J3W5jY X-Received: by 2002:a2e:780c:0:b0:2d3:f09d:6563 with SMTP id t12-20020a2e780c000000b002d3f09d6563mr3743157ljc.27.1709747865857; Wed, 06 Mar 2024 09:57:45 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k4-20020a056402048400b0056731415c3dsi3616929edv.7.2024.03.06.09.57.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 09:57:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-94352-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94352-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 42C081F259B6 for ; Wed, 6 Mar 2024 17:57:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFBD913C9D4; Wed, 6 Mar 2024 17:57:19 +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 88CBC136987 for ; Wed, 6 Mar 2024 17:57: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=1709747839; cv=none; b=umJGEK2M5RLLprtfyOBzK/5iAe84FtBaSbJuNFifJzAWKJpcEJGZsjfCHfuQqy3RNwOLUhEwcPsbJCyccoGzJmeiG/4MibfmdQwTGcTlmySAG6qEtDBb7HwyiNybuIL2ATr1Jr+Q14Qm5Y70D0D0x37B6EslImD2V5079MkB7Fo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709747839; c=relaxed/simple; bh=kkX6BTdc1ryQj7fgIQCDJyq35Q1Vik6KHEiij+hMoRA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uNGsCGqXc0r/gsqWVcDW3Ij/uVlKUxj5f40BxRshkB9fqlAcGGAZdl7y/YjXkfNrn52W2nEag1pZvJHyoZdfwBoWV5hwWjbTvjJ4k2teD2tZau6KmbGgfyGObwmsq/sjARz+caMujJZHnzremvqq/RrYmXLaNsINRa6BtqR2/mQ= 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 1rhvVy-0008Su-FF; Wed, 06 Mar 2024 18:57:14 +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 1rhvVx-004n7L-Nr; Wed, 06 Mar 2024 18:57:13 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rhvVx-000o8H-26; Wed, 06 Mar 2024 18:57:13 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Eli Billauer Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] char: xillybus: Convert to platform remove callback returning void Date: Wed, 6 Mar 2024 18:57:10 +0100 Message-ID: <20240306175710.82569-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 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=1783; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=kkX6BTdc1ryQj7fgIQCDJyq35Q1Vik6KHEiij+hMoRA=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBl6K52KsrpqyyuBjasHigGxdGVbTw4gEXGTfWF3 mqydt/1GAiJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZeiudgAKCRCPgPtYfRL+ Tj6WCACN4YneiHGbSn6AOXZbwnOMLiBXY3Ix2iB0dJQrdSTsnqLkI5cMALtj9qHAAy71z9XyrYY 1fK9e2IUH/roiBS8hb52l7DPEgqbH5IYiLZkEA4hKzXVdtFJMKB25qMUTPeIkEuZiGwR5TyLRVB nxs0Uq8vD0512N2XUfTQciJmI/qS+wY4g/4k03nID78O2TGKQZKVSk6IvwlZrz1fQYbWDnXlRTC +p7O9Vbod/jPqSZDmAVvKxDmU0wul/+z6JlO92iMrEWJZxVCKNzcOiNtt8MTOU7dbs6jb9/Bo3u zjL9cnJn7GqldDvhl7nq6f/gYOEForyUxBsdM5qlUAOAJ6/1 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/char/xillybus/xillybus_of.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/xillybus/xillybus_of.c b/drivers/char/xillybus/xillybus_of.c index e5372e45d211..8802e2a6fd20 100644 --- a/drivers/char/xillybus/xillybus_of.c +++ b/drivers/char/xillybus/xillybus_of.c @@ -64,19 +64,17 @@ static int xilly_drv_probe(struct platform_device *op) return xillybus_endpoint_discovery(endpoint); } -static int xilly_drv_remove(struct platform_device *op) +static void xilly_drv_remove(struct platform_device *op) { struct device *dev = &op->dev; struct xilly_endpoint *endpoint = dev_get_drvdata(dev); xillybus_endpoint_remove(endpoint); - - return 0; } static struct platform_driver xillybus_platform_driver = { .probe = xilly_drv_probe, - .remove = xilly_drv_remove, + .remove_new = xilly_drv_remove, .driver = { .name = xillyname, .of_match_table = xillybus_of_match, base-commit: 11afac187274a6177a7ac82997f8691c0f469e41 -- 2.43.0