All of lore.kernel.org
 help / color / mirror / Atom feed
* [-next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
@ 2019-01-25  2:30 ` YueHaibing
  0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-01-25  2:30 UTC (permalink / raw)
  To: Borislav Petkov, Mauro Carvalho Chehab, James Morse
  Cc: YueHaibing, linux-edac, kernel-janitors

There is no need to have the 'enum hw_event_mc_err_typetype' variable
static since new value always be assigned before use it.

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)

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

* [PATCH -next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
@ 2019-01-25  2:30 ` YueHaibing
  0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-01-25  2:30 UTC (permalink / raw)
  To: Borislav Petkov, Mauro Carvalho Chehab, James Morse
  Cc: YueHaibing, linux-edac, kernel-janitors

There is no need to have the 'enum hw_event_mc_err_typetype' variable
static since new value always be assigned before use it.

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)

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

* [-next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
  2019-01-25  2:30 ` [PATCH -next] " YueHaibing
@ 2019-01-25  5:41 ` Julia Lawall
  -1 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2019-01-25  5:41 UTC (permalink / raw)
  To: YueHaibing
  Cc: Borislav Petkov, Mauro Carvalho Chehab, James Morse, linux-edac,
	kernel-janitors

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.

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)
>
>
>
>
>
>

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

* Re: [PATCH -next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
@ 2019-01-25  5:41 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2019-01-25  5:41 UTC (permalink / raw)
  To: YueHaibing
  Cc: Borislav Petkov, Mauro Carvalho Chehab, James Morse, linux-edac,
	kernel-janitors



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.

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)
>
>
>
>
>
>

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

* [-next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
  2019-01-25  2:30 ` [PATCH -next] " YueHaibing
@ 2019-01-25  7:57 ` YueHaibing
  -1 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-01-25  7:57 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Borislav Petkov, Mauro Carvalho Chehab, James Morse, linux-edac,
	kernel-janitors

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)
>>
>>
>>
>>
>>
>>
> 
> .
>

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

* Re: [PATCH -next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
@ 2019-01-25  7:57 ` YueHaibing
  0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-01-25  7:57 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Borislav Petkov, Mauro Carvalho Chehab, James Morse, linux-edac,
	kernel-janitors

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)
>>
>>
>>
>>
>>
>>
> 
> .
> 

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

* [-next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
  2019-01-25  2:30 ` [PATCH -next] " YueHaibing
@ 2019-01-25 14:59 ` Julia Lawall
  -1 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2019-01-25 14:59 UTC (permalink / raw)
  To: YueHaibing
  Cc: Borislav Petkov, Mauro Carvalho Chehab, James Morse, linux-edac,
	kernel-janitors

On Fri, 25 Jan 2019, YueHaibing wrote:

> 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

OK, so your could say: Found using dpatch running a Coccinelle rule.  Or
something like that.

julia

>
> >
> > 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)
> >>
> >>
> >>
> >>
> >>
> >>
> >
> > .
> >
>
>

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

* Re: [PATCH -next] EDAC: Drop pointless static qualifier in edac_fake_inject_write()
@ 2019-01-25 14:59 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2019-01-25 14:59 UTC (permalink / raw)
  To: YueHaibing
  Cc: Borislav Petkov, Mauro Carvalho Chehab, James Morse, linux-edac,
	kernel-janitors



On Fri, 25 Jan 2019, YueHaibing wrote:

> 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

OK, so your could say: Found using dpatch running a Coccinelle rule.  Or
something like that.

julia

>
> >
> > 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)
> >>
> >>
> >>
> >>
> >>
> >>
> >
> > .
> >
>
>

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

end of thread, other threads:[~2019-01-25 14:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25  5:41 [-next] EDAC: Drop pointless static qualifier in edac_fake_inject_write() Julia Lawall
2019-01-25  5:41 ` [PATCH -next] " Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2019-01-25 14:59 [-next] " Julia Lawall
2019-01-25 14:59 ` [PATCH -next] " Julia Lawall
2019-01-25  7:57 [-next] " YueHaibing
2019-01-25  7:57 ` [PATCH -next] " YueHaibing
2019-01-25  2:30 [-next] " YueHaibing
2019-01-25  2:30 ` [PATCH -next] " YueHaibing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.