[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1292249768.1673.6.camel@leonhard>
Date: Mon, 13 Dec 2010 23:16:08 +0900
From: Namhyung Kim <namhyung@...il.com>
To: Jiri Slaby <jirislaby@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...e.de>,
Martyn Welch <martyn.welch@...com>,
"'devel@...verdev.osuosl.org'" <devel@...verdev.osuosl.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/8] Staging: vme_ca91cx42: fix compiler warning on
64-bit build
2010-12-13 (월), 14:50 +0100, Jiri Slaby:
> On 12/13/2010 02:16 PM, Namhyung Kim wrote:
> > @@ -867,13 +869,13 @@ ssize_t ca91cx42_master_read(struct vme_master_resource *image, void *buf,
> > * maximal configured data cycle is used and splits it
> > * automatically for non-aligned addresses.
> > */
> > - if ((int)addr & 0x1) {
> > + if (check_aligned(addr, 0x1)) {
> > *(u8 *)buf = ioread8(addr);
> > done += 1;
> > if (done == count)
> > goto out;
> > }
> > - if ((int)addr & 0x2) {
> > + if (check_aligned(addr, 0x2)) {
>
> It should be IS_ALIGNED(addr, 2) and IS_ALIGNED(addr, 4) respectively
> anyway...
>
That's what I was looking for, thanks. :)
> > @@ -980,7 +982,7 @@ unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
> > /* Lock image */
> > spin_lock(&(image->lock));
> >
> > - pci_addr = (u32)image->kern_base + offset;
> > + pci_addr = (u32)(unsigned long)image->kern_base + offset;
>
> No, do not hide bugs here. I see no reason why address returned from
> ioremap couldn't be larger than 32 bits. Actually it is always on 64bit.
>
> Actually what this code tries to do? Shouldn't it be physical address of
> the PCI resource instead?
>
> regards,
Sounds reasonable.
--
Regards,
Namhyung Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists