Skip to content

Commit

Permalink
coresight: etm4x: Fix issues within reset interface of sysfs
Browse files Browse the repository at this point in the history
The member @nr_addr_cmp is not a bool value, using operator '>'
instead to avoid unexpected failure.

Fixes: a77de26 ("coresight: etm4x: moving sysFS entries to a dedicated file")
Cc: Mathieu Poirier <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Shaokun Zhang <[email protected]>
Signed-off-by: Jonathan Zhou <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Jonathan-Zms authored and gregkh committed Sep 17, 2020
1 parent 096dcfb commit 4020fc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4020fc8

Please sign in to comment.