Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp349611imw; Thu, 14 Jul 2022 02:28:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1srDuBDD3tcu/4cgIWbrDdDFydGg1y8pp33rlv0CNAfOAh2T/hR7cZ5zP1GI/FBjASgTCMv X-Received: by 2002:a05:6402:c44:b0:431:52cc:f933 with SMTP id cs4-20020a0564020c4400b0043152ccf933mr11076737edb.41.1657790903104; Thu, 14 Jul 2022 02:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657790903; cv=none; d=google.com; s=arc-20160816; b=JlNiFpmw74+pvYb0h4VmjYorPwbe1qYmEhWAi5zvWEjR+OnjQrW9QI3pajmOAB9Rwi /gntmFuSLV42S+WQMECknWZv0Jo1+/xRAKYOd9M98+cuw9FiRejWumRSaChGvJMk+ANJ oQAbGOSww67BVaCsIOoBZ8IIDSUr21KCqHx9+bQRhPpHerNpbZ4cFC61UlhjQzeS9smO mWuwWHFAyFnEkVmWPBnjevct1l0XBvYgnZC+PqkgY4cVbIic+J4XgQBc8TprZl1wj8Rq 8nNk7AS94VbW4uENXO3O2cKar/vazxvzau1vzoWY3BjXnGUR4bMiB+WwbO+rhgpeLSN0 mlGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=R5ZqtwTWPz0C8SHUviuHgAy77lfUbFLgBdTCnWGuibs=; b=gpQUA/Smrv9SaZZs+C+F0aLeOueErXCHf4an1T4xOF6SvEIA/FGWF51M19CVlHaWeH kbvFul7ir93Ub2BgWNx46EqdTMVGGnHM+l0LD6KgdHRAzsntwF6SI2xMlkkxbAgVuj4D 46Q13qEt3LW1QWXemzipwl8GTZ6ITKPrYOF3BIGX8JtSntv32Q/mtKUayzrHtLgPi1HS GE/03drs+BjcStvK9eky22iDNIEjRdIVBNPFaqBjpu2hnu/htWNrd0ss2F2oxUnvMlvs wPgMnZNjS7JtLf7CAiw9ftzNE/ySHZccM8/Qr9S2RQAgNlnorJuer6YTeKcGV9IyutCW 48oQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a17090646cc00b0072ae88744a0si1366252ejs.277.2022.07.14.02.28.06; Thu, 14 Jul 2022 02:28:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238184AbiGNJWE (ORCPT + 65 others); Thu, 14 Jul 2022 05:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237834AbiGNJVq (ORCPT ); Thu, 14 Jul 2022 05:21:46 -0400 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B8A0550AF; Thu, 14 Jul 2022 02:18:25 -0700 (PDT) Received: from rustam-GF63-Thin-9RCX.intra.ispras.ru (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPS id E1B5940D4004; Thu, 14 Jul 2022 09:18:17 +0000 (UTC) From: Rustam Subkhankulov To: Christian Lamparter Cc: Rustam Subkhankulov , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Khoroshilov , ldv-project@linuxtesting.org Subject: [PATCH] p54: add missing parentheses in p54_flush() Date: Thu, 14 Jul 2022 12:17:41 +0300 Message-Id: <20220714091741.90747-1-subkhankulov@ispras.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The assignment of the value to the variable total in the loop condition must be enclosed in additional parentheses, since otherwise, in accordance with the precedence of the operators, the conjunction will be performed first, and only then the assignment. Due to this error, a warning later in the function after the loop may not occur in the situation when it should. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov Fixes: d3466830c165 ("p54: move under intersil vendor directory") --- drivers/net/wireless/intersil/p54/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intersil/p54/main.c b/drivers/net/wireless/intersil/p54/main.c index a3ca6620dc0c..8fa3ec71603e 100644 --- a/drivers/net/wireless/intersil/p54/main.c +++ b/drivers/net/wireless/intersil/p54/main.c @@ -682,7 +682,7 @@ static void p54_flush(struct ieee80211_hw *dev, struct ieee80211_vif *vif, * queues have already been stopped and no new frames can sneak * up from behind. */ - while ((total = p54_flush_count(priv) && i--)) { + while ((total = p54_flush_count(priv)) && i--) { /* waste time */ msleep(20); } -- 2.25.1