Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087477rwb; Mon, 15 Aug 2022 17:49:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR4wPdFc25g5a8OaqWGuKHfNkmRP1J4v1JcPxVJ8a3l6KOXFscYBM0au4s41orX0ov1o39iT X-Received: by 2002:a17:907:7617:b0:730:e317:d0e9 with SMTP id jx23-20020a170907761700b00730e317d0e9mr11759882ejc.736.1660610967682; Mon, 15 Aug 2022 17:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610967; cv=none; d=google.com; s=arc-20160816; b=A2URnH5KGoh2XkShIBr1zt9tu0Sa8EwT5HL+gu5HPmv+4vSl1TUtCgc6gSkdwXkhPY 5W1arYtvgldLoQh/wyDyUsNyGiVKSBjsBnII8dMbBzToNjfyqKwlJFSicx+bOQsRwd6U bSY9RVvS8GvyggcgcN8wa1EjvvrSkzC5STG72nXbSJ9iJIarZlB7xgTi05SfpfFmzrlY PcTzHQSMgv518ACnQd2Xe8rNrlqgIxQDvLJ9vhvl7b43crjNO5Sedr6iyghjcvbMau20 mExgme/bWehlfZ7DFizcJ0AOXNi3iyDBcRLebGq7ea+uJoXUKccOfon0y4s6KDwI9t0I Nu4A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R5ULoC0A8WpnpfvEBzpOAsNMB6ZtYXXLIhipLC23hfw=; b=oQ37MgFtDrX+qWMZzuPAsFmQSBrLxEw1dxABSVba2n/hq1LRapZFqJqwPSvHFTLKxZ t82iih1ZXJGY9OmlFZN696oFe/PeSF4+4eWXiCRKtuCdtm/u+M0xiSVc80rfN78FTAnt /J2XvYtCieliUag2OMr5CHbo5eG9t/QeFwFmVXheCTmMaHdTOUMc571AMuqT21Bj3sHN FMdYZvsGomOVSDFXLbIxyeJCarrOsGzSKP8rjeIKnOJzNbzpqAfLx2n5sAXqMBT5wqcw jBhNVmA7Z9cgCfdatH3uzcfXX3YQWkKizaFgEuMDm8Suz4zS5tyJ7c2hMJllySapwidS 86dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CGToCNNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd5-20020a1709069b8500b00734e75c49fbsi8066052ejc.204.2022.08.15.17.49.02; Mon, 15 Aug 2022 17:49:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CGToCNNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352010AbiHOX73 (ORCPT + 99 others); Mon, 15 Aug 2022 19:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355614AbiHOXwk (ORCPT ); Mon, 15 Aug 2022 19:52:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5747A4CA02; Mon, 15 Aug 2022 13:17:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 01CDBB80EB1; Mon, 15 Aug 2022 20:17:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BB0CC433D6; Mon, 15 Aug 2022 20:17:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594631; bh=fQ8GGMOh4zLwx6CDpw5/MD/NznF498JGC0ZDntJHGnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CGToCNNpwx4jHjKK9ls357dxxEyapOPF6i2SbvsR1Cp5m2WCIixVjhKtib+oNjpZV CCX3TACHTHN14Ruq6J1NzV5m2AoOVhKW/+Ft5yCpoaPpLedIpMYZlPGsz+2viiwe0h Lm8eIe9iPUjhRxA/QCxLsn52VDal7Vclyu4NWbM0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rustam Subkhankulov , Christian Lamparter , Kalle Valo , Sasha Levin Subject: [PATCH 5.19 0508/1157] wifi: p54: add missing parentheses in p54_flush() Date: Mon, 15 Aug 2022 19:57:44 +0200 Message-Id: <20220815180500.012886364@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-kernel@vger.kernel.org From: Rustam Subkhankulov [ Upstream commit bcfd9d7f6840b06d5988c7141127795cf405805e ] 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: 0d4171e2153b ("p54: implement flush callback") Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220714134831.106004-1-subkhankulov@ispras.ru Signed-off-by: Sasha Levin --- 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.35.1