Thread (16 messages) 16 messages, 3 authors, 8d ago
COOLING8d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 07/11] hwtracing: hisi_ptt: Use sysfs_emit() for cpumask show

From: Yury Norov <hidden>
Date: 2026-07-02 15:48:21
Also in: driver-core, imx, linux-amlogic, linux-arm-msm, linux-cxl, linux-fpga, linux-pci, linux-perf-users, linux-pm, linux-rdma, linux-rockchip, lkml
Subsystem: hardware tracing facilities, hisilicon ptt driver, the rest · Maintainers: Alexander Shishkin, Yicong Yang, Jonathan Cameron, Linus Torvalds

cpumask_show() is a sysfs show callback. Use sysfs_emit() and
cpumask_pr_args() to emit the mask.

This prepares for removing cpumap_print_to_pagebuf().

Signed-off-by: Yury Norov <redacted>
---
 drivers/hwtracing/ptt/hisi_ptt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c
index 94c371c49135..233c4c32513c 100644
--- a/drivers/hwtracing/ptt/hisi_ptt.c
+++ b/drivers/hwtracing/ptt/hisi_ptt.c
@@ -780,7 +780,7 @@ static ssize_t cpumask_show(struct device *dev, struct device_attribute *attr,
 	struct hisi_ptt *hisi_ptt = to_hisi_ptt(dev_get_drvdata(dev));
 	const cpumask_t *cpumask = cpumask_of_node(dev_to_node(&hisi_ptt->pdev->dev));
 
-	return cpumap_print_to_pagebuf(true, buf, cpumask);
+	return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(cpumask));
 }
 static DEVICE_ATTR_RO(cpumask);
 
-- 
2.53.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help