From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
To: Borislav Petkov <bp@alien8.de>
Cc: <mchehab@kernel.org>, <tony.luck@intel.com>,
<linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EDAC/mc_sysfs: add missing newlines when printing 'max(dimm)_location'
Date: Fri, 11 Sep 2020 16:05:40 +0800 [thread overview]
Message-ID: <ab222053-d4e5-eb0b-a7a3-e8158cac1b88@huawei.com> (raw)
In-Reply-To: <20200910110012.GD8357@zn.tnic>
On 2020/9/10 19:00, Borislav Petkov wrote:
> On Fri, Sep 04, 2020 at 04:19:23PM +0800, Xiongfeng Wang wrote:
>> When I cat 'max_location' and 'dimm_location' by sysfs, it displays as
>> follows. It's better to add a newline for easy reading.
>>
>> [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 /]#
>
> Please use this commit message for your next version:
>
> 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.
Thanks for your advice. I will add it in the next version.
>
>> @@ -821,6 +825,7 @@ static ssize_t mci_max_location_show(struct device *dev,
>> edac_layer_name[mci->layers[i].type],
>> mci->layers[i].size - 1);
>> }
>> + p += sprintf(p, "\n");
>
> No size checking here?
I can check if it's larger than PAGE_SIZE.
Thanks,
Xiongfeng
>
prev parent reply other threads:[~2020-09-11 8:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 8:19 [PATCH] EDAC/mc_sysfs: add missing newlines when printing 'max(dimm)_location' Xiongfeng Wang
2020-09-10 11:00 ` Borislav Petkov
2020-09-11 8:05 ` Xiongfeng Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab222053-d4e5-eb0b-a7a3-e8158cac1b88@huawei.com \
--to=wangxiongfeng2@huawei.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).