Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2598437ybe; Thu, 12 Sep 2019 11:52:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyO1UuyoZuHixvsonn+UIGY+UTJtmCxxpa68Wep/TotavydJQ92PG5neEUxelD6ueLQp42W X-Received: by 2002:a17:906:7c55:: with SMTP id g21mr35225730ejp.177.1568314366886; Thu, 12 Sep 2019 11:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568314366; cv=none; d=google.com; s=arc-20160816; b=Bk2QkkTDurjAmsA7Ll12DCVQ0K/7IefT/+IIPFOEEm2WTpcYdEzgBeL6u+VZtCF0Fq iz54ApZoP5QSqj/iqMc3uOD7M4Wo69edCzQh95rug7tc8Ai3etFBiZh/qkA6S9g1tWzd M4JfO4QAKOOqNCms9Bk1ec+wxSiiF4ccsC7OworA7r4mh9DL6PxFmPqzu0wWLDmK1SPR Rp/NRkbr1k8Aq8iAs+sO+knW6Ye+wLcxVw0UWO+od+2Ae73n7bawEjcXE/SeYGvFT4xr EvsEd11g4DhbOX72tg+OV6baNaU89Ip+1HwDrgGyuNQC5r8vTj16cHEhx71hv7uTK6Wi XKIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=wC4SSX+QQ+GVejduuf3Bs1E26vLqDv0FUQYxJALVQK8=; b=JPKQs6VBcCZYyecpgtx49SkeOA2u0R4mTGdT+odAcDjiWKxS3PhfUqjZVwinWgiERC uLFH4WdrVuCj+EFNKBkIJKSc2g9T7W+/wxEJenE7F60Yt478wmNCERFyCew0eRSiA85D IDJVNc2u0GedmywgPkJmGU9dgmxyjpNejrYOHGzcngldRZnYlTOPPmEIBgGN1kL3ib1N xZM6HZjhgmK37Ad/ZYAYZvjhxcH/ZyPw1k/CmbXAJ1cPPeK5hnTV3qiabyy1V3UERjAp 34CqFukmXMFZK7OJSzqpVC8qWguebQX6T0zj1JO5/7JTrzVIDSOMQn23PanxIJlSLz2j Hrxg== 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 bo13si9624802ejb.307.2019.09.12.11.52.22; Thu, 12 Sep 2019 11:52:46 -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 S1733288AbfILQox (ORCPT + 99 others); Thu, 12 Sep 2019 12:44:53 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53334 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727764AbfILQos (ORCPT ); Thu, 12 Sep 2019 12:44:48 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4F04B4D8D9060BE943DC; Fri, 13 Sep 2019 00:44:45 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Fri, 13 Sep 2019 00:44:35 +0800 From: zhong jiang To: CC: , , , , Subject: [PATCH 2/3] wlegacy: Remove unneeded variable and make function to be void Date: Fri, 13 Sep 2019 00:41:31 +0800 Message-ID: <1568306492-42998-3-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1568306492-42998-1-git-send-email-zhongjiang@huawei.com> References: <1568306492-42998-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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: -- 1.7.12.4