Commit e6bbde8
EDAC/mc_sysfs: Add missing newlines when printing {max,dimm}_location
Reading those sysfs entries gives:
[root@localhost /]# cat /sys/devices/system/edac/mc/mc0/max_location
memory 3 [root@localhost /]# cat /sys/devices/system/edac/mc/mc0/dimm0/dimm_location
memory 0 [root@localhost /]#
Add newlines after the value it prints for better readability.
[ bp: Make len a signed int and change the check to catch wraparound.
Increment the pointer p only when the length check passes. Use
scnprintf(). ]
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/1600051734-8993-1-git-send-email-wangxiongfeng2@huawei.com1 parent 07def58 commit e6bbde8
1 file changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| 477 | + | |
477 | 478 | | |
478 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
479 | 483 | | |
480 | 484 | | |
481 | 485 | | |
| |||
813 | 817 | | |
814 | 818 | | |
815 | 819 | | |
816 | | - | |
| 820 | + | |
817 | 821 | | |
| 822 | + | |
818 | 823 | | |
819 | 824 | | |
820 | | - | |
821 | | - | |
822 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
823 | 833 | | |
824 | 834 | | |
| 835 | + | |
| 836 | + | |
825 | 837 | | |
826 | 838 | | |
827 | 839 | | |
| |||
0 commit comments