From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77185C352AA for ; Wed, 2 Oct 2019 13:44:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4608421D7B for ; Wed, 2 Oct 2019 13:44:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hYqzIVrH"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="m7+YUN6M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4608421D7B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dPKIBINsaTMvI5t9SBcZavX15nMQ6Xq6lMsoVVKy7tQ=; b=hYqzIVrHm6szfk yqEIPJimBCmGUJM689X2qyQZLbzOly2PuLbeyusISF4HbVCVwq0DZGDBvdJHG6/Q9lS0Ntxi5ohes avYVTcRqSsBp5kirpXjOD26GtMWMdDu3xqv99D6RkSK+EK3YMTmFWQn1CBwMkhV4qYbI3YoUVe1gT zmMiOgKhgwPTZeADwNKzYmCUiNZJtUQUc/CCYOX899r1ItBpdXV4Pbn0diYqdMzCI7cQiUdwBQKp1 4k0PLhN5si/rLBMhNouqb4KFQF7k3Fz92f97vuiLy/oXGzv+2wahIFiSNnYYRhhjdWO+jlCIwJfm5 KoxLVhdwA5Udlz7ax9pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFevO-0004nG-T6; Wed, 02 Oct 2019 13:44:14 +0000 Received: from userp2130.oracle.com ([156.151.31.86]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFevL-0004ms-Q5 for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2019 13:44:13 +0000 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x92Dhxsp055767; Wed, 2 Oct 2019 13:44:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=BaJ95um3KKSqNF7ksQIDUZ17nwsj4pbKXWWuet88V/4=; b=m7+YUN6Me/CDdeG4Fykh8l7bhBM07SQgUfoVn8ODAlI3+90o14CiGc7E2YjTcHhvQJsg EMAcdOEPtfameewP7QjmgW1g023ncU8mMZfQq6x7KdSqzh2L5vtVtYm48QHCUyfYcOOQ nogUAijf9MdDKZfohhi6xg36L66hwwwtkuykqjJKPaJgPgTLvEcGoMgIpEoE9Cv3unyQ zNxjiN4hq8v/zdI9uJUKy8+zw3fnIgA8hXDlBU26Y3Its8UCHL+ecf1c4jeaEOmcxleE qmQz0qFgpH/1wGz0+te7GcfJDno4GDCKj1ahqweigMuHMlRQ3ECrGgDvKVEGI67wl8Mx sg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2v9xxuw28t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Oct 2019 13:44:07 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x92Dhtrv037305; Wed, 2 Oct 2019 13:44:06 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2vbsm3vjfe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 02 Oct 2019 13:44:06 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x92Dglas017501; Wed, 2 Oct 2019 13:42:47 GMT Received: from kadam (/41.57.98.10) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 02 Oct 2019 06:42:46 -0700 Date: Wed, 2 Oct 2019 16:42:38 +0300 From: Dan Carpenter To: Colin King Subject: Re: [PATCH] net: stmmac: xgmac: add missing parentheses to fix precendence error Message-ID: <20191002134238.GP29696@kadam> References: <20191002110849.13405-1-colin.king@canonical.com> <20191002133356.GP22609@kadam> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191002133356.GP22609@kadam> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9397 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910020132 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9397 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910020132 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191002_064411_978608_893BFE0F X-CRM114-Status: GOOD ( 20.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Torgue , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Jose Abreu , Maxime Coquelin , Giuseppe Cavallaro , "David S . Miller" , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 02, 2019 at 04:33:57PM +0300, Dan Carpenter wrote: > On Wed, Oct 02, 2019 at 12:08:49PM +0100, Colin King wrote: > > From: Colin Ian King > > > > The expression !(hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10 is always zero, so > > the masking operation is incorrect. Fix this by adding the missing > > parentheses to correctly bind the negate operator on the entire expression. > > > > Addresses-Coverity: ("Operands don't affect result") > > Fixes: c2b69474d63b ("net: stmmac: xgmac: Correct RAVSEL field interpretation") > > Signed-off-by: Colin Ian King > > --- > > drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c > > index 965cbe3e6f51..2e814aa64a5c 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c > > @@ -369,7 +369,7 @@ static void dwxgmac2_get_hw_feature(void __iomem *ioaddr, > > dma_cap->eee = (hw_cap & XGMAC_HWFEAT_EEESEL) >> 13; > > dma_cap->atime_stamp = (hw_cap & XGMAC_HWFEAT_TSSEL) >> 12; > > dma_cap->av = (hw_cap & XGMAC_HWFEAT_AVSEL) >> 11; > > - dma_cap->av &= !(hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10; > > + dma_cap->av &= !((hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10); > > There is no point to the shift at all. Sorry I meant to say it should be a bitwise NOT, right? I was just looking at some other dma_cap stuff that did this same thing... I can't find it now... regards, dan carpenter _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel