From cdf8337deae783094302cda86761421d134886b3 Mon Sep 17 00:00:00 2001 From: liqiang Date: Fri, 3 Jul 2020 16:44:13 +0800 Subject: [PATCH] Modify display information of read_unique --- prefetch_mod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prefetch_mod.c b/prefetch_mod.c index ee83011..dc3866f 100644 --- a/prefetch_mod.c +++ b/prefetch_mod.c @@ -115,8 +115,8 @@ static ssize_t read_unique_show(struct device* dev, for_each_cpu(cpu, prefetch_cpumask_value) { int *ptr = per_cpu_ptr(cur, cpu); - count += scnprintf(buf + count, PAGE_SIZE, "cpu(%d): %s.\n", - cpu, (ptr == NULL) ? "n/a" : *ptr); + count += scnprintf(buf + count, PAGE_SIZE, "cpu(%d): %d.\n", + cpu, (ptr == NULL) ? -1 : *ptr); } mutex_unlock(&prefetch_mtx); free_percpu(cur); -- GitLab