[U-Boot] [PATCH] at91_emac: fix compile warning

Reinhard Meyer u-boot at emk-elektronik.de
Thu Jun 9 14:06:51 CEST 2011


Dear Andreas Bießmann,
>>> +	writel( (netdev->enetaddr[0] | netdev->enetaddr[1] << 8 |
>>> +			netdev->enetaddr[2] << 16 | netdev->enetaddr[3] << 24),
>>> +			&emac->sa2l);
>>
>> OUCH, I would think by precedence rules, | comes before << !?!?!
> 
> You are wrong, try the following:

Yep, just checked the table ;) -
+ comes before <<, but << comes before |, hence the mixup :)

>> Already applied to u-boot-atmel/master,
> 
> But why do you apply the patch, if there are questions?

At first, the  << | seemed ok to me, so I applied ;)

Regards,
Reinhard


More information about the U-Boot mailing list