linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/ASPM: add missing newline when printing parameter 'policy' by sysfs
@ 2020-07-17  7:59 Xiongfeng Wang
  2020-07-17 21:36 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Xiongfeng Wang @ 2020-07-17  7:59 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, linux-kernel, guohanjun, wangxiongfeng2

When I cat ASPM parameter 'policy' by sysfs, it displays as follows.
It's better to add a newline for easy reading.

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

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
---
 drivers/pci/pcie/aspm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index b17e5ff..253c30c 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -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;
 }
 
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI/ASPM: add missing newline when printing parameter 'policy' by sysfs
  2020-07-17  7:59 [PATCH] PCI/ASPM: add missing newline when printing parameter 'policy' by sysfs Xiongfeng Wang
@ 2020-07-17 21:36 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2020-07-17 21:36 UTC (permalink / raw)
  To: Xiongfeng Wang; +Cc: bhelgaas, linux-pci, linux-kernel, guohanjun

On Fri, Jul 17, 2020 at 03:59:25PM +0800, Xiongfeng Wang wrote:
> When I cat ASPM parameter 'policy' by sysfs, it displays as follows.
> It's better to add a newline for easy reading.
> 
> [root@localhost ~]# cat /sys/module/pcie_aspm/parameters/policy
> [default] performance powersave powersupersave [root@localhost ~]#
> 
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>

Applied to pci/aspm for v5.9, thanks!

> ---
>  drivers/pci/pcie/aspm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index b17e5ff..253c30c 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -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;
>  }
>  
> -- 
> 1.7.12.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-17 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  7:59 [PATCH] PCI/ASPM: add missing newline when printing parameter 'policy' by sysfs Xiongfeng Wang
2020-07-17 21:36 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).