From: Nickolai Zeldovich Date: Thu, 17 Jan 2013 07:18:29 +0000 (+0000) Subject: 3c574_cs: fix operator precedence between << and & X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13b6d2e6c25dd33f94873b771ad7de3550da5125;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/3com/3c574_cs.c b/drivers/net/ethernet/3com/3c574_cs.c index 66df93638085..ffd8de28a76a 100644 --- a/drivers/net/ethernet/3com/3c574_cs.c +++ b/drivers/net/ethernet/3com/3c574_cs.c @@ -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", cardname, dev->base_addr, dev->irq, dev->dev_addr); 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], config & Autoselect ? "autoselect " : "");