From: Liu Gang <Gang.Liu@freescale.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: r58472@freescale.com,
Paul Gortmaker <paul.gortmaker@windriver.com>,
linux-kernel@vger.kernel.org, r61911@freescale.com,
Alexandre.Bounine@idt.com, akpm@linux-foundation.org,
linuxppc-dev@lists.ozlabs.org,
Shaohui Xie <Shaohui.Xie@freescale.com>
Subject: Re: [PATCH] powerpc/srio: Fix the compile errors when building with 64bit
Date: Mon, 5 Mar 2012 22:20:22 +0800 [thread overview]
Message-ID: <1330957222.23420.136.camel@10.ap.freescale.net> (raw)
In-Reply-To: <6BFCD6C7-7675-4A99-9C4C-4E86FA5642A4@kernel.crashing.org>
Hi, Kumar,
On Fri, 2012-03-02 at 09:11 -0600, Kumar Gala wrote:
> > diff --git a/arch/powerpc/sysdev/fsl_rmu.c b/arch/powerpc/sysdev/fsl_rmu.c
> > index 1548578..468011e 100644
> > --- a/arch/powerpc/sysdev/fsl_rmu.c
> > +++ b/arch/powerpc/sysdev/fsl_rmu.c
> > @@ -311,8 +311,8 @@ fsl_rio_dbell_handler(int irq, void *dev_instance)
> >
> > /* XXX Need to check/dispatch until queue empty */
> > if (dsr & DOORBELL_DSR_DIQI) {
> > - u32 dmsg =
> > - (u32) fsl_dbell->dbell_ring.virt +
> > + unsigned long dmsg =
> > + (unsigned long) fsl_dbell->dbell_ring.virt +
> > (in_be32(&fsl_dbell->dbell_regs->dqdpar) & 0xfff);
> > struct rio_dbell *dbell;
> > int found = 0;
> > @@ -657,7 +657,8 @@ fsl_add_outb_message(struct rio_mport *mport, struct rio_dev *rdev, int mbox,
> > int ret = 0;
> >
> > pr_debug("RIO: fsl_add_outb_message(): destid %4.4x mbox %d buffer " \
> > - "%8.8x len %8.8x\n", rdev->destid, mbox, (int)buffer, len);
> > + "%8.8lx len %8.8zx\n", rdev->destid, mbox,
> > + (unsigned long)buffer, len);
> > if ((len < 8) || (len > RIO_MAX_MSG_SIZE)) {
> > ret = -EINVAL;
> > goto out;
>
> For this case it seems as if some cast should be added to DBELL_* macros
Do you mean the DBELL_* macro should be added the cast "u16" and like
this:
#define DBELL_SID(x) (u16)(*(u16 *)(x + DOORBELL_SID_OFFSET))
> > @@ -972,7 +973,7 @@ out:
> > void *fsl_get_inb_message(struct rio_mport *mport, int mbox)
> > {
> > struct fsl_rmu *rmu = GET_RMM_HANDLE(mport);
> > - u32 phys_buf, virt_buf;
> > + unsigned long phys_buf, virt_buf;
>
> Do you really want to change phys_buf to an 'unsigned long'?
>
> Should virt_buf really be void * here?
I think you are right, the phys_buf should not be changed to 'unsigned
long' and the virt_buf should be void *. I'll correct this in next
version.
> > @@ -982,7 +983,7 @@ void *fsl_get_inb_message(struct rio_mport *mport, int mbox)
>
> The memcpy later could remove a cast if you make virt_buf a void *.
Thanks a lot, will remove.
Best Regards,
Liu Gang
next prev parent reply other threads:[~2012-03-05 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 7:08 [PATCH] powerpc/srio: Fix the compile errors when building with 64bit Liu Gang
2012-03-02 9:57 ` David Laight
2012-03-02 14:30 ` Paul Gortmaker
2012-03-05 2:52 ` Liu Gang
2012-03-02 15:11 ` Kumar Gala
2012-03-05 14:20 ` Liu Gang [this message]
2012-03-06 17:46 ` Kumar Gala
2012-03-07 12:52 ` Liu Gang
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=1330957222.23420.136.camel@10.ap.freescale.net \
--to=gang.liu@freescale.com \
--cc=Alexandre.Bounine@idt.com \
--cc=Shaohui.Xie@freescale.com \
--cc=akpm@linux-foundation.org \
--cc=galak@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paul.gortmaker@windriver.com \
--cc=r58472@freescale.com \
--cc=r61911@freescale.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;
as well as URLs for NNTP newsgroup(s).