Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf hwmon_pmu: Avoid shortening hwmon PMU name

Long names like ucsi_source_psy_USBC000:001 when prefixed with hwmon_
exceed the buffer size and the last digit is lost. This causes
confusion with similar names like ucsi_source_psy_USBC000:002. Extend
the buffer size to avoid this.

Fixes: 53cc0b351ec9 ("perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250710235126.1086011-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
28f5aa81 4a6cdeca

+1 -1
+1 -1
tools/perf/util/hwmon_pmu.c
··· 345 345 struct perf_pmu *hwmon_pmu__new(struct list_head *pmus, const char *hwmon_dir, 346 346 const char *sysfs_name, const char *name) 347 347 { 348 - char buf[32]; 348 + char buf[64]; 349 349 struct hwmon_pmu *hwm; 350 350 __u32 type = PERF_PMU_TYPE_HWMON_START + strtoul(sysfs_name + 5, NULL, 10); 351 351