Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp582191pxy; Sat, 14 Aug 2021 16:45:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztXLS1iiRiGAuy719SeYghH/qTA5N1lEpmuoVP954HIAHQ8HlXc26oBOT4xt5SxkHAi6yt X-Received: by 2002:a05:6638:ccf:: with SMTP id e15mr8104828jak.143.1628984733599; Sat, 14 Aug 2021 16:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628984733; cv=none; d=google.com; s=arc-20160816; b=YfRO+4C5XtikRcseMd9W2JDNauhYZRJJuAiUDkcYWi/NfLedjfZt+ec2LfTAf3SGlK TOFUfZcNwh5l8cdRZkc9DWeSOPiwIBP5HxW8rKh+ypL5YexGoPjzChreJba7QbGiMqOr qaVvH9C1rnk8lQ7NYaKUhyO6PC+NKxM4KCi5ugHigSGr7pdqjiHJApWLgWA7/Sij7O8M atyskNsC9TCtxaoand4Idj/pEuto7S6uh1anDZJH9tqWI26DF8Wd/HlYvzZ1k2OPoypI IW02f68h+l9C5ok45oZx5t3AtdwnrKQ5MzsnIZOlyh/nGhFWK6Oh9qwy9lf7KZYXG8i+ hYfA== 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:dkim-signature; bh=ZcmpCYQkUsabV50sH14OE+nrfXbutdIrITg33w/ntug=; b=EyTK2iLA9ijS9LMA95HY2pmrlrZJwuDty+Dl2Z9/pLafpzf+7SZzwLUvHK+246BWBp /pqIGtTnBojAxpOlwv/n1YD+4UHhS7oiw64YeFDn84TFq8Y21BvHKeC8JlayT2g2dYG4 tdj0Y6WbaMcDSNXiRlVV9jv+5a9qgFneGqeXExcI9U5aD+Mg84KqzerFMyq/d8C1S+Bk OiwSQni2stu10Zfe/HtNYiwfVMhMtXNd0erWUgcGoDv6CjsFnjPCMmd7tAjXFJ0ziX4f 7trpaJOJMhzq3Dp/eqTh6GRS0xgmiqLXJPE88fDj47n+z0a8MVMt3cp9WDtwQC2b3rfj 7vIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NTmxIQK/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t7si5730673jah.88.2021.08.14.16.45.17; Sat, 14 Aug 2021 16:45:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NTmxIQK/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234184AbhHNXnl (ORCPT + 99 others); Sat, 14 Aug 2021 19:43:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:56978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234330AbhHNXnh (ORCPT ); Sat, 14 Aug 2021 19:43:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 444C560F48; Sat, 14 Aug 2021 23:43:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628984588; bh=nipsjhHCi02+bGpq1NI464aFtAGGb9opafHbiKjdbAk=; h=From:To:Cc:Subject:Date:From; b=NTmxIQK/EkQOFxz+Xj/L87q6LcD8LiYeqfoc4xP4rA2cz2SmOuHYC1gA9FKLTXRpg reS/Bqdu/G2FhmszJ5kju49LberxoEgcbU8IBLkFuDS+Vq/AyGz30/GvVkhPXWy8LO esXjdw5LXXy8ezNboutxGMH0xS4G5M7Adf7ayP84tkfNieRUU4Ss4aOzBEISHAzmqb OIzCxY8ydFUg0JrwMd4hr7EQUABddM5yiJ+8e0OZPFbMxuSit6X7PGJaohAuv+XnEl CR2msEbk7VRUe37vE7JUuh6ZSwhlfzRJYqxhXdUGgK0bNK9LQ4eBsNdP36nGfkvlAL mwiuHv/9Ztokg== From: Nathan Chancellor To: Luca Coelho Cc: Kalle Valo , Nick Desaulniers , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] iwlwifi: mvm: Fix bitwise vs logical operator in iwl_mvm_scan_fits() Date: Sat, 14 Aug 2021 16:42:48 -0700 Message-Id: <20210814234248.1755703-1-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc2 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Clang warns: drivers/net/wireless/intel/iwlwifi/mvm/scan.c:835:3: warning: bitwise and of boolean expressions; did you mean logical and? [-Wbool-operation-and] (n_channels <= mvm->fw->ucode_capa.n_scan_channels) & ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ && 1 warning generated. Replace the bitwise AND with a logical one to solve the warning, which is clearly what was intended. Fixes: 999d2568ee0c ("iwlwifi: mvm: combine scan size checks into a common function") Signed-off-by: Nathan Chancellor --- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 0368b7101222..494379fc9224 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -832,7 +832,7 @@ static inline bool iwl_mvm_scan_fits(struct iwl_mvm *mvm, int n_ssids, int n_channels) { return ((n_ssids <= PROBE_OPTION_MAX) && - (n_channels <= mvm->fw->ucode_capa.n_scan_channels) & + (n_channels <= mvm->fw->ucode_capa.n_scan_channels) && (ies->common_ie_len + ies->len[NL80211_BAND_2GHZ] + ies->len[NL80211_BAND_5GHZ] <= base-commit: ba31f97d43be41ca99ab72a6131d7c226306865f -- 2.33.0.rc2