RE: [PATCH] pm80xx: Fix for 32 bit compilation issue.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James,

Thanks for the suggestion. This looks better. Will submit an updated
patch.

Regards
Anand

-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@xxxxxxxxxxxxxxxxxxxxx] 
Sent: Wednesday, August 07, 2013 11:35 PM
To: Anand Kumar Santhanam
Cc: linux-scsi@xxxxxxxxxxxxxxx; Sangeetha Gnanasekaran;
xjtuwjp@xxxxxxxxx; Rich Bono; Nikith Ganigarakoppal
Subject: Re: [PATCH] pm80xx: Fix for 32 bit compilation issue.

On Wed, 2013-08-07 at 00:51 -0700, Anand wrote:
> >From cc606631fae60a38ab9532bab79fd93523f4c579 Mon Sep 17 00:00:00 
> >2001
> From: Anand Kumar Santhanam <AnandKumar.Santhanam@xxxxxxxx>
> Date: Mon, 5 Aug 2013 14:16:52 +0530
> Subject: [PATCH] pm80xx: Fix for 32 bit compilation issue.
> 
> pm80xx driver does not compile under 32 bit linux. This patch fixes 
> the same.

It doesn't?  I see one warning:

drivers/scsi/pm8001/pm8001_init.c:424:4: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]

Which is actually one of these annoying gcc isms, since casting a
pointer to an unsigned long long for the purposes of printing is
perfectly fine.  The usual way of squashing this is the below.

James

---

diff --git a/drivers/scsi/pm8001/pm8001_init.c
b/drivers/scsi/pm8001/pm8001_init.c
index 3861aa1..4ba8f4d 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -424,7 +424,7 @@ static int pm8001_ioremap(struct pm8001_hba_info
*pm8001_ha)
 			PM8001_INIT_DBG(pm8001_ha, pm8001_printk(
 				"base addr %llx virt_addr=%llx
len=%d\n",
 
(u64)pm8001_ha->io_mem[logicalBar].membase,
-
(u64)pm8001_ha->io_mem[logicalBar].memvirtaddr,
+				(u64)(unsigned
long)pm8001_ha->io_mem[logicalBar].memvirtaddr,
 				pm8001_ha->io_mem[logicalBar].memsize));
 		} else {
 			pm8001_ha->io_mem[logicalBar].membase	= 0;


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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux