Thread (26 messages) flat view 26 messages, 4 authors, 4d ago

Re: [PATCH v7 12/15] net: qrtr: mhi: Report endpoint id in sysfs

From: Arthur Crepin Leblond <hidden>
Date: 2026-09-15 07:11:51
Also in: ath11k, ath12k, linux-arm-msm, linux-wireless, lkml

On Tue, Sep 15, 2026 at 08:42:04AM +0300, Juha-Matti Tilli wrote:
+static ssize_t endpoint_show(struct device *dev,
+			     struct device_attribute *attr, char *buf)
+{
+	struct qrtr_mhi_dev *qdev = dev_get_drvdata(dev);
+
+	return sprintf(buf, "%u\n", qdev->ep.id);
+}
+
+static DEVICE_ATTR_RO(endpoint);
I think you could use sysfs_emit instead of sprintf.

https://docs.kernel.org/filesystems/sysfs.html#reading-writing-attribute-data

Arthur
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help