Re: [PATCH RESEND v2 2/2] scsi: 64-bit port of buslogic driver

From: James Bottomley
Date: Wed Jun 26 2013 - 21:34:47 EST


On Mon, 2013-06-24 at 14:26 -0600, Khalid Aziz wrote:
> @@ -5072,17 +5039,15 @@ static void FPT_busMstrSGDataXferStart(unsigned long p_port,
> * Description:
> *
> *---------------------------------------------------------------------*/
> -static void FPT_busMstrDataXferStart(unsigned long p_port,
> - struct sccb *pcurrSCCB)
> +static void FPT_busMstrDataXferStart(u32 p_port, struct sccb *pcurrSCCB)
> {
> - unsigned long addr, count;
> + u32 addr, count;
>
> if (!(pcurrSCCB->Sccb_XferState & F_AUTO_SENSE)) {
>
> count = pcurrSCCB->Sccb_XferCnt;
>
> - addr =
> - (unsigned long)pcurrSCCB->DataPointer + pcurrSCCB->Sccb_ATC;
> + addr = (u32)pcurrSCCB->DataPointer + pcurrSCCB->Sccb_ATC;

This is giving

In file included from drivers/scsi/BusLogic.c:57:0:
drivers/scsi/FlashPoint.c: In function âFPT_busMstrDataXferStartâ:
drivers/scsi/FlashPoint.c:5050:10: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]

to do this cast, you need first to cast to unsigned long and then
truncate the long with u32. I fixed it up.

James


--
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/