]> Git Repo - linux.git/commitdiff
cxl/core: use sysfs_emit() for attr's _show()
authorShiyang Ruan <[email protected]>
Fri, 12 Jan 2024 06:27:09 +0000 (14:27 +0800)
committerDan Williams <[email protected]>
Fri, 12 Jan 2024 22:47:04 +0000 (14:47 -0800)
sprintf() is deprecated for sysfs, use preferred sysfs_emit() instead.

Signed-off-by: Shiyang Ruan <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Fan Ni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
drivers/cxl/core/memdev.c

index 2f43d368ba07308c27a2aba69a3a3330f7413325..dae8802ecdb01ee748e3891120bc0011e9e8894e 100644 (file)
@@ -114,7 +114,7 @@ static DEVICE_ATTR_RO(serial);
 static ssize_t numa_node_show(struct device *dev, struct device_attribute *attr,
                              char *buf)
 {
-       return sprintf(buf, "%d\n", dev_to_node(dev));
+       return sysfs_emit(buf, "%d\n", dev_to_node(dev));
 }
 static DEVICE_ATTR_RO(numa_node);
 
This page took 0.055972 seconds and 4 git commands to generate.