All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] coresight: etm4x: Fix issues within reset interface of sysfs
@ 2020-08-31  9:22 Jonathan Zhou
  2020-08-31 22:23 ` Mathieu Poirier
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Zhou @ 2020-08-31  9:22 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mathieu Poirier, Suzuki K Poulose, lizixian, Shaokun Zhang,
	Jonathan Zhou, Mike Leach

The member @nr_addr_cmp is not a bool value, using operator '>'
instead to avoid unexpected failure.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: lizixian@hisilicon.com
Signed-off-by: Jonathan Zhou <jonathan.zhouwen@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) {
 		config->mode |= ETM_MODE_VIEWINST_STARTSTOP;
 		/* SSSTATUS, bit[9] */
 		config->vinst_ctrl |= BIT(9);
-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] coresight: etm4x: Fix issues within reset interface of sysfs
  2020-08-31  9:22 [PATCH] coresight: etm4x: Fix issues within reset interface of sysfs Jonathan Zhou
@ 2020-08-31 22:23 ` Mathieu Poirier
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2020-08-31 22:23 UTC (permalink / raw)
  To: Jonathan Zhou
  Cc: Shaokun Zhang, lizixian, Mike Leach, linux-arm-kernel, Suzuki K Poulose

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@linaro.org>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Mike Leach <mike.leach@linaro.org>
> Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
> Cc: lizixian@hisilicon.com
> Signed-off-by: Jonathan Zhou <jonathan.zhouwen@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
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-31 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31  9:22 [PATCH] coresight: etm4x: Fix issues within reset interface of sysfs Jonathan Zhou
2020-08-31 22:23 ` Mathieu Poirier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.