Commit 26e5e1be authored by Dinh Nguyen's avatar Dinh Nguyen Committed by Xu Yilun
Browse files

fpga: bridge: Use sysfs_emit() instead of sprintf()



According to Documentation/filesystems/sysfs.rst, show() functions
should use sysfs_emit() when formatting the value to be returned to user
space.

This keeps consistent usage of sysfs_emit() across the same file.

Signed-off-by: default avatarDinh Nguyen <dinguyen@kernel.org>
[ Yilun: clarify the necessity of the change in changelog ]
Reviewed-by: default avatarXu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/20260117043626.2188219-1-dinguyen@kernel.org


Signed-off-by: default avatarXu Yilun <yilun.xu@linux.intel.com>
parent 6de23f81
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ static ssize_t name_show(struct device *dev,
{
	struct fpga_bridge *bridge = to_fpga_bridge(dev);

	return sprintf(buf, "%s\n", bridge->name);
	return sysfs_emit(buf, "%s\n", bridge->name);
}

static ssize_t state_show(struct device *dev,