Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1788665ybh; Fri, 17 Jul 2020 00:46:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyu7RR7QBOEM4Egrv4n2t+LSHxmJQzJEC4L/cM/9URZH+uD1g/lZLaRB0lvXCmkhXMbRb2/ X-Received: by 2002:a50:fe16:: with SMTP id f22mr8066352edt.315.1594971997561; Fri, 17 Jul 2020 00:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594971997; cv=none; d=google.com; s=arc-20160816; b=NXKQlyYArI2s13Js8heNrAXevNEYB0lzS9ijhyBORWxuylmZV9Q0R2xprwxF/Y7Z22 tVVqS33G393Uzr6rgYrkCJbJQR04S1v0oBTQ/nVeF+gFiNrMmMIkQ/I/B8bvMyaZrRDX iXVvFmyGgiFKVM3wd6OqQySrqwLuMSLe6xYFHpRkUgoKIslJzv08TSEQyGGgDGjgpMw8 gNaH4qkNN88hdILDWU/PxOQxY4YkbKKqK/S4H/iA9lorQiHK05rvw26ACZK02M52bFgl kX4NtlMqEf12vYOf8Cn2wNbkdog9wu3MqJWRk3KvuzVKltQ8FCS4IG91Q+vlOVa0oSOJ ybIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=rwsJwNcyELgplMTtaVdtRJrXc2rXQkZv6wHDKPt9KDM=; b=iaie2m6NZNxnTuRFojACy3mgMHI2Mb0XJs2lQ4g2fFWBnemX43us/rUOjPoxsDo99c bcLs6q/UpcFY2luwc5LprQYXK4BR5OpuajO55TDZ4RGI6M1gTLyZ7X5K4ZNbn873hWZA suFwVAdNoDqYa7n8LQLmZRRqxPArBTRLJHIxR4WKTz/M5Lr+l6gmyiCuCJs4A3p6iEb5 Zyus4sZb5AuegaWqgQVNmK0Cd6YF9fuR3A1/VjOi51+tIRWC/hFTdFuopAo3dGsL4+k6 RY9ojC3IdHPAAgqhV4hFCCBMjH1Z5agu2BC0DEdYnrPkb1MfJpNycOczFXMOU7mLXxUu b3Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si4712346ejt.141.2020.07.17.00.46.14; Fri, 17 Jul 2020 00:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726852AbgGQHnB (ORCPT + 99 others); Fri, 17 Jul 2020 03:43:01 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:52032 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726101AbgGQHnB (ORCPT ); Fri, 17 Jul 2020 03:43:01 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6151D46A4A6BD0A29970; Fri, 17 Jul 2020 15:42:54 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Fri, 17 Jul 2020 15:42:46 +0800 From: Xiongfeng Wang To: , CC: , , , Subject: [PATCH] [SCSI] libsas: add missing newline when printing 'enable' by sysfs Date: Fri, 17 Jul 2020 15:36:14 +0800 Message-ID: <1594971374-40210-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When I cat sysfs file 'enable' below 'sas_phy', it displays as follows. It's better to add a newline for easy reading. [root@localhost ~]# 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@localhost ~]# Signed-off-by: Xiongfeng Wang --- 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