netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] wifi: cfg80211: remove redundant ret variable
@ 2022-08-29 11:16 cgel.zte
  2022-08-29 12:34 ` Ammar Faizi
  2022-08-29 16:12 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-08-29 11:16 UTC (permalink / raw)
  To: ajay.kathat, claudiu.beznea
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel, Jinpeng Cui, Zeal Robot

From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

Return value from cfg80211_rx_mgmt() directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
 drivers/net/wireless/microchip/wilc1000/cfg80211.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index f810a56a7ff0..b89047965e78 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -997,12 +997,11 @@ bool wilc_wfi_mgmt_frame_rx(struct wilc_vif *vif, u8 *buff, u32 size)
 {
 	struct wilc *wl = vif->wilc;
 	struct wilc_priv *priv = &vif->priv;
-	int freq, ret;
+	int freq;
 
 	freq = ieee80211_channel_to_frequency(wl->op_ch, NL80211_BAND_2GHZ);
-	ret = cfg80211_rx_mgmt(&priv->wdev, freq, 0, buff, size, 0);
 
-	return ret;
+	return cfg80211_rx_mgmt(&priv->wdev, freq, 0, buff, size, 0);
 }
 
 void wilc_wfi_p2p_rx(struct wilc_vif *vif, u8 *buff, u32 size)
-- 
2.25.1


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

* Re: [PATCH linux-next] wifi: cfg80211: remove redundant ret variable
  2022-08-29 11:16 [PATCH linux-next] wifi: cfg80211: remove redundant ret variable cgel.zte
@ 2022-08-29 12:34 ` Ammar Faizi
  2022-08-29 16:12 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Ammar Faizi @ 2022-08-29 12:34 UTC (permalink / raw)
  To: cgel.zte
  Cc: ajay.kathat, claudiu.beznea, kvalo, David S. Miller, edumazet,
	Jakub Kicinski, pabeni, linux-wireless, netdev,
	Linux Kernel Mailing List, Jinpeng Cui, Zeal Robot

On Mon, Aug 29, 2022 at 6:35 PM <cgel.zte@gmail.com> wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> Return value from cfg80211_rx_mgmt() directly instead of
> taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

Reviewed-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>

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

* Re: [PATCH linux-next] wifi: cfg80211: remove redundant ret variable
  2022-08-29 11:16 [PATCH linux-next] wifi: cfg80211: remove redundant ret variable cgel.zte
  2022-08-29 12:34 ` Ammar Faizi
@ 2022-08-29 16:12 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2022-08-29 16:12 UTC (permalink / raw)
  To: cgel.zte
  Cc: ajay.kathat, claudiu.beznea, davem, edumazet, kuba, pabeni,
	linux-wireless, netdev, linux-kernel, Jinpeng Cui, Zeal Robot

cgel.zte@gmail.com writes:

> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> Return value from cfg80211_rx_mgmt() directly instead of
> taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> ---
>  drivers/net/wireless/microchip/wilc1000/cfg80211.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

The title should be:

wifi: wilc1000: remove redundant ret variable

Please read our documentation:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_title_is_wrong

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

end of thread, other threads:[~2022-08-29 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-29 11:16 [PATCH linux-next] wifi: cfg80211: remove redundant ret variable cgel.zte
2022-08-29 12:34 ` Ammar Faizi
2022-08-29 16:12 ` 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).