Skip to content

Commit 73bf93e

Browse files
iridesdjbw
authored andcommitted
cxl/core: use sysfs_emit() for attr's _show()
sprintf() is deprecated for sysfs, use preferred sysfs_emit() instead. Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Link: https://lore.kernel.org/r/20240112062709.2490947-1-ruansy.fnst@fujitsu.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 3601311 commit 73bf93e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cxl/core/memdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static DEVICE_ATTR_RO(serial);
114114
static ssize_t numa_node_show(struct device *dev, struct device_attribute *attr,
115115
char *buf)
116116
{
117-
return sprintf(buf, "%d\n", dev_to_node(dev));
117+
return sysfs_emit(buf, "%d\n", dev_to_node(dev));
118118
}
119119
static DEVICE_ATTR_RO(numa_node);
120120

0 commit comments

Comments
 (0)