All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang@huawei.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: <davem@davemloft.net>, <linux-wireless@vger.kernel.org>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] wlegacy: Remove unneeded variable and make function to be void
Date: Mon, 16 Sep 2019 13:53:47 +0800	[thread overview]
Message-ID: <5D7F236B.3070409@huawei.com> (raw)
In-Reply-To: <87h85hh0hb.fsf@kamboji.qca.qualcomm.com>

On 2019/9/13 1:45, Kalle Valo wrote:
> zhong jiang <zhongjiang@huawei.com> writes:
>
>> il4965_set_tkip_dynamic_key_info  do not need return value to
>> cope with different ases. And change functon return type to void.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>>  drivers/net/wireless/intel/iwlegacy/4965-mac.c | 8 ++------
>>  1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
>> index ffb705b..a7bbfe2 100644
>> --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
>> +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
>> @@ -3326,12 +3326,11 @@ struct il_mod_params il4965_mod_params = {
>>  	return il_send_add_sta(il, &sta_cmd, CMD_SYNC);
>>  }
>>  
>> -static int
>> +static void
>>  il4965_set_tkip_dynamic_key_info(struct il_priv *il,
>>  				 struct ieee80211_key_conf *keyconf, u8 sta_id)
>>  {
>>  	unsigned long flags;
>> -	int ret = 0;
>>  	__le16 key_flags = 0;
>>  
>>  	key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK);
>> @@ -3367,8 +3366,6 @@ struct il_mod_params il4965_mod_params = {
>>  	memcpy(il->stations[sta_id].sta.key.key, keyconf->key, 16);
>>  
>>  	spin_unlock_irqrestore(&il->sta_lock, flags);
>> -
>> -	return ret;
>>  }
>>  
>>  void
>> @@ -3483,8 +3480,7 @@ struct il_mod_params il4965_mod_params = {
>>  		    il4965_set_ccmp_dynamic_key_info(il, keyconf, sta_id);
>>  		break;
>>  	case WLAN_CIPHER_SUITE_TKIP:
>> -		ret =
>> -		    il4965_set_tkip_dynamic_key_info(il, keyconf, sta_id);
>> +		il4965_set_tkip_dynamic_key_info(il, keyconf, sta_id);
>>  		break;
>>  	case WLAN_CIPHER_SUITE_WEP40:
>>  	case WLAN_CIPHER_SUITE_WEP104:
> To me this looks inconsistent with the rest of the cases in the switch
> statement. And won't we then return the ret variable uninitalised?
Yep,  I miss that.   please ignore the patch.  Thanks,

Sincerely,
zhong jiang


  reply	other threads:[~2019-09-16  5:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 16:41 [PATCH 0/3] wireless: Remove unneeded variable zhong jiang
2019-09-12 16:41 ` [PATCH 1/3] brcmsmac: Remove unneeded variable and make function to be void zhong jiang
2019-09-13 13:37   ` Kalle Valo
2019-09-12 16:41 ` [PATCH 2/3] wlegacy: " zhong jiang
2019-09-12 17:45   ` Kalle Valo
2019-09-16  5:53     ` zhong jiang [this message]
2019-09-12 16:41 ` [PATCH 3/3] libertas: " zhong jiang
2019-09-13 13:38   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D7F236B.3070409@huawei.com \
    --to=zhongjiang@huawei.com \
    --cc=davem@davemloft.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.