[U-Boot] [PATCH] net: ftmac100: remove unncessary volatiles
Po-Yu Chuang
ratbert.chuang at gmail.com
Fri Jan 21 07:26:23 CET 2011
Hi Sergei,
On Thu, Jan 20, 2011 at 11:38 PM, Sergei Shtylyov <sshtylyov at mvista.com> wrote:
> Hello.
>
> Po-Yu Chuang wrote:
>
>> From: Po-Yu Chuang <ratbert at faraday-tech.com>
>
>> This patch also update get_timer() usage.
>
> This seems like a material for a separate patch.
OK, I will split this to 2 patches later.
> [...]
>>
>> @@ -219,14 +219,12 @@ ftmac100_send (struct eth_device *dev, volatile void
>> *packet, int length)
>> curr_des->txdes0 = FTMAC100_TXDES0_TXDMA_OWN;
>> /* start transmit */
>> -
>> writel (1, &ftmac100->txpd);
>> /* wait for transfer to succeed */
>> -
>> - tmo = get_timer (0) + 5 * CONFIG_SYS_HZ;
>> + start = get_timer (0);
>> while (curr_des->txdes0 & FTMAC100_TXDES0_TXDMA_OWN) {
>> - if (get_timer (0) >= tmo) {
>> + if (get_timer (start) >= 5) {
>
> I'm not sure this is equivalent to the old code...
The original code waits unnecessarily long. This change refers to the way
the newer driver does - drivers/net/ftgmac100.c.
>> debug ("%s(): timed out\n", __func__);
>> return -1;
>> }
>
> checkpatch.pl says:
>
> WARNING: space prohibited between function name and open parenthesis '('
> #66: FILE: drivers/net/ftmac100.c:225:
> + start = get_timer (0);
>
> WARNING: space prohibited between function name and open parenthesis '('
> #69: FILE: drivers/net/ftmac100.c:227:
> + if (get_timer (start) >= 5) {
>
> I know you're only modifying the existing code, but it's time to fix the
> style of it as well...
OK, I'll fix it.
Thanks,
Po-Yu Chuang
More information about the U-Boot
mailing list