[lkml]   [2001]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: unsigned long ioremap()?

Abramo Bagnara writes:
> it's perfectly fine to have:
> regs = (struct reg *) ioremap(addr, size);
> foo = readl((unsigned long)&regs->bar);

I don't see how one can find this valid compared to my preference of
just plain readl(&regs->bar); You're telling me it's nicer to have the
butt ugly cast there which serves no purpose?

One could argue btw that structure offsets are less error prone to
code than register offset defines out the wazoo.

I think your argument here is bogus.

David S. Miller
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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