Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp588281pxy; Sat, 14 Aug 2021 17:00:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5dj9DByorxahY6bITwlx6i+wD0oGtsuAoXLq8710Ar2WoERP5PhStkJghMVSXC6wV06Fu X-Received: by 2002:a17:906:f190:: with SMTP id gs16mr9356129ejb.439.1628985603137; Sat, 14 Aug 2021 17:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628985603; cv=none; d=google.com; s=arc-20160816; b=jG+ShEWXJxk99Z1jIQcpxLoCPXJlIUAS4ZDQsNKeBIUz0ZFr+xgj6+Cq+smnXg5eAx Up4B7FEtwmIca7PMrt3P/lk9GJ3Qny/hFVtKDOf79gAbJ7mhGkY/wr9bg/7tHhQ2P2qv OxhmYditjcBwHQ8TPTRd5S0A0QhV4TaNgKePCEkPvsSSzivzMLbfDTQMsPF5EKcWtmBw MP3jKMbhcqeeXImdG9F6zLxao5CtzXx4xYCU9VqO0yG8Fgc9IBILiuWy1DMlxF5KvuZm eAMLnTf/uWlOGp53VhnAtYKvoHgZUaldn0CnLwwRWS1gH4Cqa6Rv27TTonHZD+yMB9eK A6vg== 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=rd8BQHMspCHaupTO768fGIBG3zA0Hly0yDaOkxKM9sg=; b=OgfOT1AEJlX1LxWu8Y5bssi6sIqQDIhry6VSjGgUR3bTWoD0MSKBZtL2XPXtFl5oX3 yrfAOS73WpdD5DkeQ/+GNErTAG3ym0leE7MS+SdBVZWmm5LJlBvra1kRvm3zkAO5Tax5 uLUxuuRu/XJwghjZLg48/03sfngQ47HoSmyDYbeYxQx2nhjnFfocSMC5E2sQiu9vuFxq K9mOG4VVadJrj/U9h1n+KpCjlNkGAtXoU63tEqtS0I9TDfJgfUz/wJPgJBJzXvL0KSqy 0a/3CXXTSuc7mh8yZKa9JNDDentZC7YPWhOCE5C9ZF7i5kx7Utk8/34gkvd0g7rcndC+ hhZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K1qJ92Zn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 s14si5925717edw.68.2021.08.14.16.59.39; Sat, 14 Aug 2021 17:00:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=K1qJ92Zn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S233644AbhHNX6y (ORCPT + 99 others); Sat, 14 Aug 2021 19:58:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:36718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233237AbhHNX6u (ORCPT ); Sat, 14 Aug 2021 19:58:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD30260F4B; Sat, 14 Aug 2021 23:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628985501; bh=t8Q+1vcbRYWm0DqjrS1nRd/+A1arBzQyYrDSspaqKe0=; h=From:To:Cc:Subject:Date:From; b=K1qJ92ZnvsqrMKYnSPkc+Qh3yLLopJOit2/jGIOmrzNDHmVlQWCMzxW3fje3w0ziT 4a2s+UEKQAd7/8doDZ4n/FgQzuK1XTSkLgpYDvGWmxh7umx2EhHyodhZjJTlEoMS2r A7uZJ9g7rHXkrCkcoPR49p0PM5K/zQ0TWdXJJ7D2Tlu8Ts18b/wPCCHpc1K3Gxs77E MJsHPJ+ZDEPqG7bNkDlK1kgVo6Pg+0W0cq7g8fbGBV+p1QCQMoBieEGJAuEqxcXcPY Onl1MmNJolZ2Ph2yL+CmkTRd90rn6mR92aOrjDb3/Xa2mA18G3MUxc/h5UD2GLQpzW y5zB1eI02J2wA== From: Nathan Chancellor To: Greg Kroah-Hartman Cc: Nick Desaulniers , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb() Date: Sat, 14 Aug 2021 16:56:26 -0700 Message-Id: <20210814235625.1780033-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-kernel@vger.kernel.org clang warns: drivers/staging/rtl8192u/r8192U_core.c:4268:20: warning: bitwise and of boolean expressions; did you mean logical and? [-Wbool-operation-and] bpacket_toself = bpacket_match_bssid & ^~~~~~~~~~~~~~~~~~~~~ && 1 warning generated. Replace the bitwise AND with a logical one to clear up the warning, as that is clearly what was intended. Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Nathan Chancellor --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index db26edeccea6..b6698656fc01 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -4265,7 +4265,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb, bpacket_match_bssid = (type != IEEE80211_FTYPE_CTL) && (ether_addr_equal(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : hdr->addr3)) && (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV); - bpacket_toself = bpacket_match_bssid & + bpacket_toself = bpacket_match_bssid && (ether_addr_equal(praddr, priv->ieee80211->dev->dev_addr)); if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BEACON) base-commit: 0bd35146642bdc56f1b87d75f047b1c92bd2bd39 -- 2.33.0.rc2