[U-Boot] [PATCH] e1000: fix compile warning

Wolfgang Denk wd at denx.de
Mon Nov 22 11:07:48 CET 2010


Dear Albert ARIBAUD,

In message <4CEA3A7B.1070602 at free.fr> you wrote:
> Le 22/11/2010 09:48, Wolfgang Denk a écrit :
> 
> > -	txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, packet));
> > +	txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, nv_packet));
> 
> Wouldn't type-casting packet right here work? e.g.:
> 
> txp->buffer_addr = cpu_to_le64(virt_to_bus(hw->pdev, ((void*)packet)));

No, it doesn't. The virt_to_bus() macro already has such a
cast internally, but it doesn't work here.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Alan Turing thought about criteria to settle the question of  whether
machines  can think, a question of which we now know that it is about
as relevant as the question of whether submarines can swim.
                                                   -- Edsger Dijkstra


More information about the U-Boot mailing list