[PATCH] coresight: etm4x: Fix issues within reset interface of sysfs

Mathieu Poirier mathieu.poirier at linaro.org
Mon Aug 31 18:23:23 EDT 2020


On Mon, Aug 31, 2020 at 05:22:05PM +0800, Jonathan Zhou wrote:
> The member @nr_addr_cmp is not a bool value, using operator '>'
> instead to avoid unexpected failure.
> 
> Cc: Mathieu Poirier <mathieu.poirier at linaro.org>
> Cc: Suzuki K Poulose <suzuki.poulose at arm.com>
> Cc: Mike Leach <mike.leach at linaro.org>
> Cc: Shaokun Zhang <zhangshaokun at hisilicon.com>
> Cc: lizixian at hisilicon.com
> Signed-off-by: Jonathan Zhou <jonathan.zhouwen at huawei.com>
> ---
>  drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> index b673e738bc9a..a588cd6de01c 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> @@ -206,7 +206,7 @@ static ssize_t reset_store(struct device *dev,
>  	 * each trace run.
>  	 */
>  	config->vinst_ctrl = BIT(0);
> -	if (drvdata->nr_addr_cmp == true) {
> +	if (drvdata->nr_addr_cmp > 0) {

I have applied your patch.

Thanks,
Mathieu

>  		config->mode |= ETM_MODE_VIEWINST_STARTSTOP;
>  		/* SSSTATUS, bit[9] */
>  		config->vinst_ctrl |= BIT(9);
> -- 
> 1.9.1
> 



More information about the linux-arm-kernel mailing list