From: Shile Zhang <shile.zhang@linux.alibaba.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Shile Zhang <shile.zhang@linux.alibaba.com>
Subject: [PATCH] coresight: etm4x: return 0 instead of using local ret variable
Date: Wed, 20 Apr 2022 13:28:31 +0800 [thread overview]
Message-ID: <20220420052831.78566-1-shile.zhang@linux.alibaba.com> (raw)
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 <shile.zhang@linux.alibaba.com>
---
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
next reply other threads:[~2022-04-20 5:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 5:28 Shile Zhang [this message]
2022-04-21 16:42 ` [PATCH] coresight: etm4x: return 0 instead of using local ret variable Mathieu Poirier
2022-04-22 1:43 ` Shile Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220420052831.78566-1-shile.zhang@linux.alibaba.com \
--to=shile.zhang@linux.alibaba.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox