2024-05-08 15:20:38

by Chen shuo

[permalink] [raw]
Subject: [PATCH v2] staging: rtl8192e: remove the r8192E_dev.c's unnecessary brace

There is a unnecessary brace in r8192E_dev.c.Remove it to shorten
code and improve readability.

Signed-off-by: Chen shuo <[email protected]>
---
v2:Make "Subject" line more unique.
Add space after : and driver name in the subject.

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



2024-05-09 07:51:44

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH v2] staging: rtl8192e: remove the r8192E_dev.c's unnecessary brace

On 5/8/24 17:13, Chen shuo wrote:
> There is a unnecessary brace in r8192E_dev.c.Remove it to shorten
> code and improve readability.
>
> Signed-off-by: Chen shuo <[email protected]>
> ---
> v2:Make "Subject" line more unique.
> Add space after : and driver name in the subject.
>
> 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;

Tested-by: Philipp Hortmann <[email protected]>