Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp564133pxb; Mon, 16 Aug 2021 11:49:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoBQJt4VwQ9Q9eLo/BFnJZ9Pt0x3P70IKZDjvtJ83SiwW8LbqQS3qkbgC2xmpnQmN5Bz75 X-Received: by 2002:a92:cace:: with SMTP id m14mr192639ilq.146.1629139765355; Mon, 16 Aug 2021 11:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629139765; cv=none; d=google.com; s=arc-20160816; b=K6dvTVOfeuLKOlydvdre6WsY58yWHVXCNKZfXhpSxj8wrqs9K+XRNaZ/NMyVvwRjqc PsdHrb3XdQhXGxkg5+VP2VAknY0mQa1OpAhB9d6qf7VirQ97eldFSIsP7V/BBvVHPWpJ 0ZyibzcnSarBbI8jegmA9qHbsMhLEtZsMVeQHfgNJdTYRkTRj89tyfd0J5E5X3bruhT5 viZ5JLWIASBdm5CT7ACJG1S8p/kk61v2pL6ePVh5yozfdNDIDUIRSW5VAsRP8jJIqpCO dy6uq2r7TmcS+qyJ3nHqFKzdUfF5ixTL1q1wKnV9reJI4aULadwg8gIAraF7iTveAnhS oM3Q== 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=OzlvgX+vzoKG9kFQ3t7nTob1GcVIUZUb5mhb/Lw1pbk=; b=1JKPyV+kj0nQykmDoigMfB3xk20FXClUU+Dt8SoNFgoYTQDxrRu2fdkOTMJiaz2JGa WJ4GYtFItwK3qYeuAyrJT4Trkr6AXkNwyTKPZRj/za2cecay9RqaPBkaZ1xcjoBnZhkk B4pEo3B3ET92o0dQd7/naMU4mnzEbbllA6d+ewjzZ0j4kArrjPjY+tod3Gsr9inN4uc/ 3R4HhTc5ZenAtQyGQS/5H/DrqDMX7LY57snfK8khlyqhdIwTrudIlGfIzNqNF9tQ58wG XpWSOKmbr5iCloNaumgv5Zof4xEXJmHQw8kXBORHvZ1s6pBtluCgPwHSNM1IH4aF987X UuRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="A4/F8buH"; 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=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 a10si158516jag.18.2021.08.16.11.49.13; Mon, 16 Aug 2021 11:49:25 -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=@google.com header.s=20161025 header.b="A4/F8buH"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbhHPStC (ORCPT + 99 others); Mon, 16 Aug 2021 14:49:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbhHPStC (ORCPT ); Mon, 16 Aug 2021 14:49:02 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1315EC061764 for ; Mon, 16 Aug 2021 11:48:30 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id h17so28654152ljh.13 for ; Mon, 16 Aug 2021 11:48:29 -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=OzlvgX+vzoKG9kFQ3t7nTob1GcVIUZUb5mhb/Lw1pbk=; b=A4/F8buHBcpAMd5F4iRPkUCMj5lF37ejNIIT+yn1E2XV1N92gAotdFTTptGAFxYGIV IWf8vgijoSuvHrmNjtKunvk97CgbinIZhUcnlhVZyoB7+FWcw0QKx8TvPfXxmNM8y5Xu /NUOlCNPCWuyR09XWEC89V1xqu2hFhzDbhJ4EWfA+Eb1Tee10/zfpBACkWfMVsayoc8p CZsx8AYSoQZYrnJ6Yfb3O2w41+newOQ5jnXj5sSWMHdgJL0wJzhuarI1c43pmWydhGbL 2yB0iw4sk3S5lejQnTD4RSF4wrI5rFIbiwxsAfNAWw9f/59IrtYspzvx7gJFyHT+WBr0 J82Q== 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=OzlvgX+vzoKG9kFQ3t7nTob1GcVIUZUb5mhb/Lw1pbk=; b=WYgVdt0LGQSubZb0uRkdRiGSF8U/1YiEnz7cHyaauodr63bS0ner5F7v64sJtp5AKc 6CbVNVL8kwGTzCiywt/FR8NYSAv4POetziVrjV+duSTB09gtaUc2VVJ6h/aJvOCoc/Rz 8sCOya6paj/fhMU2kKvzjT3vLtfO+mLJPbWfazNJ72Rg9MBnpAfKv8BQOC5Kkb87cFju HPLuv20LESyKsXHB3tEu9KdB8Q39xz20mXLNe9a9/o+5fKVa6le44kTMPia3/UlIaOUM aPuZMGWu2nd2rdirWPqapZM+/0var+H+/fSPcN7sVOYeRQXyZtO8Y7LupQvVhleqgBUz Gd5g== X-Gm-Message-State: AOAM532IqvytZIFWuhOPmVI2aRlDNbJ/tA0fcSHgzPixmXGzLz7KPibP 4txhLMwyevh8OI1UO6Ind/FelgNnOG/ORXLjkXOHJ94u71fi5g== X-Received: by 2002:a2e:8109:: with SMTP id d9mr37188ljg.495.1629139708138; Mon, 16 Aug 2021 11:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20210814235625.1780033-1-nathan@kernel.org> In-Reply-To: <20210814235625.1780033-1-nathan@kernel.org> From: Nick Desaulniers Date: Mon, 16 Aug 2021 11:48:16 -0700 Message-ID: Subject: Re: [PATCH] staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb() To: Nathan Chancellor Cc: Greg Kroah-Hartman , linux-staging@lists.linux.dev, 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-kernel@vger.kernel.org On Sat, Aug 14, 2021 at 4:58 PM Nathan Chancellor wrote: > > 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 Thanks for the patch! Reviewed-by: Nick Desaulniers > --- > 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 > -- Thanks, ~Nick Desaulniers