Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2661104imj; Mon, 11 Feb 2019 06:38:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IY8kQ48Lcci0vG+axWS0I8avAH/j+/rfKQ0Lr7kVTjcaGPqd2Ckf8N2L7A/T8P28GwIzLV8 X-Received: by 2002:a17:902:bf0c:: with SMTP id bi12mr38227668plb.0.1549895886458; Mon, 11 Feb 2019 06:38:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895886; cv=none; d=google.com; s=arc-20160816; b=wHA7Q+KzpsSeyUesiFnfvu9mRAxSUpSp9Erx3XarSD0vuomOoNWaGBMa1MvaSfsz4Y /diZn3udSCF4XKXxNP3AA28AxyHzzayF7EIfvCF8U7JEWPCyevRKC4DIZyKYVs0ibGJ1 h7BLtgYy0pjUpHdv0cziMufU7xNObYY8foOKRLurvFlKXYacWedB2te91hbVN9oFCkXO bIB4YftiRC65J7XHJhghMuAQZ2HMH31EkH6WCMFVU9hyH1+kfD7IkDDNBsXSw+XIP+Ua 1YX2528EXPlS5rQV+k5Nh5ANrkVEWr787uDRezTv4ClpF1PZ1B8qdcVhXN/Bt+qZ3Jjb xvog== 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=RM+v6npy0ljMCpfgYw+mlbc1lnECycudwdmuEGjUiF4=; b=cERFu0sP7mm2YwB82O3MKE58rDIS2Itzh9dx9Zh32OXhZxl7bMnjBOIiBBskxJ6DS3 mjQTjAwR42SlaAo2UFKQKTewF9rUB7PBiNySILjKr4zZmlI7nB9w0vJUfO8Iwuh61PFR 7FqR5Q3qjGmmd+rKNST2IkxTnxx2zmvhyuWbRFM00bBnOkef0np8MWV+wsKt72B3OMhh OVvlvxME4VwCk81Cxh8DoQzFfMRJRRcyY4Nq2NaF/FmX/eof4en/UipLGW/Ykw4iyzL2 +HgJ5UyZ4AzNr0KkR2QJtoQPFn3z8MdlB+y/tXa5CQfevZx+kGdoPmDug9NTGP7XRw/C lVcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EPSvIfwG; 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 p4si10293328pls.45.2019.02.11.06.37.50; Mon, 11 Feb 2019 06:38:06 -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=EPSvIfwG; 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 S1731374AbfBKOhA (ORCPT + 99 others); Mon, 11 Feb 2019 09:37:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:46274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731359AbfBKOg7 (ORCPT ); Mon, 11 Feb 2019 09:36:59 -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 0094B20700; Mon, 11 Feb 2019 14:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895818; bh=QTvu3gUAwpeqpFtsPbxDWqgeLMLj4rYqcz1o32CC8Tc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EPSvIfwGfwytcCMqb/SGms0BMt6UyUolZ0sea7y9sYCsuAgG2zbw9y4gBTi4ed8QA RxLb3NddPur/dvQY/EaocanpQSlYu3me+3WNXn2AM311jfYSkVuKkGsvqaQdUjkZu9 wXmmjwvlMJjyTbfYacSsJ8wBV4Zi2jA395jUGE5o= 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.20 333/352] usb: gadget: udc: net2272: Fix bitwise and boolean operations Date: Mon, 11 Feb 2019 15:19:20 +0100 Message-Id: <20190211141908.151766078@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@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.20-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 @@ -2083,7 +2083,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; }