[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1594971374-40210-1-git-send-email-wangxiongfeng2@huawei.com>
Date: Fri, 17 Jul 2020 15:36:14 +0800
From: Xiongfeng Wang <wangxiongfeng2@...wei.com>
To: <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>
CC: <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<guohanjun@...wei.com>, <wangxiongfeng2@...wei.com>
Subject: [PATCH] [SCSI] libsas: add missing newline when printing 'enable' by sysfs
When I cat sysfs file 'enable' below 'sas_phy', it displays as follows.
It's better to add a newline for easy reading.
[root@...alhost ~]# cat /sys/devices/pci0000:00/0000:00:0d.0/0000:0f:00.0/host3/phy-3:2/sas_phy/phy-3:2/enable
1[root@...alhost ~]#
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@...wei.com>
---
drivers/scsi/scsi_transport_sas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index 182fd25..e443dee 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -563,7 +563,7 @@ static ssize_t do_sas_phy_enable(struct device *dev,
{
struct sas_phy *phy = transport_class_to_phy(dev);
- return snprintf(buf, 20, "%d", phy->enabled);
+ return snprintf(buf, 20, "%d\n", phy->enabled);
}
static DEVICE_ATTR(enable, S_IRUGO | S_IWUSR, show_sas_phy_enable,
--
1.7.12.4
Powered by blists - more mailing lists