From patchwork Wed Apr 26 09:12:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 87753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp105666vqo; Wed, 26 Apr 2023 02:13:58 -0700 (PDT) X-Google-Smtp-Source: AKy350bhONE8tc9vghzjePoRtJ+AyVzD2/kUrAPmHNV/xB8XKZLE8P6GQed0Gfw+AXhXySz3oCse X-Received: by 2002:a17:90a:d793:b0:234:5d3c:b02b with SMTP id z19-20020a17090ad79300b002345d3cb02bmr19688612pju.42.1682500438055; Wed, 26 Apr 2023 02:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682500438; cv=none; d=google.com; s=arc-20160816; b=EDO5hN1kffRuHyaOKsx9kkxEbl/5PTpikHz9RPjjtY5iAyBrOf58WEHnOsHbJxNFmX 6UBSfsZ5rJcnX9w+QsgFltOSaMtHFyOXpCWJ7kM+d/h54Mafb9Habk1emsPf/qXEyNFz gdisFyl3Qgf1qhra36bXT6hzylFiigdQitj5nQvD5WENl3PSEraKb9/kGCmXMresmqKT ErXpey3FP2+E92HWZLA1/dDPSDHDNMy7Yql3xEXgcz0K+Bp8tvwWxigzA9ZbVI7eCKaW HqGlkarHdsDY3nCOf8dDvDL8oIAsm2CB1x2cJaK4nKwsPrdUJaKldYRvS67iqk6UTQq4 4yVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=MgZCJQCK3AX5WcTn6XiMT44OCvMHe53xr/eNTpm8o2c=; b=NPL3IPFV/FJJa8lwsjHsf5AXr2XIZx7PJF+4Z8O7wQZeOndpXzrQttNAc/o0kubmus E0Q97wXtad0vscRD81Gk49SsnBmuPi0RagMEkgvf2ABKtFzllRHIbYFOj5dhdLVLlE1F wo/7T4YGK4gJ4iilRePO0MkgNRbiBro0EkpHH5IjIVPE1tHEkmlVJdY/x+RgFgLOOg3/ /lcINVqG+cXCV6Uk/TCvbHPGoDXYo+GXfgcarX4K+3M1vv3iW/4ClHDzrW0AJ/mWyJ2F Jr+Kd2XXFRX7KHcPgjxaO16vOG9p2cxZnt4sAT0T4NYIx3/11InwlfbntzKRiPFvmfzW uKDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yaXS9Y39; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="Q6y6/ZBd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020a17090aad0c00b002477bb336ebsi18188567pjq.6.2023.04.26.02.13.44; Wed, 26 Apr 2023 02:13:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yaXS9Y39; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="Q6y6/ZBd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240215AbjDZJNN (ORCPT + 99 others); Wed, 26 Apr 2023 05:13:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239976AbjDZJMi (ORCPT ); Wed, 26 Apr 2023 05:12:38 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B6084219; Wed, 26 Apr 2023 02:12:35 -0700 (PDT) Date: Wed, 26 Apr 2023 09:12:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682500352; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MgZCJQCK3AX5WcTn6XiMT44OCvMHe53xr/eNTpm8o2c=; b=yaXS9Y39lAg8WsrZ1mUlGZtU9NXBtRY/KhOP5Rn+O0cnoN+GfwOe9yS6WRKn2UDs5uC8Hu +FwPdpRU3mUEHwrnztlFOWoJ7IYCF6+uqPDPO/u/pY31C1yq2FMvjoHq4LZIqhe6vV/aSU Ke9Yg2MARZFSnWKZMhBpiI9jN4y1YG/f3vwvu9nICkUBThcQAbV6Rmq/SO6vCvIef74i/6 JtiUlEmNmCmBJ0LzJgNaE7mnWhtx8JUw3uvxdK6XRlGCG/iy96Bx7cgI7ullmWoVV0YHv9 lLPuodX3CfvI3ZmfBPVjboYEqedYBd4lKMxyjg3M9Z8j0AwR227CxnXg5rGPFA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682500352; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MgZCJQCK3AX5WcTn6XiMT44OCvMHe53xr/eNTpm8o2c=; b=Q6y6/ZBd3H+yWomhb8iiRTxb3DiAqGtLobfJRARbDkEz4PV5/B9SYUeI2qAZ4cmKG1aHpO 2+vblywE9jq4DmAQ== From: tip-bot2 for Uwe =?utf-8?q?Kleine-K=C3=B6nig?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/timer-tegra186: Convert to platform remove callback returning void Cc: u.kleine-koenig@pengutronix.de, Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230313075430.2730803-5-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-5-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Message-ID: <168250035186.404.12792243780091538646.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764229579586048450?= X-GMAIL-MSGID: =?utf-8?q?1764229579586048450?= The following commit has been merged into the timers/core branch of tip: Commit-ID: d7b76421c03fa58d16a52eb839302f582602997a Gitweb: https://git.kernel.org/tip/d7b76421c03fa58d16a52eb839302f582602997a Author: Uwe Kleine-König AuthorDate: Mon, 13 Mar 2023 08:54:29 +01:00 Committer: Daniel Lezcano CommitterDate: Mon, 24 Apr 2023 16:56:13 +02:00 clocksource/drivers/timer-tegra186: Convert to platform remove callback returning void 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-5-u.kleine-koenig@pengutronix.de --- drivers/clocksource/timer-tegra186.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-tegra186.c b/drivers/clocksource/timer-tegra186.c index ea74288..ccc762d 100644 --- a/drivers/clocksource/timer-tegra186.c +++ b/drivers/clocksource/timer-tegra186.c @@ -447,15 +447,13 @@ unregister_tsc: return err; } -static int tegra186_timer_remove(struct platform_device *pdev) +static void tegra186_timer_remove(struct platform_device *pdev) { struct tegra186_timer *tegra = platform_get_drvdata(pdev); clocksource_unregister(&tegra->usec); clocksource_unregister(&tegra->osc); clocksource_unregister(&tegra->tsc); - - return 0; } static int __maybe_unused tegra186_timer_suspend(struct device *dev) @@ -505,7 +503,7 @@ static struct platform_driver tegra186_wdt_driver = { .of_match_table = tegra186_timer_of_match, }, .probe = tegra186_timer_probe, - .remove = tegra186_timer_remove, + .remove_new = tegra186_timer_remove, }; module_platform_driver(tegra186_wdt_driver);