Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp510893imm; Wed, 18 Jul 2018 06:11:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe7/DhN6fDuKn2Hohhd5yFtHY59LLo2QRIsN8QW8y9xvebqjxg3KJdmDkuO3NnSNMkEb5SX X-Received: by 2002:a17:902:1566:: with SMTP id b35-v6mr5917498plh.107.1531919470897; Wed, 18 Jul 2018 06:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531919470; cv=none; d=google.com; s=arc-20160816; b=G67HJAGAREAKNhLpPtJ72nJHVzIvsDPxI4Od7xIoowMc6ynZYM+7/rd2xqsusc4Xuq Xol+YDuO6+NAs79ptWvigxzTz7UMO2ull6lU24eYe3UlxZYIHxtmfJJbfuL5HqtX9u4n vV4PxI0c1suV+1dj8iOIFnKEifC6qLcdOKKC3gtSwH/SxmKvgR+pRDE0TkVcuRh5qhD4 K2h5umn14J1pMQpBwd4kzIjYQjiBT2hUMWAtmY93aU5t4j+hjySbWvDeeTvGg+IbpiQf e2VBa7ibmtdmiJZ3UEtQzVpZcx9AT6mvSqpzOJyW9ymJrYw5BNZgnjBfoKyaKfnKDY6s 3QEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=AJH0qLuH0rirEiYw7lNTlV6i5Qk+7f6XXf5cDX3xAqQ=; b=kEQ4cM6K2yv8c0r7HtaXK85MDDxQu42FqKgvZUI6CmIzIrlUOwR+rFXkNDQVfpor7J 5FPxz0Cswp19CZcYzH0ZUKjpLiFhXDAjYq464d2w9hAs4LOfcOcVDaFz2dxEEKK/i2Tt ZtEobqUbAJjuTys9C1y8OqO4xSTPoyF4pEpBCcHisq6okWVPu8lN+1gFwR2+U13USY/4 O6oSjTc59oWQxOT0DEwo81qZK7ii4JpCmifDbnLCNAPtdRzyjHkwZznG3llkLTnDOYpT okQ0QY6tArbgB/G3IFSr5cSZmel2yHXya+Zg6XYKIBkx5ZP9qJ9xTwYLpSjvUQ7shimC BkrQ== ARC-Authentication-Results: i=1; mx.google.com; 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 u22-v6si1161256pfh.184.2018.07.18.06.10.55; Wed, 18 Jul 2018 06:11:10 -0700 (PDT) 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; 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 S1731069AbeGRNr0 (ORCPT + 99 others); Wed, 18 Jul 2018 09:47:26 -0400 Received: from gateway34.websitewelcome.com ([192.185.149.101]:49353 "EHLO gateway34.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727087AbeGRNr0 (ORCPT ); Wed, 18 Jul 2018 09:47:26 -0400 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 8B7FEA9D70 for ; Wed, 18 Jul 2018 08:08:48 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id fmCGfgbTYaSeyfmCGfIVwV; Wed, 18 Jul 2018 08:08:48 -0500 X-Authority-Reason: nr=8 Received: from [189.250.65.56] (port=42378 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1ffmCG-000K8A-1R; Wed, 18 Jul 2018 08:08:48 -0500 Date: Wed, 18 Jul 2018 08:08:46 -0500 From: "Gustavo A. R. Silva" To: Maxime Chevallier , "David S. Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] net: mvpp2: debugfs: fix incorrect bitwise operator Message-ID: <20180718130846.GA5380@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.65.56 X-Source-L: No X-Exim-ID: 1ffmCG-000K8A-1R X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.65.56]:42378 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 4 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The use of the | operator always leads to true, which looks rather suspect in this case. Fix this by using & instead. Addresses-Coverity-ID: 1471903 ("Wrong operator used") Fixes: dba1d918da02 ("net: mvpp2: debugfs: add entries for classifier flows") Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c index 02dfef1..f9744a6 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c @@ -245,7 +245,7 @@ static int mvpp2_dbgfs_flow_c2_enable_show(struct seq_file *s, void *unused) mvpp2_cls_c2_read(port->priv, MVPP22_CLS_C2_RSS_ENTRY(port->id), &c2); - enabled = !!(c2.attr[2] | MVPP22_CLS_C2_ATTR2_RSS_EN); + enabled = !!(c2.attr[2] & MVPP22_CLS_C2_ATTR2_RSS_EN); seq_printf(s, "%d\n", enabled); -- 2.7.4