Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1818211ybh; Fri, 17 Jul 2020 01:52:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymZHJE4tFbqY39HtDhvAVDoYmhBjC2dyF0Ffv9c4AIOOKl/0MW7uwM8G4glvrb7aLV6qZN X-Received: by 2002:a50:bf09:: with SMTP id f9mr8057792edk.249.1594975931636; Fri, 17 Jul 2020 01:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594975931; cv=none; d=google.com; s=arc-20160816; b=CqWMo5fgrVWiFnZJBuTkA1EeMso/5O0OOehFbmkUiG2CK1iNkn73kkpvwwqQSi5Sil z9I4IOj++L+VG0T28u7vAVM0brcoZeOXLoFI0Vli06rM0OADX8KKRgfYzyN25yF+x3fP kSZXfn+QqWQqTLYM8kj/ym9hMaZsGtoY329In+Gzvdj2vG/Ys2onMcMlRiFeglCGA0Q8 vbHVAkNn9/lxSozR/FPEqPH++SoWiaGYCXprL6HeUYf8mI1+GW9UjAQ4EskkHEHKWrDE dZV83hePfwrwagvgAzQXQ3V6dajrLr4g6VEMklKpfLgd5IcaELnmpK8JFXkDVPftDfC7 o1Hg== 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=TC7RVUaQEHuOnE6qLFsYYbhRDD7R6PXIJZWZhRT0P9o=; b=dwHFzjlWkVs77GPtcV9VNtJQJQ5PbVbba6K58PxzDCfVXYBuDBwvNBJsjELWuRU7CX B1ZjT0YRlHedzgUmXVM4NDouGfbcYyMFB0EzBHONufRlXKHACiXk0ld/cp7IYQLQBH+C Umfu80xWVpNkKdiJrv/YvSgxQ3Rvt3k6oAP9WDfVAQDdkKmUjEvcFgpysBxHATofr1qR xr4umMZ500csI1/Zwb8N5SS/6sRq3c4rjXFKxXNYtPFZ+VsXKETlJZw5g5TYbK4xuMbd kLQX7ettmQ9CR4E03snsG4KNugxM1Az0G5C/aVjormhbkcd6SUIKfdD3RcLk2Q3p+rc6 0LUA== 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 n11si4660222ejs.209.2020.07.17.01.51.48; Fri, 17 Jul 2020 01:52:11 -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 S1726250AbgGQIvR (ORCPT + 99 others); Fri, 17 Jul 2020 04:51:17 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:54168 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725970AbgGQIvR (ORCPT ); Fri, 17 Jul 2020 04:51:17 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 937D9A3AC8D0FF4393C1; Fri, 17 Jul 2020 16:51:14 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Fri, 17 Jul 2020 16:51:03 +0800 From: Xiongfeng Wang To: , , CC: , , , Subject: [PATCH v2] scsi: scsi_transport_sas: add missing newline when printing 'enable' by sysfs Date: Fri, 17 Jul 2020 16:44:32 +0800 Message-ID: <1594975472-12486-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 Reviewed-by: John Garry --- v1 -> v2: modify commit subject. add Reviewed-by tag. --- 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