lkml.org 
[lkml]   [2000]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] isa_{read,write}{w,l} fixed
Date
Peter Denison writes:
> Can we all agree that the following is at least _acceptable_?
>
> e.g.
> struct rx_desc {
> s32 base;
> s16 buf_len;
> s16 msg_len;
> } __attribute__((packed));
> ...
> struct rx_desc * rx_ring = ioremap(0xC0000, size_of_ring);
> ...
> writel(value, &rx_ring[i].base);
> writew(value, &rx_ring[i].buf_len);
> ...
> iounmap(rx_ring);

That is questionable, but acceptable, since you are referring to a *defined
structure* which has types. This structure is defined by the data sheet.
Device registers are described as offsets from a base, and should never have
an apparant structure.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |

-
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:56    [W:1.658 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site