linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] rtlwifi: remove superfluous condition
@ 2016-07-31 10:30 Heinrich Schuchardt
  2016-07-31 14:14 ` Larry Finger
  0 siblings, 1 reply; 5+ messages in thread
From: Heinrich Schuchardt @ 2016-07-31 10:30 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, Heinrich Schuchardt

If sta == NULL, the changed line will not be reached.
So no need to check if stat == NULL here.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 41f77f8..7aee5ebb1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1135,7 +1135,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 					mac->mode = WIRELESS_MODE_AC_24G;
 			}
 
-			if (vif->type == NL80211_IFTYPE_STATION && sta)
+			if (vif->type == NL80211_IFTYPE_STATION)
 				rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 			rcu_read_unlock();
 
-- 
2.8.1

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

* Re: [PATCH 1/1] rtlwifi: remove superfluous condition
  2016-07-31 10:30 [PATCH 1/1] rtlwifi: remove superfluous condition Heinrich Schuchardt
@ 2016-07-31 14:14 ` Larry Finger
  2016-08-02 19:26   ` [PATCH 1/1 v2] " Heinrich Schuchardt
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2016-07-31 14:14 UTC (permalink / raw)
  To: Heinrich Schuchardt, Chaoming Li, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel

On 07/31/2016 05:30 AM, Heinrich Schuchardt wrote:
> If sta == NULL, the changed line will not be reached.
> So no need to check if stat == NULL here.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I agree. If sta were NULL, we would never have reached this statement. There is, 
however, a typo in the last line of the commit message. Once this is fixed, you 
may add the line "Acked-by: Larry Finger <Larry.Finger@lwfinger.net>"

Thanks,

Larry

>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
> index 41f77f8..7aee5ebb1 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/core.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/core.c
> @@ -1135,7 +1135,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
>  					mac->mode = WIRELESS_MODE_AC_24G;
>  			}
>
> -			if (vif->type == NL80211_IFTYPE_STATION && sta)
> +			if (vif->type == NL80211_IFTYPE_STATION)
>  				rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
>  			rcu_read_unlock();
>
>

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

* [PATCH 1/1 v2] rtlwifi: remove superfluous condition
  2016-07-31 14:14 ` Larry Finger
@ 2016-08-02 19:26   ` Heinrich Schuchardt
  2016-08-03  6:01     ` Kalle Valo
  2016-09-03 10:03     ` [1/1,v2] " Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2016-08-02 19:26 UTC (permalink / raw)
  To: Larry Finger, Chaoming Li, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, Heinrich Schuchardt

If sta == NULL, the changed line will not be reached.
So no need to check that sta != NULL here.

v2:
	fix typo

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 41f77f8..7aee5ebb1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1135,7 +1135,7 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,
 					mac->mode = WIRELESS_MODE_AC_24G;
 			}
 
-			if (vif->type == NL80211_IFTYPE_STATION && sta)
+			if (vif->type == NL80211_IFTYPE_STATION)
 				rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 			rcu_read_unlock();
 
-- 
2.1.4

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

* Re: [PATCH 1/1 v2] rtlwifi: remove superfluous condition
  2016-08-02 19:26   ` [PATCH 1/1 v2] " Heinrich Schuchardt
@ 2016-08-03  6:01     ` Kalle Valo
  2016-09-03 10:03     ` [1/1,v2] " Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-08-03  6:01 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Larry Finger, Chaoming Li, linux-wireless, netdev, linux-kernel

Heinrich Schuchardt <xypron.glpk@gmx.de> writes:

> If sta == NULL, the changed line will not be reached.
> So no need to check that sta != NULL here.
>
> v2:
> 	fix typo
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>  drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The change log goes under the "---" line so that git can automatically
strip it away while committing the patch. I can fix it this time but
please keep this in mind in the future.

-- 
Kalle Valo

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

* Re: [1/1,v2] rtlwifi: remove superfluous condition
  2016-08-02 19:26   ` [PATCH 1/1 v2] " Heinrich Schuchardt
  2016-08-03  6:01     ` Kalle Valo
@ 2016-09-03 10:03     ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-09-03 10:03 UTC (permalink / raw)
  To: Heinrich Schuchardt
  Cc: Larry Finger, Chaoming Li, linux-wireless, netdev, linux-kernel,
	Heinrich Schuchardt

Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> If sta == NULL, the changed line will not be reached.
> So no need to check that sta != NULL here.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks, 1 patch applied to wireless-drivers-next.git:

f898005ff99f rtlwifi: remove superfluous condition

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9260253/

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

end of thread, other threads:[~2016-09-03 10:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-31 10:30 [PATCH 1/1] rtlwifi: remove superfluous condition Heinrich Schuchardt
2016-07-31 14:14 ` Larry Finger
2016-08-02 19:26   ` [PATCH 1/1 v2] " Heinrich Schuchardt
2016-08-03  6:01     ` Kalle Valo
2016-09-03 10:03     ` [1/1,v2] " 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).