lkml.org 
[lkml]   [2018]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 03/13] coresight: tmc-etb/etf: Prepare to handle errors enabling
From
Date
On 15/08/18 20:22, Mathieu Poirier wrote:
> On Mon, Aug 06, 2018 at 02:41:45PM +0100, Suzuki K Poulose wrote:
>> Prepare to handle errors in enabling the hardware and
>> report it back to the core driver.
>>
>> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> ---
>> drivers/hwtracing/coresight/coresight-tmc-etf.c | 71 +++++++++++++++----------
>> 1 file changed, 44 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c
>> index 4156c95..ceb4b30 100644
>> --- a/drivers/hwtracing/coresight/coresight-tmc-etf.c
>> +++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c

>> @@ -271,6 +285,7 @@ static void tmc_disable_etf_sink(struct coresight_device *csdev)
>> static int tmc_enable_etf_link(struct coresight_device *csdev,
>> int inport, int outport)
>> {
>> + int ret;
>> unsigned long flags;
>> struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
>>
>> @@ -280,11 +295,13 @@ static int tmc_enable_etf_link(struct coresight_device *csdev,
>> return -EBUSY;
>> }
>>
>> - tmc_etf_enable_hw(drvdata);
>> - drvdata->mode = CS_MODE_SYSFS;
>> + ret = tmc_etf_enable_hw(drvdata);
>> + if (!ret)
>> + drvdata->mode = CS_MODE_SYSFS;
>> spin_unlock_irqrestore(&drvdata->spinlock, flags);
>>
>> - dev_dbg(drvdata->dev, "TMC-ETF enabled\n");
>> + if (!ret)
>> + dev_dbg(drvdata->dev, "TMC-ETF enabled\n");
>> return 0;
>
> We need to tell the caller if an error as occured:
>
> return ret;
>

Thanks for catching it, will fix.

Suzuki

\
 
 \ /
  Last update: 2018-08-16 16:48    [W:0.086 / U:3.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site