Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp562200pxb; Mon, 16 Aug 2021 11:46:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu8o/KPRok0pR3GvR0bcQfggUiQEOocrmkemkn5e9ko/0YAYwnoA0Z+cR9UR5oPd9XvLf7 X-Received: by 2002:a50:9fa3:: with SMTP id c32mr22377157edf.354.1629139575804; Mon, 16 Aug 2021 11:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629139575; cv=none; d=google.com; s=arc-20160816; b=z8y9OmbcK65nsPd6nfaEQ8aFgoSMwgqnfoXe/xWzaTjVvN74PcK6k5lXdpnT0PAbdC 3PCrR62k7oa5v7IcA4FgPdKQ+3+qogXY6jlg0koQCTOKmZMEUF1BK2u6kT+5KFmOPmQf D0iFDwLc6uPWYSSLHJAOD0CbYgZIif0pmQlDzkMq+elQK80JUOmvNn342ueqSIWHZ0A+ F1U11tIOnszr7lI3RmJptyTzLQxbDX8BA/y3qdFCiI17B5L6v6aAVqhK8fChrKE4zwZf 5T+FGn98uiONXc/QzYxabHNihI5dTyS4aXlNAAgBWWrmhXcCYUw95URSWyoDPB3jzzVh 9/DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DOC2qH+Gi4fjMQIz9mck49PHMjhmRHhlBc5XPTN/slk=; b=kw6/qJXQXbz73SL8D/0rBDbfzbMzESUpMP9wBQfZ+nn2ko4Qk2uowEQCe40HWffnPk V0LJiqw6f5VKmdOMAZ+1K0kBjjcBX+cKW2oOS+cAYFJK6cKbgv8iCZvAvYmFHbqbKsFJ 9zO9q8i1csF5Czg3b2i6WX+y376DDgZKdOwo3wPZuPaY+/SVa1RZGCIiFsXmdH+b/gIR e+qzhijo0/fz2Ri+Ew3IXxakxhg5mez27Td1ClvdoTgjj7Xu6SwLQECUvX1g0W899SpL PCEZ1vAkynIsm2epinMnRvUTkTNbpLJm93G1eG2hFOktM8+Sn4nLdYcGucuyr9MruU2g M8RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dlWwzGdK; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb21si7754253edb.252.2021.08.16.11.45.51; Mon, 16 Aug 2021 11:46:15 -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=@google.com header.s=20161025 header.b=dlWwzGdK; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230312AbhHPSqU (ORCPT + 99 others); Mon, 16 Aug 2021 14:46:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbhHPSqT (ORCPT ); Mon, 16 Aug 2021 14:46:19 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6034C0613CF for ; Mon, 16 Aug 2021 11:45:47 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id g13so36324747lfj.12 for ; Mon, 16 Aug 2021 11:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DOC2qH+Gi4fjMQIz9mck49PHMjhmRHhlBc5XPTN/slk=; b=dlWwzGdKnjpZ4WYlLo8WeTdORYWvDWRJjhGZmS+s1OFr5JDoN0EGxsPrhHjxuGQ2uc FG7p+14j3jd3Evx8uDZCVwAtozoUshNqkre3LopUGMLuvXCt4QTC5gXmBUeFG1RdoC19 UxqeeP50p9nOccLYj5dbMBjyL9e/5U+xPlzTRwdqpmaSj6eqsL6RHWTFqCQsocV0PIzq UjBbjwNeRBGVYoFFl1jT4rEhw57ro4V7soFL46PVVPDEv/eGdlC7v8iAItpt/CMpdvoz mXIKXmr/In7WrV0I26EN050uHGmlXYkprqhH88wh5KHRZGa/uCNEskK8Mf0aOg7/qTVi gd8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DOC2qH+Gi4fjMQIz9mck49PHMjhmRHhlBc5XPTN/slk=; b=kN3v3kYXEXn0vgkCYz/nvQ1o24RfOF283jfZ16eN4qqT/rnAXHcS1qGgDZh+Lr1Fs+ p4r4m7rGrGaarMv82OXK9yQRYn4bRqnU4hP+TVwIYW3Ljpasvm6cqIRG8lDtWbcHqA1e fsbl6Z3wCidthkApbd4jRmxilFwYJFhdGIIUJ4wq5IorbjyZR4hyU4nGu0GXy4Uf2CGl AYCPgAVKy1SNuz4C8sguWS7ojQMgLKku2j/2f+tEzDp4YQf9I9qxyH3S7ZsbKySxE4xB 4EEdFZFxFqfInO/Qb0lHJJRwx4j+0FGxR25yQ5GUBJRXRzNH2s+GAkOzB9yb8yKabPvE O/Fw== X-Gm-Message-State: AOAM530eBpdFf/NEpfateBTQVuJgsAaF0rGiVOb+7CWtYxAsH/EWnRL1 3Tp9BSHkT4sQzCgDJJbYb0WSTFg5UpA40G2Y0g/eDw== X-Received: by 2002:a05:6512:3041:: with SMTP id b1mr16693lfb.122.1629139545812; Mon, 16 Aug 2021 11:45:45 -0700 (PDT) MIME-Version: 1.0 References: <20210814234248.1755703-1-nathan@kernel.org> In-Reply-To: <20210814234248.1755703-1-nathan@kernel.org> From: Nick Desaulniers Date: Mon, 16 Aug 2021 11:45:34 -0700 Message-ID: Subject: Re: [PATCH] iwlwifi: mvm: Fix bitwise vs logical operator in iwl_mvm_scan_fits() To: Nathan Chancellor Cc: Luca Coelho , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, Aug 14, 2021 at 4:43 PM Nathan Chancellor wrote: > > 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 Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > 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 > -- Thanks, ~Nick Desaulniers