Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4602730pxb; Wed, 20 Apr 2022 06:43:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziV29y+aW8ox+ylwjymHCraCD0DK/agpqk55LWa24nkKw4Le0VO4SkNSJbCojjGOJHLYVH X-Received: by 2002:aa7:d292:0:b0:41d:7933:1f00 with SMTP id w18-20020aa7d292000000b0041d79331f00mr23115104edq.237.1650462225109; Wed, 20 Apr 2022 06:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650462225; cv=none; d=google.com; s=arc-20160816; b=UwsnYPNxW97h2uS3QGMStFSV1g/S3hI9SCQhICklV/rru5kxEW6GE31AvnMgoeSscH xxlItK76b2QRnzidpZkpr5JcB7WBiRJ+XKqEw6WAR6LunOfmpOJqRqwNeYr0eX0z5rPn 7P753OHZHej1Sau1Kk1VbRN0tYhKEPENiNsNqRuoe+j/iOl+roEi+UfYfEozJWHzyZ3G 2KjLQyQMA1iRUXagtFUxo/3l6K632yNTWGeTPJ8+ErYieO7GlcYwDlUYlYExw713J8BF om9k2qoq4Ym9KBa4AuySrhVt/mLjOpl/PMXl07DzZZDbzbLIiU+Rvz4oEkUUr60Jq+F2 X5cA== 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=O8ZjJ/QlbY1EfoLyjjpz3edwWIxOShYWad4xW9rjFQA=; b=bVeND7G1ASxxEpfd9k9qxTgpRmreO8BzbqUcpwxwKp/frCj60f2Wsmz1dnQjbD4rRO Ru0pM2ZFgP0azNHBjwONhgBoj67P5fRGHXKqV0ijOciboAtNyv7+xQ50bTUZRNg/yBEu J3kQfYKzZx5FcltSiPQ1W76H4ykXsfx96YqSFL/T5yYpkgKpKIngxoKvu5mTT+zRRcKH i3rfvgfhes/IjNl9ealeOJqA6FEzvUGpPe4DwIqlxitwFb5/xo9TaYWK0ttd1PZeSC2p Aboj0AKOKC3UgxIdsoJyuIPLKP+TKqdSeS3qBAm69ioIFEnATSOUtJpDYzWw1AF2xrKF kEQQ== 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020a056402524600b0041953d28471si1622682edd.235.2022.04.20.06.43.20; Wed, 20 Apr 2022 06:43:45 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245659AbiDTFbh (ORCPT + 99 others); Wed, 20 Apr 2022 01:31:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231815AbiDTFbe (ORCPT ); Wed, 20 Apr 2022 01:31:34 -0400 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1579F36319 for ; Tue, 19 Apr 2022 22:28:47 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=shile.zhang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VAYbcYg_1650432513; Received: from e18g09479.et15sqa.tbsite.net(mailfrom:shile.zhang@linux.alibaba.com fp:SMTPD_---0VAYbcYg_1650432513) by smtp.aliyun-inc.com(127.0.0.1); Wed, 20 Apr 2022 13:28:45 +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] coresight: etm4x: return 0 instead of using local ret variable Date: Wed, 20 Apr 2022 13:28:31 +0800 Message-Id: <20220420052831.78566-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=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 The etm4_remove function (now it's rename to etm4_remove_dev) always return 0, and it has been changed to void in commit 4fd269e74f2f ("amba: Make the remove callback return void"). But its weird that the changes is gone in mainline. which is remained in 5.10.y branch. Just backport the changes of etm4_remove_dev and return 0 directly in it's caller function etm4_remove_platform_dev. Signed-off-by: Shile Zhang --- 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 7f416a12000e..141f8209a152 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