summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@kernel.org>2026-01-17 07:36:26 +0300
committerXu Yilun <yilun.xu@linux.intel.com>2026-03-02 12:47:44 +0300
commit26e5e1be2e640a562618c1aa03ed15b62bfbf2d6 (patch)
tree087262edaac4dfeedf042ce5643148d82496685e
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff)
downloadlinux-26e5e1be2e640a562618c1aa03ed15b62bfbf2d6.tar.xz
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: Dinh Nguyen <dinguyen@kernel.org> [ Yilun: clarify the necessity of the change in changelog ] Reviewed-by: Xu Yilun <yilun.xu@intel.com> Link: https://lore.kernel.org/r/20260117043626.2188219-1-dinguyen@kernel.org Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
-rw-r--r--drivers/fpga/fpga-bridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
index ca68c38aa4a1..8c275bd48a0d 100644
--- a/drivers/fpga/fpga-bridge.c
+++ b/drivers/fpga/fpga-bridge.c
@@ -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,