[linux-dvb] [PATCH]: second attempt to fix 64-bit warning in saa7146_hlp.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 19 December 2005 12:24, Johannes Stezenbach wrote:
> On Mon, Dec 19, 2005, Hans Verkuil wrote:
> > OK, after receiving some comments about my fix in saa7146_hlp.c I'm
> > submitting it again (and this time to the list first, my apologies
> > for not doing that before) and this time with the comment I should
> > have added in the first place.
> >
> > I didn't just hide a warning, I actually thought about it :-)
>
> ;-)
>
> > +	/* The base pointer is a 32-bit pointer into DMA memory.
> > +	   The unsigned long cast is to remove a 64-bit compile warning
> > since +	   it looks like a 64-bit address is cast to a 32-bit
> > value. */ +	u32 base = (u32)(unsigned long)vv->ov_fb.base;
>
> For me at least, this needs more explanation. Why are these pointers
> 32bit even on a 64bit machine?
>
> If they are PCI addresses, then I believe there are machines who have
> the bus not mapped at address zero but at some offset, so you need
> 64 bits to represent a 32bit PCI address. (Also, shouldn't this be
> dma_addr_t in this case? What type does vv->ov_fb.base have?)
>
> If if is just an offset then the name is wrong.
>
> Will this value be set in a 32bit chip register?


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux