Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2715303imj; Mon, 11 Feb 2019 07:24:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IaWuMakEiHOlBhZILwO2oCZ6B/09Hy/S/bY8ZHZPzgTWNaNmgHf1KNMh2G8PSPMeJa2YlMU X-Received: by 2002:a63:61d8:: with SMTP id v207mr9308374pgb.308.1549898674798; Mon, 11 Feb 2019 07:24:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549898674; cv=none; d=google.com; s=arc-20160816; b=S5ELipWWnC9O7A30bmvZMIyt2/zWmeptL9F5KFLvY8OpIaLbd/iaQ7QO+nykCnKrD/ /JyvEXfLhjfUS5HLfWAE5YZZ1zowZjK6PmDM0Y6KLvXNCmyELrC9BTdZ14n64hgL6IhP SS7tgXMBJFk1+BNuyOPU+EMC74nznqndW2OdjO9h0Aii7X00A9833PgRz7RkYDWPgd5B SEEjlbUv9JCl2BdyTYTXPqfXfzYxW1lKl1eYDfFn1QctCQDkhDSvjj3QhDlL71PV5BbC KmaV6fWLqEci8K+ibQSgHKhsyU6p6hOBSpu31C+tZ25C7kL1gBEtEzPrFOWnPuHWc1Pv q4lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LR8KrVPOK9DsHE9ihWAsmEEfQlgzO5fViJ4WiilujB0=; b=icyEwhc5I7iU6e98iqppTgHMQQorqJH9BuPJhN8YQfPFXQGXYyByX81V/SXYZQOgOx g/dC3k4PZARokbUk1Mdf/aJcXkfVzvgodnw/BvI/w1ivhsKXcaTA1cjFg6LQkQRL8yEd t7IXToUHuJ2hI+GDgX29bb7QX/U3CKBfvDu5IOn05mHSzqvxtPlG+uMavjXO/0RZ/2Tp POLDG03XiAaNwJpAgZaJ3viOvbzLIU2P5leIt/TlTHHcnBmDSayrUy1A5Wa6Z41bdzdE IfPyt9B5uQhJmW+MlwzKDBk0yrdeSNuLD7xK/H451XmKIE3laZVNONRPPeX1wUPkNsBk qtjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zNVwNvji; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s139si9843486pgs.45.2019.02.11.07.24.19; Mon, 11 Feb 2019 07:24:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zNVwNvji; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390243AbfBKPEQ (ORCPT + 99 others); Mon, 11 Feb 2019 10:04:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:53158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389995AbfBKPEO (ORCPT ); Mon, 11 Feb 2019 10:04:14 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E0615222A7; Mon, 11 Feb 2019 15:04:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897453; bh=PgJ0NIXdBHDgY2kD0hLp5gMNWzTDwWEaS18RGNwr45E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zNVwNvjikWN6frV1UFWYi9ZR4q0WWqR+70vXWQpp51zaww6Zy42iMuYKCqTsUMXVP XT2tu6FODJI1H3/hnjA7Ge01UxZULbenpOKxtRB/4jttNLAyTrL8JDVcpO6gUE75pB WlbOJXH/sguTIw2EjL7DmZ/GCjKx03BAinZWNlaY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Gustavo A. R. Silva" , Felipe Balbi Subject: [PATCH 4.14 187/205] usb: gadget: udc: net2272: Fix bitwise and boolean operations Date: Mon, 11 Feb 2019 15:19:45 +0100 Message-Id: <20190211141840.636244713@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gustavo A. R. Silva commit 07c69f1148da7de3978686d3af9263325d9d60bd upstream. (!x & y) strikes again. Fix bitwise and boolean operations by enclosing the expression: intcsr & (1 << NET2272_PCI_IRQ) in parentheses, before applying the boolean operator '!'. Notice that this code has been there since 2011. So, it would be helpful if someone can double-check this. This issue was detected with the help of Coccinelle. Fixes: ceb80363b2ec ("USB: net2272: driver for PLX NET2272 USB device controller") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/udc/net2272.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c @@ -2096,7 +2096,7 @@ static irqreturn_t net2272_irq(int irq, #if defined(PLX_PCI_RDK2) /* see if PCI int for us by checking irqstat */ intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT); - if (!intcsr & (1 << NET2272_PCI_IRQ)) { + if (!(intcsr & (1 << NET2272_PCI_IRQ))) { spin_unlock(&dev->lock); return IRQ_NONE; }