[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251030124519.1828058-1-zhongqiu.han@oss.qualcomm.com>
Date: Thu, 30 Oct 2025 20:45:19 +0800
From: Zhongqiu Han <zhongqiu.han@....qualcomm.com>
To: richardcochran@...il.com, jonathan.lemon@...il.com,
vadim.fedorenko@...ux.dev, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
zhongqiu.han@....qualcomm.com
Subject: [PATCH] ptp: ocp: Add newline to sysfs attribute output
Append a newline character to the sysfs_emit() output in ptp_ocp_tty_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@....qualcomm.com>
---
drivers/ptp/ptp_ocp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index a5c363252986..cdff357456aa 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -3430,7 +3430,7 @@ ptp_ocp_tty_show(struct device *dev, struct device_attribute *attr, char *buf)
struct dev_ext_attribute *ea = to_ext_attr(attr);
struct ptp_ocp *bp = dev_get_drvdata(dev);
- return sysfs_emit(buf, "ttyS%d", bp->port[(uintptr_t)ea->var].line);
+ return sysfs_emit(buf, "ttyS%d\n", bp->port[(uintptr_t)ea->var].line);
}
static umode_t
--
2.43.0
Powered by blists - more mailing lists