From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA660C433EF for ; Fri, 22 Apr 2022 02:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=snLCjWazwoZrT0LzXovYSwuF3Kgq3oOkTxLqVWhaYsA=; b=DBuKFjQeovvTMH BYu56Y6jioD1AUY8LRIKEEH4gAnw6LgDi0QrGrctq7Y6Co3/aR/+3o1G+yrc6XWKaU/pDg+ivpbSw vNZAgPnIrtUENC3WhoqOJJkKANqN693I57YfswX/fCQ6Asgq8gizl1XsOFl0ZRpsVtPOKV+cbz6L5 57e1Lt5UjtC0jVm7oXArYinDUXqPhq5SqlGX0vV2wNNrqt3s9AtO+i6rFxYpsq/66x8v30y8FT7bV qDfd3jlMSE1L7qNjpK4LweHAwFIptjtEaCGBNxref1wpp8HTGUHVac/wpEd/hnlFbyoXnFYjSJsyZ JlPllJk05vuBao+s2klg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhidN-00Ff34-LR; Fri, 22 Apr 2022 02:02:57 +0000 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhidK-00Ff1W-Bx for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 02:02:56 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R571e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04426; MF=shile.zhang@linux.alibaba.com; NM=1; PH=DS; RN=7; SR=0; TI=SMTPD_---0VAjaRr2_1650592960; Received: from e18g09479.et15sqa.tbsite.net(mailfrom:shile.zhang@linux.alibaba.com fp:SMTPD_---0VAjaRr2_1650592960) by smtp.aliyun-inc.com(127.0.0.1); Fri, 22 Apr 2022 10:02:48 +0800 From: Shile Zhang To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Shile Zhang Subject: [PATCH v2] coresight: etm4x: return 0 instead of using local ret variable Date: Fri, 22 Apr 2022 10:02:39 +0800 Message-Id: <20220422020239.37186-1-shile.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.33.0.rc2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_190254_612152_F4F1B86B X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The function etm4_remove_dev() always return 0, and the former function etm4_remove has been changed to void in commit 3fd269e74f2fe ("amba: Make the remove callback return void"). But now its changed back to int type for some reason, which is different to the stable branch linux-5.10.y. Just let it return void and return 0 directly in it's caller function etm4_remove_platform_dev. Signed-off-by: Shile Zhang --- v2: re-work the commit log from Mathieu's suggestion. v1: https://lore.kernel.org/linux-arm-kernel/20220421164217.GB1596562@p14s/T/ --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 7f416a12000eb..141f8209a152a 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2104,7 +2104,7 @@ static void clear_etmdrvdata(void *info) etmdrvdata[cpu] = NULL; } -static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata) +static void __exit etm4_remove_dev(struct etmv4_drvdata *drvdata) { etm_perf_symlink(drvdata->csdev, false); /* @@ -2125,8 +2125,6 @@ static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata) cscfg_unregister_csdev(drvdata->csdev); coresight_unregister(drvdata->csdev); - - return 0; } static void __exit etm4_remove_amba(struct amba_device *adev) @@ -2139,13 +2137,14 @@ static void __exit etm4_remove_amba(struct amba_device *adev) static int __exit etm4_remove_platform_dev(struct platform_device *pdev) { - int ret = 0; struct etmv4_drvdata *drvdata = dev_get_drvdata(&pdev->dev); if (drvdata) - ret = etm4_remove_dev(drvdata); + etm4_remove_dev(drvdata); + pm_runtime_disable(&pdev->dev); - return ret; + + return 0; } static const struct amba_id etm4_ids[] = { -- 2.33.0.rc2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel