From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8244DC4CEC6 for ; Thu, 12 Sep 2019 16:44:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EFD520830 for ; Thu, 12 Sep 2019 16:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733289AbfILQox (ORCPT ); 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