Skip to content
Snippets Groups Projects
Commit 2cd54140 authored by Leo Yan's avatar Leo Yan Committed by Greg Kroah-Hartman
Browse files

coresight: tmc: minor fix for output log


In current code the output logs are not well symmetric for sink and link
enabling and disabling. This patch is to fix that so can output paired
logs.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d755209f
No related branches found
No related tags found
No related merge requests found
...@@ -166,9 +166,6 @@ static int tmc_enable_etf_sink_sysfs(struct coresight_device *csdev) ...@@ -166,9 +166,6 @@ static int tmc_enable_etf_sink_sysfs(struct coresight_device *csdev)
if (!used) if (!used)
kfree(buf); kfree(buf);
if (!ret)
dev_info(drvdata->dev, "TMC-ETB/ETF enabled\n");
return ret; return ret;
} }
...@@ -204,15 +201,27 @@ static int tmc_enable_etf_sink_perf(struct coresight_device *csdev) ...@@ -204,15 +201,27 @@ static int tmc_enable_etf_sink_perf(struct coresight_device *csdev)
static int tmc_enable_etf_sink(struct coresight_device *csdev, u32 mode) static int tmc_enable_etf_sink(struct coresight_device *csdev, u32 mode)
{ {
int ret;
struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
switch (mode) { switch (mode) {
case CS_MODE_SYSFS: case CS_MODE_SYSFS:
return tmc_enable_etf_sink_sysfs(csdev); ret = tmc_enable_etf_sink_sysfs(csdev);
break;
case CS_MODE_PERF: case CS_MODE_PERF:
return tmc_enable_etf_sink_perf(csdev); ret = tmc_enable_etf_sink_perf(csdev);
break;
/* We shouldn't be here */
default:
ret = -EINVAL;
break;
} }
/* We shouldn't be here */ if (ret)
return -EINVAL; return ret;
dev_info(drvdata->dev, "TMC-ETB/ETF enabled\n");
return 0;
} }
static void tmc_disable_etf_sink(struct coresight_device *csdev) static void tmc_disable_etf_sink(struct coresight_device *csdev)
...@@ -273,7 +282,7 @@ static void tmc_disable_etf_link(struct coresight_device *csdev, ...@@ -273,7 +282,7 @@ static void tmc_disable_etf_link(struct coresight_device *csdev,
drvdata->mode = CS_MODE_DISABLED; drvdata->mode = CS_MODE_DISABLED;
spin_unlock_irqrestore(&drvdata->spinlock, flags); spin_unlock_irqrestore(&drvdata->spinlock, flags);
dev_info(drvdata->dev, "TMC disabled\n"); dev_info(drvdata->dev, "TMC-ETF disabled\n");
} }
static void *tmc_alloc_etf_buffer(struct coresight_device *csdev, int cpu, static void *tmc_alloc_etf_buffer(struct coresight_device *csdev, int cpu,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment