All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: r8188eu: remove unnecessary braces in if statements
       [not found] <20220220174150.GA11496.ref@snoopy>
@ 2022-02-20 17:41 ` Marcelo Aloisio da Silva
  2022-02-21 12:24   ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Aloisio da Silva @ 2022-02-20 17:41 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman
  Cc: linux-staging, linux-kernel

Braces are not necessary for single statement blocks.

Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
---
Changes in v2:
 - Only remove braces for the if statements below.

 drivers/staging/r8188eu/core/rtw_mlme.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
index 45eff3018d73..3a438f917904 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme.c
@@ -1392,14 +1392,12 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
 		/*  expire NAT2.5 entry */
 		nat25_db_expire(adapter);
 
-		if (adapter->pppoe_connection_in_progress > 0) {
+		if (adapter->pppoe_connection_in_progress > 0)
 			adapter->pppoe_connection_in_progress--;
-		}
 
 		/*  due to rtw_dynamic_check_timer_handlder() is called every 2 seconds */
-		if (adapter->pppoe_connection_in_progress > 0) {
+		if (adapter->pppoe_connection_in_progress > 0)
 			adapter->pppoe_connection_in_progress--;
-		}
 	}
 
 	rcu_read_unlock();
-- 
2.25.1


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

* Re: [PATCH v2] staging: r8188eu: remove unnecessary braces in if statements
  2022-02-20 17:41 ` [PATCH v2] staging: r8188eu: remove unnecessary braces in if statements Marcelo Aloisio da Silva
@ 2022-02-21 12:24   ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2022-02-21 12:24 UTC (permalink / raw)
  To: Marcelo Aloisio da Silva
  Cc: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
	linux-kernel

On Sun, Feb 20, 2022 at 02:41:50PM -0300, Marcelo Aloisio da Silva wrote:
> Braces are not necessary for single statement blocks.
> 
> Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
> ---
> Changes in v2:
>  - Only remove braces for the if statements below.

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>

regards,
dan carpenter


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

end of thread, other threads:[~2022-02-21 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220220174150.GA11496.ref@snoopy>
2022-02-20 17:41 ` [PATCH v2] staging: r8188eu: remove unnecessary braces in if statements Marcelo Aloisio da Silva
2022-02-21 12:24   ` Dan Carpenter

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.