Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2647884ybe; Thu, 12 Sep 2019 12:36:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyju+d/d6YtcPXRtD1BzPj0tz3folDrWQ5YCatr1bTxkPtpL7RFkxWtO8cGwCpZOO8Gf3mD X-Received: by 2002:a17:906:3583:: with SMTP id o3mr13735692ejb.224.1568317013521; Thu, 12 Sep 2019 12:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568317013; cv=none; d=google.com; s=arc-20160816; b=nnwT60zk43bnhC6Mr0URtAtDHwzA5EVOXAKmaX1FRsNtl79h2mD43wdNnelUD054Jl vowaZ7MIbQyUkztIF1B7yfuxLZuT7r7/MMVKQ76a9hmAeKX45lIAdnb8kBsbCR3Rorc8 FpZWkZQ2gPIQB94kYucPO3jwAs9YKVDjmg2/NdBLnSGLwcRh3PjokG+uFFPoc1/cg8+M L0vKNE4rQ5c0H2HW4x3+Faq4breQBWdgf6PGfPzMOJzd73yaApXbmdrSEmvLLmO4k8+i +DqG//ZMNNO4HL3mYWd9moSolfuRYwfvTBtHgg0dR5xenKjnujPDN5JJVzpx9glHCLIq gUog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=E9CBmxriQuM/Y4dy543Lv55+MAn0wEgOgfE+sIx96TQ=; b=lOcnvefxHJyTkDqn9MRunoxO2DMUCjV2eCSlPj8tZC+U3sIwrsU7pTGciwil2ZR+xw rl/Z/1fKxoP8uP1z5RVjWEUnQWyUPORD1oSLeFCvvB2M7ZetSTPghLXWbE93iXxKOLKw PohWGHfqK0gyOEp1Fq8aFnt/pSokErroS3Dr71SPzplErvm5nyn5tqCrnM4aukJoqcpM gE8C+4jUkMO605Puw8Udv7gn5e+eySHjXt2hajcvJzWpXGmkBXAJGHWNZApB6TNjySDd SUGbOL0C/woW8UR7b9RLA2xVR8itfGrtu2PZP4SAjopD10Fok8wN+j39bhc1Es2W3WpE 4Itg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="DlWQWB/3"; dkim=pass header.i=@codeaurora.org header.s=default header.b=h7ePW9OE; 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 g21si16907103edg.339.2019.09.12.12.36.18; Thu, 12 Sep 2019 12:36:53 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b="DlWQWB/3"; dkim=pass header.i=@codeaurora.org header.s=default header.b=h7ePW9OE; 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 S1727239AbfILRqE (ORCPT + 99 others); Thu, 12 Sep 2019 13:46:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48834 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727298AbfILRp6 (ORCPT ); Thu, 12 Sep 2019 13:45:58 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B126960790; Thu, 12 Sep 2019 17:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1568310357; bh=NomiIUWIpO7zNfhNi0Mb4r3uO+M77AU+yjjx24sAiq8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DlWQWB/360decLVvnZky0qgtHvQeXw/VnQ86Gyv/WeHioD1+n+8zteHAkmfgeUcqZ bMhMgWLdmfWbpK0sdyJFaERqtzYNuzBeJQh5GUWWeba35LpNonenBKtztSrMXdEHhH rJ6kXZakHnFESy2gccxnjGq3Wy4Di9nGIp+A9QBk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7FC906055A; Thu, 12 Sep 2019 17:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1568310356; bh=NomiIUWIpO7zNfhNi0Mb4r3uO+M77AU+yjjx24sAiq8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=h7ePW9OEn0yiyJi3BH2aeADPm8dq8yIXP3/UbtX/+zlWu9VDU7O+Pt/pxUpEJwYBg HEmrU9TjMrpNKGCis3GVaPh38QNrsyUU88NUz17sHoEOSjfofNM2qy+1HhmkBML3T0 AWIq3GMMFlBowi0ZFGF7je/0J+Hmv20isubG9up0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7FC906055A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: zhong jiang 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> Date: Thu, 12 Sep 2019 20:45:52 +0300 In-Reply-To: <1568306492-42998-3-git-send-email-zhongjiang@huawei.com> (zhong jiang's message of "Fri, 13 Sep 2019 00:41:31 +0800") Message-ID: <87h85hh0hb.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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? -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches