From: YueHaibing <yuehaibing@huawei.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Borislav Petkov <bp@alien8.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
James Morse <james.morse@arm.com>,
linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
Date: Fri, 25 Jan 2019 07:57:10 +0000 [thread overview]
Message-ID: <d97d58f3-5ebd-4580-6a03-685b42770ce4@huawei.com> (raw)
In-Reply-To: <1548383420-163054-1-git-send-email-yuehaibing@huawei.com>
On 2019/1/25 13:41, Julia Lawall wrote:
>
>
> On Fri, 25 Jan 2019, YueHaibing wrote:
>
>> There is no need to have the 'enum hw_event_mc_err_typetype' variable
>> static since new value always be assigned before use it.
>
> How did you find this? If you used some tool, it would really be kind if
> you would reference that tool. People who make tools may need to justify
> that the time that they spend doing so is worthwhile.
Sure, the tool exists in https://github.com/weiyj/dpatch
which run a coccinelle script
>
> julia
>
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>> drivers/edac/debugfs.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/edac/debugfs.c b/drivers/edac/debugfs.c
>> index 0a92772..6736543 100644
>> --- a/drivers/edac/debugfs.c
>> +++ b/drivers/edac/debugfs.c
>> @@ -8,7 +8,7 @@ static ssize_t edac_fake_inject_write(struct file *file,
>> {
>> struct device *dev = file->private_data;
>> struct mem_ctl_info *mci = to_mci(dev);
>> - static enum hw_event_mc_err_type type;
>> + enum hw_event_mc_err_type type;
>> u16 errcount = mci->fake_inject_count;
>>
>> if (!errcount)
>>
>>
>>
>>
>>
>>
>
> .
>
next prev parent reply other threads:[~2019-01-25 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 2:30 [PATCH -next] EDAC: Drop pointless static qualifier in edac_fake_inject_write() YueHaibing
2019-01-25 5:41 ` Julia Lawall
2019-01-25 7:57 ` YueHaibing [this message]
2019-01-25 14:59 ` Julia Lawall
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=d97d58f3-5ebd-4580-6a03-685b42770ce4@huawei.com \
--to=yuehaibing@huawei.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@kernel.org \
/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