Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13b6d2e6 authored by Nickolai Zeldovich's avatar Nickolai Zeldovich Committed by David S. Miller
Browse files

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: default avatarNickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent be05e45a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -432,7 +432,7 @@ static int tc574_config(struct pcmcia_device *link)
	netdev_info(dev, "%s at io %#3lx, irq %d, hw_addr %pM\n",
	netdev_info(dev, "%s at io %#3lx, irq %d, hw_addr %pM\n",
		    cardname, dev->base_addr, dev->irq, dev->dev_addr);
		    cardname, dev->base_addr, dev->irq, dev->dev_addr);
	netdev_info(dev, " %dK FIFO split %s Rx:Tx, %sMII interface.\n",
	netdev_info(dev, " %dK FIFO split %s Rx:Tx, %sMII interface.\n",
		    8 << config & Ram_size,
		    8 << (config & Ram_size),
		    ram_split[(config & Ram_split) >> Ram_split_shift],
		    ram_split[(config & Ram_split) >> Ram_split_shift],
		    config & Autoselect ? "autoselect " : "");
		    config & Autoselect ? "autoselect " : "");