LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] rtlwifi/rtl8192de: remove redundant else if check
@ 2015-01-13 14:07 Colin King
  2015-01-13 17:19 ` Larry Finger
  2015-01-23 17:31 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2015-01-13 14:07 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo, John W. Linville,
	linux-wireless, netdev
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The else if check condition checks for the opposite of the
if check, hence the else if check is redundant and can be
replaced with a simple else:

if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
	..
} else if (rtlpriv->rtlhal.macphymode != SINGLEMAC_SINGLEPHY) {
	..
}

replaced with:

if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
	..
} else {
	..
}

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
index 280c3da..01bcc2d 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
@@ -546,7 +546,7 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
 		txpktbuf_bndy = 246;
 		value8 = 0;
 		value32 = 0x80bf0d29;
-	} else if (rtlpriv->rtlhal.macphymode != SINGLEMAC_SINGLEPHY) {
+	} else {
 		maxPage = 127;
 		txpktbuf_bndy = 123;
 		value8 = 0;
-- 
2.1.4


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

* Re: [PATCH] rtlwifi/rtl8192de: remove redundant else if check
  2015-01-13 14:07 [PATCH] rtlwifi/rtl8192de: remove redundant else if check Colin King
@ 2015-01-13 17:19 ` Larry Finger
  2015-01-23 17:31 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2015-01-13 17:19 UTC (permalink / raw)
  To: Colin King, Kalle Valo, linux-wireless, netdev; +Cc: linux-kernel

On 01/13/2015 08:07 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The else if check condition checks for the opposite of the
> if check, hence the else if check is redundant and can be
> replaced with a simple else:
>
> if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
> 	..
> } else if (rtlpriv->rtlhal.macphymode != SINGLEMAC_SINGLEPHY) {
> 	..
> }
>
> replaced with:
>
> if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
> 	..
> } else {
> 	..
> }
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks,

Larry

> ---
>   drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> index 280c3da..01bcc2d 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> @@ -546,7 +546,7 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
>   		txpktbuf_bndy = 246;
>   		value8 = 0;
>   		value32 = 0x80bf0d29;
> -	} else if (rtlpriv->rtlhal.macphymode != SINGLEMAC_SINGLEPHY) {
> +	} else {
>   		maxPage = 127;
>   		txpktbuf_bndy = 123;
>   		value8 = 0;
>


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

* Re: rtlwifi/rtl8192de: remove redundant else if check
  2015-01-13 14:07 [PATCH] rtlwifi/rtl8192de: remove redundant else if check Colin King
  2015-01-13 17:19 ` Larry Finger
@ 2015-01-23 17:31 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2015-01-23 17:31 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Larry Finger, Chaoming Li, John W. Linville, linux-wireless,
	netdev, linux-kernel


> From: Colin Ian King <colin.king@canonical.com>
> 
> The else if check condition checks for the opposite of the
> if check, hence the else if check is redundant and can be
> replaced with a simple else:
> 
> if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
> 	..
> } else if (rtlpriv->rtlhal.macphymode != SINGLEMAC_SINGLEPHY) {
> 	..
> }
> 
> replaced with:
> 
> if (rtlpriv->rtlhal.macphymode == SINGLEMAC_SINGLEPHY) {
> 	..
> } else {
> 	..
> }
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

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

end of thread, other threads:[~2015-01-23 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13 14:07 [PATCH] rtlwifi/rtl8192de: remove redundant else if check Colin King
2015-01-13 17:19 ` Larry Finger
2015-01-23 17:31 ` Kalle Valo

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 NNTP newsgroup(s).