Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp839389pxb; Fri, 22 Apr 2022 12:17:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4xxwnLiuNUbsiibOD3HRJNuAkGGyqqwgfcqF0iJvnaEnVdY7KuLG5/bwgj9AzLQY8O2Jr X-Received: by 2002:a17:902:e84d:b0:158:cd1b:8168 with SMTP id t13-20020a170902e84d00b00158cd1b8168mr5802987plg.43.1650655029034; Fri, 22 Apr 2022 12:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650655029; cv=none; d=google.com; s=arc-20160816; b=SD24bfXiSRdDgBrM9WA7dfyxf/WtgQ7G4lS10sSRWqGqxHxEVqYgsWXUy6pXnpjuHz TTqZR+E9lrB6XmcuJYrbDZcCDT2LRixvx2IzFmOND4OabFKTo+N+HUFcHU+k9YJvCWsM 2ws8IzvYsspza4e+3/KBrCYy/RB9UTtPDclXEqPyudyuWHCMek5Fuai6xS1mGCRMeRgE BrMWgQnBRcJ+wNvb5qf2fVzYaW3frsAPKC4Cy4N7aPWCQXcUth3cNqRUuVJz9LwB0Shx +qC+MAS/HbU04EaRuZwsTXsfcOxoW/jDTz+R0ba7PbNaR+wVYMtsKnmXhM6Dy3oNTijQ VREg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=cM7ZGp2buyAXB0Z71rHIc9AHIbOU775kBI1iQDbdS5s=; b=kEfNjnZLcgu2dar3Iy1yQor04aON4y0rGYjztniD8hha9BnYHoLBczfXvffgR/1ul2 yR+06QuWI6vqHb7Iu/sSE5+Zg7qJLd/F5xDk0iDd1BJIpA9T2ROS8Eiad8RYEwctiWVS dj4lNdtkgGDBzqM4jUJJumisJdkfKl8iXZOcu0qu/lWsEAWyvuVEEa+taBbW8SuQNcMY ETocNtpi1oYuI2eRe607qIaMLQ5AADQj0jENPDJpFafhHUjMZyx0FaGBpxc72FjUZsqr ZITd0H+t8sZmwxDzqEBBBGZvU+xOnse+GapNOR0z0bwarwbT9kEo4oTGhk1nDnTuEacy w+1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u13-20020a170902e80d00b0015c918b6198si1894961plg.4.2022.04.22.12.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:17:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 222DFC6667; Fri, 22 Apr 2022 11:32:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443259AbiDVCFo (ORCPT + 99 others); Thu, 21 Apr 2022 22:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233237AbiDVCFn (ORCPT ); Thu, 21 Apr 2022 22:05:43 -0400 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE26B4A92D for ; Thu, 21 Apr 2022 19:02:51 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,UNPARSEABLE_RELAY autolearn=no 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 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