Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3767943ybe; Mon, 16 Sep 2019 00:28:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkBW1TjsxGosDVCQK78KusfE5O9T6VTfDvaMwPvZCWZyjRCD4bW1srOomACYb0Lhb074bB X-Received: by 2002:a17:906:f283:: with SMTP id gu3mr13606889ejb.17.1568618906482; Mon, 16 Sep 2019 00:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568618906; cv=none; d=google.com; s=arc-20160816; b=Q4fJ4r+qF4sTf2WPPzoidSbKQCQCVk3TUf8ESaiugLfuYcRyOF8heEBTOkMTKxSItv kumPSrJY5X2QxwuQdYkC6d2EA1kl7cKltBvSapocib1dH+aMErcbp2oNXNRHBoN6150f ISqdjorYVInJYeE2XuITEDEE8UuWohCW9El9hguoTV7DpqO5X01foJvShrLg0MTAgkW0 2shDLi3rcozteyqrk6r2vNmWFDixfzy12XaGhVHLGKo3RLZIzmxaZ06r6Xdg57pflyvw yNsXXh87rLP25RXicksEqGYPkv40tLJUE6kion++PlLSVyUHgQg924EncRXuM+EdRD8U 7nkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=AHAI6tKsCuYoXXRe6FMEKWOKWHBm2QCurQ1cG/AGg9o=; b=l59Xhbxx0c9gmzyJ1+QgR3kL45PQmo6jXGKE1uNisLl3iIN7mwr9NAvePoRS1tfoxo xudNib5E97TSLOdtubmPoRIoHroUqOpgiS4+MtP/unecNtBJ0sY5cjNU4kSEgCxRI70R x50wormPp3PMHj4sxaJxa/W+t/t3xQVJaG79XGOPqR7EmDIJuxxVRYtjfIEXUs2crgXP c8oGLoxXSSVFMoZ69ciJZXL9mlx3eN53Vr+KBBQ6emrg/x9ZdS96ulR83gJHE014tdgy lCzZmSf3JENmRTej23p41rmC33T7yAhOBGkH+gv8AWPOZk9WOQECOU3gpEVii1YNkDx4 vx3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si22879119edb.379.2019.09.16.00.27.50; Mon, 16 Sep 2019 00:28:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729311AbfIPFxx (ORCPT + 99 others); Mon, 16 Sep 2019 01:53:53 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48860 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725270AbfIPFxx (ORCPT ); Mon, 16 Sep 2019 01:53:53 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CB8CDB3E637D25ED0F96; Mon, 16 Sep 2019 13:53:48 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 16 Sep 2019 13:53:47 +0800 Message-ID: <5D7F236B.3070409@huawei.com> Date: Mon, 16 Sep 2019 13:53:47 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Kalle Valo CC: , , , Subject: Re: [PATCH 2/3] wlegacy: Remove unneeded variable and make function to be void References: <1568306492-42998-1-git-send-email-zhongjiang@huawei.com> <1568306492-42998-3-git-send-email-zhongjiang@huawei.com> <87h85hh0hb.fsf@kamboji.qca.qualcomm.com> In-Reply-To: <87h85hh0hb.fsf@kamboji.qca.qualcomm.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2019/9/13 1:45, Kalle Valo wrote: > zhong jiang 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 >> --- >> 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