public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mei: bus: Add newline to sysfs attribute outputs
@ 2025-10-30 12:30 Zhongqiu Han
  2025-10-30 12:32 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Zhongqiu Han @ 2025-10-30 12:30 UTC (permalink / raw)
  To: alexander.usyskin, arnd, gregkh; +Cc: linux-kernel, zhongqiu.han

Append newline characters to sysfs_emit() outputs in func max_conn_show(),
fixed_show(), and vtag_show(). This aligns with common kernel conventions
and improves readability for userspace tools that expect
newline-terminated values.

Signed-off-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
---
 drivers/misc/mei/bus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 2c810ab12e62..8876c79bacfb 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -1210,7 +1210,7 @@ static ssize_t max_conn_show(struct device *dev, struct device_attribute *a,
 	struct mei_cl_device *cldev = to_mei_cl_device(dev);
 	u8 maxconn = mei_me_cl_max_conn(cldev->me_cl);
 
-	return sysfs_emit(buf, "%d", maxconn);
+	return sysfs_emit(buf, "%d\n", maxconn);
 }
 static DEVICE_ATTR_RO(max_conn);
 
@@ -1220,7 +1220,7 @@ static ssize_t fixed_show(struct device *dev, struct device_attribute *a,
 	struct mei_cl_device *cldev = to_mei_cl_device(dev);
 	u8 fixed = mei_me_cl_fixed(cldev->me_cl);
 
-	return sysfs_emit(buf, "%d", fixed);
+	return sysfs_emit(buf, "%d\n", fixed);
 }
 static DEVICE_ATTR_RO(fixed);
 
@@ -1230,7 +1230,7 @@ static ssize_t vtag_show(struct device *dev, struct device_attribute *a,
 	struct mei_cl_device *cldev = to_mei_cl_device(dev);
 	bool vt = mei_me_cl_vt(cldev->me_cl);
 
-	return sysfs_emit(buf, "%d", vt);
+	return sysfs_emit(buf, "%d\n", vt);
 }
 static DEVICE_ATTR_RO(vtag);
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-03 13:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 12:30 [PATCH] mei: bus: Add newline to sysfs attribute outputs Zhongqiu Han
2025-10-30 12:32 ` Greg KH
2025-10-30 13:11   ` Zhongqiu Han
2025-11-03  0:25     ` Greg KH
2025-11-03 13:43       ` Zhongqiu Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox