Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762403AbXHPSkb (ORCPT ); Thu, 16 Aug 2007 14:40:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755435AbXHPSkT (ORCPT ); Thu, 16 Aug 2007 14:40:19 -0400 Received: from srv5.dvmed.net ([207.36.208.214]:52069 "EHLO mail.dvmed.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755374AbXHPSkR (ORCPT ); Thu, 16 Aug 2007 14:40:17 -0400 Message-ID: <46C49A0D.5080002@garzik.org> Date: Thu, 16 Aug 2007 14:40:13 -0400 From: Jeff Garzik User-Agent: Thunderbird 1.5.0.12 (X11/20070719) MIME-Version: 1.0 To: Mike Frysinger CC: Sonic Zhang , Linux IDE , Linux Kernel , Bryan Wu Subject: Re: [PATCH take #5] [libata] libata driver for bf548 on chip ATAPI controller. References: <1187169256.31383.3.camel@sevens.analog.com> <46C3F6FB.2070909@garzik.org> <8bd0f97a0708160927s625fd5ax84cd6d12a693d9ad@mail.gmail.com> In-Reply-To: <8bd0f97a0708160927s625fd5ax84cd6d12a693d9ad@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.3 (----) X-Spam-Report: SpamAssassin version 3.1.9 on srv5.dvmed.net summary: Content analysis details: (-4.3 points, 5.0 required) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1256 Lines: 36 Mike Frysinger wrote: > On 8/16/07, Jeff Garzik wrote: >> Sonic Zhang wrote: >>> +static void bfin_set_piomode(struct ata_port *ap, struct ata_device *adev) >>> +{ >>> + int mode = adev->pio_mode - XFER_PIO_0; >>> + unsigned long base = (unsigned long)ap->ioaddr.ctl_addr; >> >> (added Bryan Wu to CC) >> >> Someone needs to need fix the bfin architecture: the addresses on the >> bfin_read/bfin_write functions should be 'void __iomem *' not unsigned long. > > there are no address pointers anymore, so there is nothing to cast ... > the bfin_read/bfin_write macros are done in sexy asm: > #define bfin_write8(addr,val) __asm__ __volatile__("b[%0] = %1;" :: > "a"(addr), "d"(val)) > or i'm misunderstanding what you mean ... > > where do you see (unsigned long) ? Look up (into the message you quoted). Regardless of the implementation, the C type system should be employed to ensure that 'addr' is known to the compiler as 'void __iomem *' rather than unsigned long. Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/