* [PATCH] staging:rtl8192e:fixes unnecessary braces
@ 2024-05-07 12:13 Chen shuo
2024-05-07 17:49 ` Philipp Hortmann
0 siblings, 1 reply; 2+ messages in thread
From: Chen shuo @ 2024-05-07 12:13 UTC (permalink / raw
To: 1289151713, linux-staging, linux-kernel
This patch fixes the warnings reported by checkpatch.pl
for braces {} are not necessary for single statement blocks
Signed-off-by: Chen shuo <1289151713@qq.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index e3ed709a7674..1862a9899966 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1640,9 +1640,8 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
if (stats->Length < 24)
stats->bHwError |= 1;
- if (stats->bHwError) {
+ if (stats->bHwError)
return false;
- }
stats->RxDrvInfoSize = pdesc->RxDrvInfoSize;
stats->RxBufShift = (pdesc->Shift) & 0x03;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging:rtl8192e:fixes unnecessary braces
2024-05-07 12:13 [PATCH] staging:rtl8192e:fixes unnecessary braces Chen shuo
@ 2024-05-07 17:49 ` Philipp Hortmann
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Hortmann @ 2024-05-07 17:49 UTC (permalink / raw
To: Chen shuo, linux-staging, linux-kernel
On 5/7/24 14:13, Chen shuo wrote:
> This patch fixes the warnings reported by checkpatch.pl
> for braces {} are not necessary for single statement blocks
>
> Signed-off-by: Chen shuo <1289151713@qq.com>
> ---
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> index e3ed709a7674..1862a9899966 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> @@ -1640,9 +1640,8 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
> if (stats->Length < 24)
> stats->bHwError |= 1;
>
> - if (stats->bHwError) {
> + if (stats->bHwError)
> return false;
> - }
>
> stats->RxDrvInfoSize = pdesc->RxDrvInfoSize;
> stats->RxBufShift = (pdesc->Shift) & 0x03;
Hi Chen,
Please make your "Subject" line more unique. Consider that we may end up
with having dozen of commits like yours, all of them referring to
different removals and all without the necessary information to tell
what they differ in (except the driver/subsystem). So it would help if
you add the changed file or function to make it more unique.
Also typically we use space after : and driver name in the subject.
It is not required to add the name of the tool who found this. Much more
important is a good description __why__ this change makes sense...
For example:
... to shorten code.
... to improve readability.
If you send in a second version of this patch please use a change
history. Description from Dan under:
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
Feel free to contact me direct for further questions.
Thanks for your support.
Bye Philipp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-07 17:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 12:13 [PATCH] staging:rtl8192e:fixes unnecessary braces Chen shuo
2024-05-07 17:49 ` Philipp Hortmann
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 read-only IMAP folder(s) and NNTP newsgroup(s).