Re: [PATCH] powerpc/srio: Fix the compile errors when building with 64bit

From: Kumar Gala
Date: Tue Mar 06 2012 - 12:46:49 EST



On Mar 5, 2012, at 8:20 AM, Liu Gang wrote:

> 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);

How about a struct instead:

struct rmu_dmsg {
u16 dummy;
u16 tid;
u16 sid;
u16 info;
};

struct rmu_dmsg *dmsg = fsl_dbell->dbell_ring.virt + (in_be32(&fsl_dbell->dbell_regs->dqdpar) & 0xfff);

Than you can git rid of the DBELL_* macros.


- k

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/