lkml.org 
[lkml]   [1999]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: le32_to_cpu() help...
Date
On Tue, 02 Nov 1999, Jes Sorensen wrote:
> >>>>> "dony" == dony <dony.he@huawei.com.cn> writes:
>
> dony> Hi,
>
> dony> What role does le32_to_cpu() or cpu_to_le32() play in
> dony> kernel? Why do we need these two functions? They seem to
> dony> translate a value from big-endian to little-endian or vice
> dony> versa, but I don't know why we need do this. Thanks.
>
> They translate data to little endian from big endian on big endian
> CPUs, on little endian CPUs like the x86 they are noops. We need these
> because some hardware and other things like file systems wants data in
> little endian order no matter what type of system you are running on.
>

Then when do we use le32_to_cpu( ) , and when do we use cpu_to_le32( )?


--
####################################
Linux is more powerful than windows
dony.he@huawei.com.cn
####################################

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.161 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site