summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKuan-Wei Chiu <visitorckw@gmail.com>2025-12-02 08:26:13 +0000
committerSuzuki K Poulose <suzuki.poulose@arm.com>2026-08-07 10:45:10 +0100
commit41fb4e925528aefa4b7a5f76c7f81db99c0d0f38 (patch)
tree1898224f2cc9fa30cd2a153e8264b10621fdf5b2 /scripts
parent8cdeaa50eae8dad34885515f62559ee83e7e8dda (diff)
downloadlinux-41fb4e925528aefa4b7a5f76c7f81db99c0d0f38.tar.gz
linux-41fb4e925528aefa4b7a5f76c7f81db99c0d0f38.zip
coresight: etm3x: Fix cntr_val_show() to match cntr_val_store() behavior
The cntr_val_show() function was intended to print the values of all counters using a loop. However, due to a buffer overwrite issue with sprintf(), it effectively only displayed the value of the last counter. The companion function, cntr_val_store(), allows users to modify a specific counter selected by 'cntr_idx'. To maintain consistency between read and write operations and to align with the ETM4x driver behavior, modify cntr_val_show() to report only the value of the currently selected counter. This change removes the loop and the "counter %d:" prefix, printing only the hexadecimal value. It also adopts sysfs_emit() for standard sysfs output formatting. Fixes: a939fc5a71ad ("coresight-etm: add CoreSight ETM/PTM driver") Cc: stable@vger.kernel.org Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20251202082613.3265761-1-visitorckw@gmail.com
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions