]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI/ASPM: Add missing newline in sysfs 'policy'
authorXiongfeng Wang <wangxiongfeng2@huawei.com>
Fri, 17 Jul 2020 07:59:25 +0000 (15:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:26:37 +0000 (08:26 +0200)
[ Upstream commit 3167e3d340c092fd47924bc4d23117a3074ef9a9 ]

When I cat ASPM parameter 'policy' by sysfs, it displays as follows.  Add a
newline for easy reading.  Other sysfs attributes already include a
newline.

  [root@localhost ~]# cat /sys/module/pcie_aspm/parameters/policy
  [default] performance powersave powersupersave [root@localhost ~]#

Fixes: 7d715a6c1ae5 ("PCI: add PCI Express ASPM support")
Link: https://lore.kernel.org/r/1594972765-10404-1-git-send-email-wangxiongfeng2@huawei.com
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/pcie/aspm.c

index b17e5ffd31b141f8c7f33ea85864dd2d8491cc8d..253c30cc19678a99f0280da6db28a08fb0bec0ee 100644 (file)
@@ -1182,6 +1182,7 @@ static int pcie_aspm_get_policy(char *buffer, const struct kernel_param *kp)
                        cnt += sprintf(buffer + cnt, "[%s] ", policy_str[i]);
                else
                        cnt += sprintf(buffer + cnt, "%s ", policy_str[i]);
+       cnt += sprintf(buffer + cnt, "\n");
        return cnt;
 }