Skip to content

Commit

Permalink
net: mvpp2: debugfs: fix incorrect bitwise operator
Browse files Browse the repository at this point in the history
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: dba1d91 ("net: mvpp2: debugfs: add entries for classifier flows")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gustavo A. R. Silva authored and David S. Miller committed Jul 18, 2018
1 parent fa145d5 commit e146471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e146471

Please sign in to comment.