Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3474222rdb; Wed, 27 Dec 2023 08:27:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEShiAH8fPvi202a9nZm8FSENXNhlkosvwB+XK3YtxqFhoQeSg+5sSN2dpxbOUQz92tSP3k X-Received: by 2002:a05:6512:1254:b0:50e:754c:84fd with SMTP id fb20-20020a056512125400b0050e754c84fdmr2537232lfb.110.1703694443170; Wed, 27 Dec 2023 08:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703694443; cv=none; d=google.com; s=arc-20160816; b=W/zubWio/4RpFzpRXpSCEveFwvMxHLjf5qB+eeJBE+kTKHlBtdjHa5/BuUV4qaWuJb T8hBsxgOBVB8ecSmnW9yvF3WW6POS4wSlpBTV+xCbYfeoZOA++hg15S4rtViP4cAuTzT NauNoc2PqJse2NtKUb+YRVRRaWTkN28kEeLiP0fqk8D9pQjAVQ/T8U0WMK/REqidBwdO M2D32uyHf7yPi3GCiv5rPUjVi3ypGKaUscl4iS/EXHQWfX5BYSFBa+oyVeEFTA4jD/Tb tw00XntI3d6pRXrR/DxW3NyjTrfNlK/H7pJAV1PrFCLpDbp+gXWb7RKGrqOUJjMExDeQ 3ERw== 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=k+Qwzae/rL/s4LR3Bkcr4GcMaxFSrO+eysPcueFpZe4=; fh=d5Ex4XQyNQz1zuB8NE+0u1f7IbMJsbB5jtuxZjlQ9M8=; b=q70FRlVDECC2PBEE40ARBylfxBUe+b70lXIuR6uB+xSc2MuYMl7J549Z2r8pAscH36 /2E4uNCVectOXr+yy/0497+a+3ndcceUYqLB5e3qpZD57hirE7mdnFg8jDPdykhBPxj0 SveU9fTrjq9ZxqIk7yi4ELu9f3LzjYi8oQKvF/+jnwNr68ZzpkXc6RYR1GGK6nUC9U1n f1BZtXx2KFuuj9+O/qaxVs3mhRX/yL6bZYuB3eqxtcpt0OUTa1GxegrtdJkcl+H7Jj9j 3ZdWQ0OEee7gfbPi7+mhQ+JGHp9racjVcyvYJmSZJPwqMMDzXVCT6K/7hKox5NPyqN4U 5h8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12128-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v9-20020a1709060b4900b00a23700b2f89si6005476ejg.250.2023.12.27.08.27.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 08:27:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12128-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; spf=pass (google.com: domain of linux-kernel+bounces-12128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12128-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 E30DE1F22362 for ; Wed, 27 Dec 2023 16:27:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD75F4654D; Wed, 27 Dec 2023 16:26:55 +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 F3FB346430 for ; Wed, 27 Dec 2023 16:26:51 +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 1rIWjz-0005A2-NZ; Wed, 27 Dec 2023 17:26:43 +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 1rIWjy-001tZf-7y; Wed, 27 Dec 2023 17:26:43 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rIWjz-001WnB-0q; Wed, 27 Dec 2023 17:26:43 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Dinh Nguyen Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH 08/11] firmware: stratix10-rsu: Convert to platform remove callback returning void Date: Wed, 27 Dec 2023 17:26:32 +0100 Message-ID: <06df45c697a747cb6543800a4613db6e1f5462b4.1703693980.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=1672; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=6lAFjA5yiszFloMYI5qzwPntohv2cozrx2dH/FwaD6s=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBljFA6uGEchezFuteKgpv7rVwlJjuBW7qQizAIb F8CKXZq1nSJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYxQOgAKCRCPgPtYfRL+ TkKAB/wNqVOLInJA6P/jvSiLEyPTYDGW0rx8IlWU5cUStwjy0D3Rje8+JpchpcR5tb9pXUv9t1W ac2YENF8QcnS7ANBmdkC29mfmfyXZMrgdeTjG6lJZNR4Sz1QNDOL9s+pQAmZqS4CWWK+SmMNkEZ ojZkPxPMuIf7WJlS9b3IzQEOyGX1/ewLDgJHzEy2vyFsFMwt6bWP3uIjjluRq56SqTzw950nSuK X8uYMtNSdvir5kAH9fMIWCar4LGKQrBAbfl5t1zRKgFAdy21Fo/AGRIoNzj4Z8aCDaWLmxusYrT c/L/B7MzLUqe+JDZeQaRG1inrUTG9OVlRJGb4E+Zk2xq4lSJ 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/firmware/stratix10-rsu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c index 4f7a7abada48..e20cee9c2d32 100644 --- a/drivers/firmware/stratix10-rsu.c +++ b/drivers/firmware/stratix10-rsu.c @@ -793,17 +793,16 @@ static int stratix10_rsu_probe(struct platform_device *pdev) return ret; } -static int stratix10_rsu_remove(struct platform_device *pdev) +static void stratix10_rsu_remove(struct platform_device *pdev) { struct stratix10_rsu_priv *priv = platform_get_drvdata(pdev); stratix10_svc_free_channel(priv->chan); - return 0; } static struct platform_driver stratix10_rsu_driver = { .probe = stratix10_rsu_probe, - .remove = stratix10_rsu_remove, + .remove_new = stratix10_rsu_remove, .driver = { .name = "stratix10-rsu", .dev_groups = rsu_groups, -- 2.43.0