staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
PATCH 1/1 staging: rtl8188eu: checkpatch fixes: removed not necessary braces {}
---
checkpatch fixes: remove not necessary braces
drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8188eu/hal/bb_cfg.c +1 -2
@@ -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,
Signature · 1 line
2.11.0
Greg KH
maintainerQuoted 3 lines · Martin Karamihov
Signed-off-by Martin Karamihov <[email protected]>---
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
Quoted 1 line · Greg KH
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
Quoted 13 lines · Bjørn Mork
Quoted 1 line · Greg KH
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.rstI 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.
Quoted 5 lines
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
Quoted 10 lines · Bjørn Mork
Quoted 1 line · Greg KH
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
Quoted 5 lines
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
PATCH v2 1/1 staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
In reply to Martin KaramihovThis is checkpatch fix for hal/bb_cfg.c file:
remove not necessary braces {}
--- drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8188eu/hal/bb_cfg.c +1 -2
@@ -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,
Signature · 1 line
2.11.0
Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
Quoted 13 lines · Martin Karamihov
This is checkpatch fix for
hal/bb_cfg.cfile:
remove not necessary braces {}Signed-off-by Martin Karamihov <[email protected]>--- drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/rtl8188eu/hal/bb_cfg.c +0
-0
drivers/staging/rtl8188eu/hal/bb_cfg.c static void store_pwrindex_offset(struct adapter *adapter, · line 539
Quoted 7 lines
drivers/staging/rtl8188eu/hal/bb_cfg.c +1
-2@@ -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.
Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
Quoted 9 lines · Joe Perches
Quoted 8 lines · Martin Karamihov
This is checkpatch fix for
hal/bb_cfg.cfile:
remove not necessary braces {}Signed-off-by Martin Karamihov <[email protected]>--- drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 16 lines
drivers/staging/rtl8188eu/hal/bb_cfg.c static void store_pwrindex_offset(struct adapter *adapter, · line 539
Quoted 12 lines
drivers/staging/rtl8188eu/hal/bb_cfg.c +1
-2@@ -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?
Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
Quoted 27 lines · Martin Karamihov
Quoted 9 lines · Joe Perches
Quoted 8 lines · Martin Karamihov
This is checkpatch fix for
hal/bb_cfg.cfile:
remove not necessary braces {}Signed-off-by Martin Karamihov <[email protected]>--- drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)Quoted 16 lines
drivers/staging/rtl8188eu/hal/bb_cfg.c static void store_pwrindex_offset(struct adapter *adapter, · line 539
Quoted 12 lines
drivers/staging/rtl8188eu/hal/bb_cfg.c +1
-2@@ -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.
Quoted 2 lines
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.
Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
Quoted 3 lines · Joe Perches
...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
Re: [PATCH v2] staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
Quoted 11 lines · Martin Karamihov
Quoted 3 lines · Joe Perches
...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