From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 22 Nov 2010 11:07:48 +0100 Subject: [U-Boot] [PATCH] e1000: fix compile warning In-Reply-To: <4CEA3A7B.1070602@free.fr> References: <1290415725-12361-1-git-send-email-wd@denx.de> <4CEA3A7B.1070602@free.fr> Message-ID: <20101122100748.39E65B191@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Albert ARIBAUD, In message <4CEA3A7B.1070602@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