diff mbox

[DETAIL,13/19] rsi: Delete unnecessary variable initialisation

Message ID c95f816da2d5c6789004e063e1b7adc44695718e.1458262312.git.julian.calaby@gmail.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Julian Calaby March 18, 2016, 2:25 a.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>

In rsi_send_data_pkt(), the following variables are assigned to
before they're used:

 * tmp_hdr - Assigned on line 47, first used on line 48
 * bss - Assigned on line 41, first used on line 44
 * extnd_size - Assigned on line 50, first used on line 52
 * seq_num - Assigned on line 48, first used on line 96

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
[Rewrote commit message]
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_pkt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

SF Markus Elfring March 19, 2016, 12:27 p.m. UTC | #1
> In rsi_send_data_pkt(), the following variables are assigned to
> before they're used:

Thanks for your interest in this update suggestion.
How do you think about to add the function name also to such
a mail subject so that the potential for confusion with an other
change can be eventually reduced around the source file "rsi_91x_pkt.c"?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julian Calaby March 19, 2016, 1:15 p.m. UTC | #2
Hi Markus,

On Sat, Mar 19, 2016 at 11:27 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
>> In rsi_send_data_pkt(), the following variables are assigned to
>> before they're used:
>
> Thanks for your interest in this update suggestion.
> How do you think about to add the function name also to such
> a mail subject so that the potential for confusion with an other
> change can be eventually reduced around the source file "rsi_91x_pkt.c"?

I don't think it really matters, they're both doing the same thing.

Thanks,
diff mbox

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c
index 571eaba..4322df1 100644
--- a/drivers/net/wireless/rsi/rsi_91x_pkt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c
@@ -27,15 +27,15 @@ 
 int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
 {
 	struct rsi_hw *adapter = common->priv;
-	struct ieee80211_hdr *tmp_hdr = NULL;
+	struct ieee80211_hdr *tmp_hdr;
 	struct ieee80211_tx_info *info;
 	struct skb_info *tx_params;
-	struct ieee80211_bss_conf *bss = NULL;
+	struct ieee80211_bss_conf *bss;
 	int status = -EINVAL;
 	u8 ieee80211_size = MIN_802_11_HDR_LEN;
-	u8 extnd_size = 0;
+	u8 extnd_size;
 	__le16 *frame_desc;
-	u16 seq_num = 0;
+	u16 seq_num;
 
 	info = IEEE80211_SKB_CB(skb);
 	bss = &info->control.vif->bss_conf;