From: Namhyung Kim <namhyung@gmail.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Martyn Welch <martyn.welch@ge.com>,
"'devel@driverdev.osuosl.org'" <devel@driverdev.osuosl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/8] Staging: vme_ca91cx42: fix compiler warning on 64-bit build
Date: Mon, 13 Dec 2010 23:16:08 +0900 [thread overview]
Message-ID: <1292249768.1673.6.camel@leonhard> (raw)
In-Reply-To: <4D06248C.7010904@gmail.com>
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
prev parent reply other threads:[~2010-12-13 14:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-13 13:16 [PATCH 1/8] Staging: vme_ca91cx42: fix compiler warning on 64-bit build Namhyung Kim
2010-12-13 13:16 ` [PATCH 2/8] Staging: vme_bridge: mark vme_master_resource->kern_base as __iomem Namhyung Kim
2010-12-13 18:36 ` Greg KH
2010-12-14 4:52 ` Namhyung Kim
2010-12-14 9:15 ` Martyn Welch
2010-12-13 13:16 ` [PATCH 3/8] Staging: vme_ca91cx42: mark ca91cx42_driver->base " Namhyung Kim
2010-12-13 13:16 ` [PATCH 4/8] Staging: vme_ca91cx42: remove unreachable code Namhyung Kim
2010-12-13 13:16 ` [PATCH 5/8] Staging: vme_ca91cx42: make functions static Namhyung Kim
2010-12-13 13:16 ` [PATCH 6/8] Staging: vme_tsi148: mark tsi148_driver->base as __iomem Namhyung Kim
2010-12-13 13:16 ` [PATCH 7/8] Staging: vme_tsi148: remove unreachable code Namhyung Kim
2010-12-13 13:16 ` [PATCH 8/8] Staging: vme_tsi148: make functions static Namhyung Kim
2010-12-13 13:50 ` [PATCH 1/8] Staging: vme_ca91cx42: fix compiler warning on 64-bit build Jiri Slaby
2010-12-13 14:16 ` Namhyung Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1292249768.1673.6.camel@leonhard \
--to=namhyung@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martyn.welch@ge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox