Commit e146471f authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by David S. Miller

net: mvpp2: debugfs: fix incorrect bitwise operator

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: dba1d918 ("net: mvpp2: debugfs: add entries for classifier flows")
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa145d5d
...@@ -245,7 +245,7 @@ static int mvpp2_dbgfs_flow_c2_enable_show(struct seq_file *s, void *unused) ...@@ -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); 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); seq_printf(s, "%d\n", enabled);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment