]> git.baikalelectronics.ru Git - kernel.git/commit
3c574_cs: fix operator precedence between << and &
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Thu, 17 Jan 2013 07:18:29 +0000 (07:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jan 2013 20:04:30 +0000 (15:04 -0500)
commitaa6f539910662d46efde6e34e7909ce4eb3cf2e5
treeaf193686297ae611a69c5166a24ebc3f0c5a0d8d
parent150b78ce8d4002f7cc93c4fa9366b33eabcdabb3
3c574_cs: fix operator precedence between << and &

The code to print the FIFO size in tc574_config computes it as:

  8 << config & Ram_size

which evaluates the '<<' first, but the actual intent is to evaluate the
'&' first.  Add parentheses to enforce desired evaluation order.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/3com/3c574_cs.c