lkml.org 
[lkml]   [2011]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] net: add Faraday FTMAC100 10/100 Ethernet driver
Dear Michał ,

2011/1/21 Michał Mirosław <mirqus@gmail.com>:
> 2011/1/20 Po-Yu Chuang <ratbert.chuang@gmail.com>:
> [...]
>> +/******************************************************************************
>> + * internal functions (receive descriptor)
>> + *****************************************************************************/
>> +static bool ftmac100_rxdes_first_segment(struct ftmac100_rxdes *rxdes)
>> +{
>> +       return le32_to_cpu(rxdes->rxdes0) & FTMAC100_RXDES0_FRS;
>> +}
>> +
>> +static bool ftmac100_rxdes_last_segment(struct ftmac100_rxdes *rxdes)
>> +{
>> +       return le32_to_cpu(rxdes->rxdes0) & FTMAC100_RXDES0_LRS;
>> +}
>> +
> [...]
>
> You can change these and similar functions to use:
>
> rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_LRS)
>
> This will be subject to constant folding by compiler and produce
> better code for big-endian arches.

Fixed. It looks much better now.
Thanks a lot.

best regards,
Po-Yu Chuang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-01-21 04:41    [W:0.234 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site