All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: os_dep: Remove conditions with no effects
@ 2021-06-06  4:35 Fabio M. De Francesco
  2021-06-06  5:56   ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio M. De Francesco @ 2021-06-06  4:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Fabio M. De Francesco

Removed conditions with no effects. Detected by Coccinelle.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 213ec5b4ce98..2035573ee5a0 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -1187,10 +1187,7 @@ void rtw_suspend_common(struct adapter *padapter)
 
 	rtw_ps_deny_cancel(padapter, PS_DENY_SUSPEND);
 
-	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
-		rtw_suspend_normal(padapter);
-	else
-		rtw_suspend_normal(padapter);
+	rtw_suspend_normal(padapter);
 
 	netdev_dbg(padapter->pnetdev, "rtw suspend success in %d ms\n",
 		   jiffies_to_msecs(jiffies - start_time));
@@ -1268,11 +1265,7 @@ int rtw_resume_common(struct adapter *padapter)
 
 	netdev_dbg(padapter->pnetdev, "resume start\n");
 
-	if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
-		rtw_resume_process_normal(padapter);
-	} else {
-		rtw_resume_process_normal(padapter);
-	}
+	rtw_resume_process_normal(padapter);
 
 	hal_btcoex_SuspendNotify(padapter, 0);
 
-- 
2.31.1


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

* Re: [PATCH] staging: rtl8723bs: os_dep: Remove conditions with no effects
  2021-06-06  4:35 [PATCH] staging: rtl8723bs: os_dep: Remove conditions with no effects Fabio M. De Francesco
@ 2021-06-06  5:56   ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2021-06-06  5:56 UTC (permalink / raw)
  To: Fabio M. De Francesco, Greg Kroah-Hartman, linux-staging, linux-kernel

On Sun, 2021-06-06 at 06:35 +0200, Fabio M. De Francesco wrote:
> Removed conditions with no effects. Detected by Coccinelle.

It's be good if you researched how this came to be and noted it
in the changelog.

try:

commit dc365d2cc579200bc3752ddb941e046e3a16962c
Author: Fabio Aiuto <fabioaiuto83@gmail.com>
Date:   Tue Mar 16 15:04:11 2021 +0100

    staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AP_WOWLAN



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

* Re: [PATCH] staging: rtl8723bs: os_dep: Remove conditions with no effects
@ 2021-06-06  5:56   ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2021-06-06  5:56 UTC (permalink / raw)
  To: Fabio M. De Francesco, Greg Kroah-Hartman, linux-staging, linux-kernel

On Sun, 2021-06-06 at 06:35 +0200, Fabio M. De Francesco wrote:
> Removed conditions with no effects. Detected by Coccinelle.

It's be good if you researched how this came to be and noted it
in the changelog.

try:

commit dc365d2cc579200bc3752ddb941e046e3a16962c
Author: Fabio Aiuto <fabioaiuto83@gmail.com>
Date:   Tue Mar 16 15:04:11 2021 +0100

    staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AP_WOWLAN



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

* Re: [PATCH] staging: rtl8723bs: os_dep: Remove conditions with no effects
  2021-06-06  5:56   ` Joe Perches
  (?)
@ 2021-06-06  6:49   ` Fabio M. De Francesco
  -1 siblings, 0 replies; 4+ messages in thread
From: Fabio M. De Francesco @ 2021-06-06  6:49 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Joe Perches; +Cc: linux-staging, linux-kernel

On Sunday, June 6, 2021 7:56:32 AM CEST Joe Perches wrote:
> On Sun, 2021-06-06 at 06:35 +0200, Fabio M. De Francesco wrote:
> > Removed conditions with no effects. Detected by Coccinelle.
> 
> It's be good if you researched how this came to be and noted it
> in the changelog.
> 
> try:
> 
> commit dc365d2cc579200bc3752ddb941e046e3a16962c
> Author: Fabio Aiuto <fabioaiuto83@gmail.com>
> Date:   Tue Mar 16 15:04:11 2021 +0100
> 
>     staging: rtl8723bs: remove unused code blocks conditioned by never set
> CONFIG_AP_WOWLAN
>
I've just read the commit you pointed out. It seems that the conditions with 
no effects came out while removing code that was conditionally compiled by the 
unused definition CONFIG_AP_WOWLAN.

However, I don't understand why those "conditions with no effects" have been 
left there. 

Now I'm not sure of what you asked me to do: should I leave them there as they 
are (perhaps because I missed something) or should I explain in my patch that 
they were overlooked by commit dc365d2cc579?

Thanks in advance,

Fabio




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

end of thread, other threads:[~2021-06-06  6:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06  4:35 [PATCH] staging: rtl8723bs: os_dep: Remove conditions with no effects Fabio M. De Francesco
2021-06-06  5:56 ` Joe Perches
2021-06-06  5:56   ` Joe Perches
2021-06-06  6:49   ` Fabio M. De Francesco

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.