linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
@ 2017-01-28  8:49 Martin Karamihov
  2017-01-28  9:11 ` Greg KH
  2017-01-31 19:24 ` [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix) Martin Karamihov
  0 siblings, 2 replies; 13+ messages in thread
From: Martin Karamihov @ 2017-01-28  8:49 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, devel, linux-kernel

Signed-off-by: Martin Karamihov <martinowar@gmail.com>
---
checkpatch fixes: remove not necessary braces

 drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
index 134fa6c595a8..26e0ef224299 100644
--- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
@@ -534,9 +534,8 @@ static void store_pwrindex_offset(struct adapter *adapter,
 		power_level_offset[11] = data;
 	if (regaddr == rTxAGC_B_Mcs11_Mcs08)
 		power_level_offset[12] = data;
-	if (regaddr == rTxAGC_B_Mcs15_Mcs12) {
+	if (regaddr == rTxAGC_B_Mcs15_Mcs12)
 		power_level_offset[13] = data;
-	}
 }
 
 static void rtl_addr_delay(struct adapter *adapt,
-- 
2.11.0

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

* Re: [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
  2017-01-28  8:49 [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {} Martin Karamihov
@ 2017-01-28  9:11 ` Greg KH
  2017-01-29 16:43   ` Bjørn Mork
  2017-01-31 19:24 ` [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix) Martin Karamihov
  1 sibling, 1 reply; 13+ messages in thread
From: Greg KH @ 2017-01-28  9:11 UTC (permalink / raw)
  To: Martin Karamihov; +Cc: devel, linux-kernel, Larry.Finger

On Sat, Jan 28, 2017 at 10:49:10AM +0200, Martin Karamihov wrote:
> Signed-off-by: Martin Karamihov <martinowar@gmail.com>
> ---
> checkpatch fixes: remove not necessary braces

{sigh}

Please take some time, and go read Documentation/SubmittingPatches.
Then wait a day, review the patches that other people send out, and then
compose your patch to match the requirements and what you see other
people do.

good luck!

greg k-h

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

* Re: [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
  2017-01-28  9:11 ` Greg KH
@ 2017-01-29 16:43   ` Bjørn Mork
  2017-01-29 18:57     ` martinowar
  2017-02-02 22:53     ` Joe Perches
  0 siblings, 2 replies; 13+ messages in thread
From: Bjørn Mork @ 2017-01-29 16:43 UTC (permalink / raw)
  To: Greg KH; +Cc: Martin Karamihov, devel, linux-kernel, Larry.Finger

Greg KH <gregkh@linuxfoundation.org> writes:

> Please take some time, and go read Documentation/SubmittingPatches.

That's quickly done nowadays:

 bjorn@miraculix:/usr/local/src/git/linux$ cat Documentation/SubmittingPatches
 This file has moved to process/submitting-patches.rst


I don't know why it was necessary to move that file, but it looks like
you, and the gazillion links and references to this document, just have
to adopt to a new location.

Or submit a patch to fix it :)



Bjørn

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

* Re: [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
  2017-01-29 16:43   ` Bjørn Mork
@ 2017-01-29 18:57     ` martinowar
  2017-02-02 22:53     ` Joe Perches
  1 sibling, 0 replies; 13+ messages in thread
From: martinowar @ 2017-01-29 18:57 UTC (permalink / raw)
  To: Bjørn Mork, Greg KH; +Cc: devel, linux-kernel, linux-kernel, Larry.Finger

On 01/29/2017 06:43 PM, Bjørn Mork wrote:
> Greg KH <gregkh@linuxfoundation.org> writes:
>
>> Please take some time, and go read Documentation/SubmittingPatches.
> That's quickly done nowadays:
>
>   bjorn@miraculix:/usr/local/src/git/linux$ cat Documentation/SubmittingPatches
>   This file has moved to process/submitting-patches.rst
>
>
> I don't know why it was necessary to move that file, but it looks like
> you, and the gazillion links and references to this document, just have
> to adopt to a new location.
>
> Or submit a patch to fix it :)
>
>
>
> Bjørn

Hi all,


Sorry for the noise and thank you for the polite dialogue. Another 
eudyptula participant here, you guess :) I will try to figure out my 
mistakes and will send the patch again.


Martin

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

* [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
  2017-01-28  8:49 [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {} Martin Karamihov
  2017-01-28  9:11 ` Greg KH
@ 2017-01-31 19:24 ` Martin Karamihov
  2017-01-31 22:39   ` Joe Perches
  1 sibling, 1 reply; 13+ messages in thread
From: Martin Karamihov @ 2017-01-31 19:24 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, devel, linux-kernel

This is checkpatch fix for hal/bb_cfg.c file:
remove not necessary braces {}

Signed-off-by: Martin Karamihov <martinowar@gmail.com>
---
 drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
index 134fa6c595a8..26e0ef224299 100644
--- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
@@ -534,9 +534,8 @@ static void store_pwrindex_offset(struct adapter *adapter,
 		power_level_offset[11] = data;
 	if (regaddr == rTxAGC_B_Mcs11_Mcs08)
 		power_level_offset[12] = data;
-	if (regaddr == rTxAGC_B_Mcs15_Mcs12) {
+	if (regaddr == rTxAGC_B_Mcs15_Mcs12)
 		power_level_offset[13] = data;
-	}
 }
 
 static void rtl_addr_delay(struct adapter *adapt,
-- 
2.11.0

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

* Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
  2017-01-31 19:24 ` [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix) Martin Karamihov
@ 2017-01-31 22:39   ` Joe Perches
  2017-02-01 16:36     ` Martin Karamihov
  0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2017-01-31 22:39 UTC (permalink / raw)
  To: Martin Karamihov, gregkh; +Cc: Larry.Finger, devel, linux-kernel

On Tue, 2017-01-31 at 21:24 +0200, Martin Karamihov wrote:
> This is checkpatch fix for hal/bb_cfg.c file:
> remove not necessary braces {}
> 
> Signed-off-by: Martin Karamihov <martinowar@gmail.com>
> ---
>  drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> index 134fa6c595a8..26e0ef224299 100644
> --- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
> +++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> @@ -534,9 +534,8 @@ static void store_pwrindex_offset(struct adapter *adapter,
>  		power_level_offset[11] = data;
>  	if (regaddr == rTxAGC_B_Mcs11_Mcs08)
>  		power_level_offset[12] = data;
> -	if (regaddr == rTxAGC_B_Mcs15_Mcs12) {
> +	if (regaddr == rTxAGC_B_Mcs15_Mcs12)
>  		power_level_offset[13] = data;
> -	}

presumably, this and the regaddr block above it
should be an else if or a switch/case.

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

* Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
  2017-01-31 22:39   ` Joe Perches
@ 2017-02-01 16:36     ` Martin Karamihov
  2017-02-01 18:11       ` Joe Perches
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Karamihov @ 2017-02-01 16:36 UTC (permalink / raw)
  To: Joe Perches, gregkh; +Cc: Larry.Finger, devel, linux-kernel



On 02/01/2017 12:39 AM, Joe Perches wrote:
> On Tue, 2017-01-31 at 21:24 +0200, Martin Karamihov wrote:
>> This is checkpatch fix for hal/bb_cfg.c file:
>> remove not necessary braces {}
>>
>> Signed-off-by: Martin Karamihov <martinowar@gmail.com>
>> ---
>>   drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
>> index 134fa6c595a8..26e0ef224299 100644
>> --- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
>> +++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
>> @@ -534,9 +534,8 @@ static void store_pwrindex_offset(struct adapter *adapter,
>>   		power_level_offset[11] = data;
>>   	if (regaddr == rTxAGC_B_Mcs11_Mcs08)
>>   		power_level_offset[12] = data;
>> -	if (regaddr == rTxAGC_B_Mcs15_Mcs12) {
>> +	if (regaddr == rTxAGC_B_Mcs15_Mcs12)
>>   		power_level_offset[13] = data;
>> -	}
> presumably, this and the regaddr block above it
> should be an else if or a switch/case.
>
>

I will prepare the patch if this code modification is needed right now. 
Is it?

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

* Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
  2017-02-01 16:36     ` Martin Karamihov
@ 2017-02-01 18:11       ` Joe Perches
  2017-02-02  6:06         ` Martin Karamihov
  0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2017-02-01 18:11 UTC (permalink / raw)
  To: Martin Karamihov, gregkh; +Cc: Larry.Finger, devel, linux-kernel

On Wed, 2017-02-01 at 18:36 +0200, Martin Karamihov wrote:
> 
> On 02/01/2017 12:39 AM, Joe Perches wrote:
> > On Tue, 2017-01-31 at 21:24 +0200, Martin Karamihov wrote:
> > > This is checkpatch fix for hal/bb_cfg.c file:
> > > remove not necessary braces {}
> > > 
> > > Signed-off-by: Martin Karamihov <martinowar@gmail.com>
> > > ---
> > >   drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +--
> > >   1 file changed, 1 insertion(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> > > index 134fa6c595a8..26e0ef224299 100644
> > > --- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
> > > +++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> > > @@ -534,9 +534,8 @@ static void store_pwrindex_offset(struct adapter *adapter,
> > >   		power_level_offset[11] = data;
> > >   	if (regaddr == rTxAGC_B_Mcs11_Mcs08)
> > >   		power_level_offset[12] = data;
> > > -	if (regaddr == rTxAGC_B_Mcs15_Mcs12) {
> > > +	if (regaddr == rTxAGC_B_Mcs15_Mcs12)
> > >   		power_level_offset[13] = data;
> > > -	}
> > 
> > presumably, this and the regaddr block above it
> > should be an else if or a switch/case.
> > 
> I will prepare the patch if this code modification is needed right now. 
> Is it?

No more nor less than the suggested brace removal.
Do please remember (or learn) that checkpatch is
a brainless script and clarifying the code for a
human reader is much more important than making a
file not have any checkpatch warnings.

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

* Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
  2017-02-01 18:11       ` Joe Perches
@ 2017-02-02  6:06         ` Martin Karamihov
  2017-02-02 23:32           ` Joe Perches
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Karamihov @ 2017-02-02  6:06 UTC (permalink / raw)
  To: Joe Perches, gregkh; +Cc: Larry.Finger, devel, linux-kernel

On 02/01/2017 08:11 PM, Joe Perches wrote:
> ...and clarifying the code for a
> human reader is much more important than making a
> file not have any checkpatch warnings.

I agree. I respect the developers' own coding style and believe that 
some things (>80 characters long lines, name conventions, etc) should be 
fixed by themselves (if they want to do that). I selected several TODOs 
with requests for code cleanups and chose a fix in attempt to accomplish 
my task with minimal inconvenience for the maintainers. I failed in my 
first attempts breaking some basic rules, sorry about that.

Martin

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

* Re: [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
  2017-01-29 16:43   ` Bjørn Mork
  2017-01-29 18:57     ` martinowar
@ 2017-02-02 22:53     ` Joe Perches
  1 sibling, 0 replies; 13+ messages in thread
From: Joe Perches @ 2017-02-02 22:53 UTC (permalink / raw)
  To: Bjørn Mork, Greg KH
  Cc: Martin Karamihov, devel, linux-kernel, Larry.Finger

On Sun, 2017-01-29 at 17:43 +0100, Bjørn Mork wrote:
> Greg KH <gregkh@linuxfoundation.org> writes:
> 
> > Please take some time, and go read Documentation/SubmittingPatches.
> 
> That's quickly done nowadays:
> 
>  bjorn@miraculix:/usr/local/src/git/linux$ cat Documentation/SubmittingPatches
>  This file has moved to process/submitting-patches.rst
> 
> 
> I don't know why it was necessary to move that file, but it looks like
> you, and the gazillion links and references to this document, just have
> to adopt to a new location.
> 
> Or submit a patch to fix it :)

I did exactly that.
https://lkml.org/lkml/2017/1/10/1059

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

* Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
  2017-02-02  6:06         ` Martin Karamihov
@ 2017-02-02 23:32           ` Joe Perches
  0 siblings, 0 replies; 13+ messages in thread
From: Joe Perches @ 2017-02-02 23:32 UTC (permalink / raw)
  To: Martin Karamihov, gregkh; +Cc: Larry.Finger, devel, linux-kernel

On Thu, 2017-02-02 at 08:06 +0200, Martin Karamihov wrote:
> On 02/01/2017 08:11 PM, Joe Perches wrote:
> > ...and clarifying the code for a
> > human reader is much more important than making a
> > file not have any checkpatch warnings.
> 
> I agree. I respect the developers' own coding style and believe that 
> some things (>80 characters long lines, name conventions, etc) should be 
> fixed by themselves (if they want to do that). I selected several TODOs 
> with requests for code cleanups and chose a fix in attempt to accomplish 
> my task with minimal inconvenience for the maintainers. I failed in my 
> first attempts breaking some basic rules, sorry about that.

No, not at all.  You did fine for a basic checkpatch cleanup.
I just wanted to tell you to think beyond checkpatch.

cheers, Joe

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

* Re: [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
  2017-01-28  8:34 ` [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {} Martin Karamihov
@ 2017-01-28  8:41   ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2017-01-28  8:41 UTC (permalink / raw)
  To: Martin Karamihov; +Cc: devel, linux-kernel, Larry.Finger

On Sat, Jan 28, 2017 at 10:34:36AM +0200, Martin Karamihov wrote:
> Signed-off-by: Martin Karamihov <martinowar@gmail.com>
> ---
>  drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

I can't take a patch with no changelog text :(

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

* [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
  2017-01-28  8:34 [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces Martin Karamihov
@ 2017-01-28  8:34 ` Martin Karamihov
  2017-01-28  8:41   ` Greg KH
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Karamihov @ 2017-01-28  8:34 UTC (permalink / raw)
  To: gregkh; +Cc: Larry.Finger, devel, linux-kernel

Signed-off-by: Martin Karamihov <martinowar@gmail.com>
---
 drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
index 134fa6c595a8..26e0ef224299 100644
--- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
@@ -534,9 +534,8 @@ static void store_pwrindex_offset(struct adapter *adapter,
 		power_level_offset[11] = data;
 	if (regaddr == rTxAGC_B_Mcs11_Mcs08)
 		power_level_offset[12] = data;
-	if (regaddr == rTxAGC_B_Mcs15_Mcs12) {
+	if (regaddr == rTxAGC_B_Mcs15_Mcs12)
 		power_level_offset[13] = data;
-	}
 }
 
 static void rtl_addr_delay(struct adapter *adapt,
-- 
2.11.0

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

end of thread, other threads:[~2017-02-02 23:33 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-28  8:49 [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {} Martin Karamihov
2017-01-28  9:11 ` Greg KH
2017-01-29 16:43   ` Bjørn Mork
2017-01-29 18:57     ` martinowar
2017-02-02 22:53     ` Joe Perches
2017-01-31 19:24 ` [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix) Martin Karamihov
2017-01-31 22:39   ` Joe Perches
2017-02-01 16:36     ` Martin Karamihov
2017-02-01 18:11       ` Joe Perches
2017-02-02  6:06         ` Martin Karamihov
2017-02-02 23:32           ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2017-01-28  8:34 [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces Martin Karamihov
2017-01-28  8:34 ` [PATCH] staging: rtl8188eu: checkpatch fixes: removed not necessary braces {} Martin Karamihov
2017-01-28  8:41   ` Greg KH

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