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: 87770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp110139vqo; Wed, 26 Apr 2023 02:25:27 -0700 (PDT) X-Google-Smtp-Source: AKy350brJ6p/0wKWHlevr5y+pwQ/o/PV82c/s1EFJEpURqyeB2sL2+nmwoRB+7c7QEGveHyorLF1 X-Received: by 2002:a05:6a00:c85:b0:625:efa4:4c01 with SMTP id a5-20020a056a000c8500b00625efa44c01mr29615999pfv.3.1682501126866; Wed, 26 Apr 2023 02:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682501126; cv=none; d=google.com; s=arc-20160816; b=F4QERyJTpLn0wk43BzP59uCgNJJ08coXp0MwunOWGe72Le6kAVczN7kS/zD9B5jSwn FSQIx4NvaeDaK6pJYNcuYBLBtgLDDgKva1owWP8EwFvfNpwxVW+kNeSZY9uMm4sl9PmE jfZmORJe7aKIptWHFRqR8mSzHHUsuX9j8Ek3Jr3lfmHR1N6judKJSZPoConcjykIoA1e JlqUxg2OUnERHdmJDD7rPuIM1zeqnGXflkbGNx1/FGf09dSaLKQ4ffK/RFl4veImMy1V CUDDviMfB4R+ZWravfrgkfEHJt6U0CeMxi8XGfl4RNRae41FzbY9xTiMCdfCk55r/mQt tg5A== 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=cGAJjuVajFTqz5VQpTt1LrqF3WkHJWal8RsfcvGbvSg=; b=MVwu1+HSOVpmF+rAA6TshLvOngIGu7WJzOmLE5xrxXwF07/CMTmlbMc+iym2Io6g+P eLfISDR7FGrf7qwCQxRBYb+JzXI6FElFQ6mAXeTMHfCZe7a+M7X2zOxaA9BpNDBS2GNI gqpq+YVEkOLEyzSxGUXqFjQE5TLcR/3qXTv4GGEuQsP4D3DQN1gss8yrWOmx5po/XkFr RT6/ws9ztMTgjbVItgILlHrwP/sN0NWsbu9Wj41tzdoOYwJAenFp/7yOfgSv6226UaGX rYEbalvE3o2qwlCZGynIdIY+ocnlI+yXrL0a9H1lqBT8JW1l8ZFp1IwBmAk0q0UTk3xD 8HRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qmx6ZHIO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=86zCoIGf; 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 z10-20020aa7990a000000b0062d7d3c6cadsi16037490pff.333.2023.04.26.02.25.14; Wed, 26 Apr 2023 02:25:26 -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=qmx6ZHIO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=86zCoIGf; 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 S240208AbjDZJNC (ORCPT + 99 others); Wed, 26 Apr 2023 05:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239991AbjDZJMg (ORCPT ); Wed, 26 Apr 2023 05:12:36 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94A72420F; Wed, 26 Apr 2023 02:12:34 -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=cGAJjuVajFTqz5VQpTt1LrqF3WkHJWal8RsfcvGbvSg=; b=qmx6ZHIOwgnvRaH+qPXEWf426o4hsGxYGoowUsFy5eDJ7dyjo0R/PeT4YqUb3twMn0znys H1lzderR70fAxe9NieaeqIfHeb0VyDz5oMevYwR23s719U+H45EbwiXon8xNNsBQyhNah9 oFYJ06QLCzKzY7g801UJwAbPYGfmA883b7n1DxDg/yFI0Zw+r/ME87AmcEaLzXrz/2QlwU iRdnTb7IKjXNM/Cu1cKgCeEY5wxtUpNP2xP9DF7/wiLyPr8p0VOaCmH3fVtnYk7pTAh8Jr jSB9IPWSApphMhh46hyNXViHHv0q+qWBZ/UwL/l42lIYeVDtwPt6odBW37XNUw== 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=cGAJjuVajFTqz5VQpTt1LrqF3WkHJWal8RsfcvGbvSg=; b=86zCoIGf2i/7uRwfBAdx77s+CWHxt/KaNHnqSgGfrN7XIPfr4/6sSuH2kmgm/CEvauVr81 ZOH3FhCOWP3N7+Aw== 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-ti-dm: 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-6-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-6-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Message-ID: <168250035161.404.623276263898104408.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?1764230301825701168?= X-GMAIL-MSGID: =?utf-8?q?1764230301825701168?= The following commit has been merged into the timers/core branch of tip: Commit-ID: b1f0390048e2641d3451f8cdbbef24c79d1a8fdd Gitweb: https://git.kernel.org/tip/b1f0390048e2641d3451f8cdbbef24c79d1a8fdd Author: Uwe Kleine-König AuthorDate: Mon, 13 Mar 2023 08:54:30 +01:00 Committer: Daniel Lezcano CommitterDate: Mon, 24 Apr 2023 16:56:13 +02:00 clocksource/drivers/timer-ti-dm: 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-6-u.kleine-koenig@pengutronix.de --- drivers/clocksource/timer-ti-dm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index 098562b..ab7a6ca 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -1177,7 +1177,7 @@ err_disable: * In addition to freeing platform resources it also deletes the timer * entry from the local list. */ -static int omap_dm_timer_remove(struct platform_device *pdev) +static void omap_dm_timer_remove(struct platform_device *pdev) { struct dmtimer *timer; unsigned long flags; @@ -1199,8 +1199,6 @@ static int omap_dm_timer_remove(struct platform_device *pdev) if (ret) dev_err(&pdev->dev, "Unable to determine timer entry in list of drivers on remove\n"); - - return 0; } static const struct omap_dm_timer_ops dmtimer_ops = { @@ -1275,7 +1273,7 @@ MODULE_DEVICE_TABLE(of, omap_timer_match); static struct platform_driver omap_dm_timer_driver = { .probe = omap_dm_timer_probe, - .remove = omap_dm_timer_remove, + .remove_new = omap_dm_timer_remove, .driver = { .name = "omap_timer", .of_match_table = omap_timer_match,