All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trivial: drivers/staging/rtl8821ae/rtl8821ae: Fix closing brace followed by if
@ 2014-06-20 19:56 Rasmus Villemoes
  2014-06-20 20:07 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Rasmus Villemoes @ 2014-06-20 19:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Kosina; +Cc: devel, linux-kernel, Rasmus Villemoes

All of the code is #if 0'd out, and the change just replaces a
space with a newline, so this obviously doesn't change anything.

However, the code is highly suspect: The b_c2h_bt_inquiry_page member
has type bool, and applying the ++ operator to a bool is equivalent to
setting it true (using -- is equivalent to flipping it).

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c b/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
index 7b1d113..b4c68f0 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
@@ -1711,7 +1711,8 @@ void rtl8821ae_dm_bt_inq_page_monitor(struct ieee80211_hw *hw)
 	if (hal_coex_8821ae.b_c2h_bt_inquiry_page) {
 		hal_coex_8821ae.b_c2h_bt_inquiry_page++;
 		// bt inquiry or page is started.
-	} if(hal_coex_8821ae.b_c2h_bt_inquiry_page) {
+	}
+	if(hal_coex_8821ae.b_c2h_bt_inquiry_page) {
 		rtlpcipriv->btcoexist.current_state |= BT_COEX_STATE_BT_INQ_PAGE;
 		if(hal_coex_8821ae.bt_inquiry_page_cnt >= 4)
 			hal_coex_8821ae.bt_inquiry_page_cnt = 0;
-- 
1.9.2


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

* Re: [PATCH] trivial: drivers/staging/rtl8821ae/rtl8821ae: Fix closing brace followed by if
  2014-06-20 19:56 [PATCH] trivial: drivers/staging/rtl8821ae/rtl8821ae: Fix closing brace followed by if Rasmus Villemoes
@ 2014-06-20 20:07 ` Greg Kroah-Hartman
  2014-06-20 20:21   ` Rasmus Villemoes
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-20 20:07 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: Jiri Kosina, devel, linux-kernel

On Fri, Jun 20, 2014 at 09:56:35PM +0200, Rasmus Villemoes wrote:
> All of the code is #if 0'd out, and the change just replaces a
> space with a newline, so this obviously doesn't change anything.

How about just deleting all the #if 0 code out entirely so no one has to
worry about it anymore?

thanks,

greg k-h

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

* Re: [PATCH] trivial: drivers/staging/rtl8821ae/rtl8821ae: Fix closing brace followed by if
  2014-06-20 20:07 ` Greg Kroah-Hartman
@ 2014-06-20 20:21   ` Rasmus Villemoes
  2014-06-20 20:40     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Rasmus Villemoes @ 2014-06-20 20:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, Jiri Kosina, linux-kernel

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:

> On Fri, Jun 20, 2014 at 09:56:35PM +0200, Rasmus Villemoes wrote:
>> All of the code is #if 0'd out, and the change just replaces a
>> space with a newline, so this obviously doesn't change anything.
>
> How about just deleting all the #if 0 code out entirely so no one has to
> worry about it anymore?

Fine by me. Like this?

From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH] drivers/staging/rtl8821ae/rtl8821ae: Remove dead code

This is all #if 0'ed out, and it contains some rather weird stuff
(post-increment of a bool, for example). Nuke it.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c b/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
index 7b1d113..25e751b 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
@@ -1706,20 +1706,6 @@ void rtl8821ae_dm_bt_inq_page_monitor(struct ieee80211_hw *hw)
 			rtlpcipriv->btcoexist.current_state &=~ BT_COEX_STATE_BT_INQ_PAGE;
 		}
 	}
-
-#if 0
-	if (hal_coex_8821ae.b_c2h_bt_inquiry_page) {
-		hal_coex_8821ae.b_c2h_bt_inquiry_page++;
-		// bt inquiry or page is started.
-	} if(hal_coex_8821ae.b_c2h_bt_inquiry_page) {
-		rtlpcipriv->btcoexist.current_state |= BT_COEX_STATE_BT_INQ_PAGE;
-		if(hal_coex_8821ae.bt_inquiry_page_cnt >= 4)
-			hal_coex_8821ae.bt_inquiry_page_cnt = 0;
-		hal_coex_8821ae.bt_inquiry_page_cnt++;
-	} else {
-		rtlpcipriv->btcoexist.current_state &=~ BT_COEX_STATE_BT_INQ_PAGE;
-	}
-#endif
 }
 
 void rtl8821ae_dm_bt_reset_action_profile_state(struct ieee80211_hw *hw)
-- 
1.9.2


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

* Re: [PATCH] trivial: drivers/staging/rtl8821ae/rtl8821ae: Fix closing brace followed by if
  2014-06-20 20:21   ` Rasmus Villemoes
@ 2014-06-20 20:40     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-20 20:40 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: devel, Jiri Kosina, linux-kernel

On Fri, Jun 20, 2014 at 10:21:45PM +0200, Rasmus Villemoes wrote:
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> 
> > On Fri, Jun 20, 2014 at 09:56:35PM +0200, Rasmus Villemoes wrote:
> >> All of the code is #if 0'd out, and the change just replaces a
> >> space with a newline, so this obviously doesn't change anything.
> >
> > How about just deleting all the #if 0 code out entirely so no one has to
> > worry about it anymore?
> 
> Fine by me. Like this?
> 
> From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Subject: [PATCH] drivers/staging/rtl8821ae/rtl8821ae: Remove dead code
> 
> This is all #if 0'ed out, and it contains some rather weird stuff
> (post-increment of a bool, for example). Nuke it.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Looks good, if you send it in a stand-along email, I can even apply it
:)

thanks,

greg k-h

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

end of thread, other threads:[~2014-06-20 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 19:56 [PATCH] trivial: drivers/staging/rtl8821ae/rtl8821ae: Fix closing brace followed by if Rasmus Villemoes
2014-06-20 20:07 ` Greg Kroah-Hartman
2014-06-20 20:21   ` Rasmus Villemoes
2014-06-20 20:40     ` Greg Kroah-Hartman

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.