Re: unsigned long ioremap()?

David S. Miller
2001-05-04T07:30:49Z

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.

Later,
David S. Miller
davem@redhat.com