From patchwork Mon Feb 8 02:32:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: samirweng1979 X-Patchwork-Id: 379044 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 408CDC433DB for ; Mon, 8 Feb 2021 02:34:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E79C564E60 for ; Mon, 8 Feb 2021 02:34:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbhBHCeT (ORCPT ); Sun, 7 Feb 2021 21:34:19 -0500 Received: from m12-14.163.com ([220.181.12.14]:54748 "EHLO m12-14.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbhBHCeI (ORCPT ); Sun, 7 Feb 2021 21:34:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=OgKwUMofdoKu/7tnN0 0hu/u8x4YRxNderZkLq1lXjs8=; b=AYzWygfI+RZuDTyrucL4lp61pslPikSkJi 7J33R1eNLyDzYGeMIXor/NsAdjDYIGsdaUiBXz7o9cY7FTCQHt/+p1er3eguny/m OA+ERuaWT3MneZlgDVjyC5hc56jIAamgfMdJ4sGzz4DL1r4gITXNaq1hl13v72Ws EHf0+MINM= Received: from wengjianfeng.ccdomain.com (unknown [119.137.53.134]) by smtp10 (Coremail) with SMTP id DsCowAAHHJiooiBgSZT4jw--.508S2; Mon, 08 Feb 2021 10:32:10 +0800 (CST) From: samirweng1979 To: buytenh@wantstofly.org, kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, gustavoars@kernel.org, ganapathi.bhat@nxp.com, romain.perier@gmail.com, allen.lkml@gmail.com, christophe.jaillet@wanadoo.fr Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, wengjianfeng Subject: [PATCH RESEND] mwl8k: assign value when defining variables Date: Mon, 8 Feb 2021 10:32:07 +0800 Message-Id: <20210208023207.10368-1-samirweng1979@163.com> X-Mailer: git-send-email 2.15.0.windows.1 X-CM-TRANSID: DsCowAAHHJiooiBgSZT4jw--.508S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtrW7KF1rJry3WFy8XrWkJFb_yoWfGFgE9r 1IvF1agryxJr1jyr4jka13Z3sYyF15XF1ruwsFqrZxGry8Ja90vwnYkF1ftrZrCF4IvF9r Wrs8J3WYy3W3XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5TKZtUUUUU== X-Originating-IP: [119.137.53.134] X-CM-SenderInfo: pvdpx25zhqwiqzxzqiywtou0bp/1tbirBYzsVr7sMQ+cgAAsh Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: wengjianfeng define refilled and then assign value to it, which should do that at the same time. Signed-off-by: wengjianfeng --- drivers/net/wireless/marvell/mwl8k.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c index abf3b02..435ef77 100644 --- a/drivers/net/wireless/marvell/mwl8k.c +++ b/drivers/net/wireless/marvell/mwl8k.c @@ -1208,9 +1208,8 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit) { struct mwl8k_priv *priv = hw->priv; struct mwl8k_rx_queue *rxq = priv->rxq + index; - int refilled; + int refilled = 0; - refilled = 0; while (rxq->rxd_count < MWL8K_RX_DESCS && limit--) { struct sk_buff *skb; dma_addr_t addr;