Re: [patch 07/25] scsi: cover up bugs^W^W^WFix up compiler warnings in megaraid driver

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

 



On Wed, 2007-05-23 at 15:54 -0700, Martin Bligh wrote:
> James Bottomley wrote:
> > On Wed, 2007-05-23 at 14:41 -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> >> From: Martin Bligh <mbligh@xxxxxxxxxx>
> >>
> >> Fix up compiler warnings in megaraid driver
> >>
> >> [akpm@xxxxxxxx: build fix]
> >> Signed-off-by: Martin J. Bligh <mbligh@xxxxxxxxxx>
> >> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
> >> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> >> ---
> >>
> >>  drivers/scsi/megaraid.c |   22 +++++++++++++---------
> >>  1 files changed, 13 insertions(+), 9 deletions(-)
> >>
> >> diff -puN drivers/scsi/megaraid.c~scsi-cover-up-bugs-fix-up-compiler-warnings-in-megaraid-driver drivers/scsi/megaraid.c
> >> --- a/drivers/scsi/megaraid.c~scsi-cover-up-bugs-fix-up-compiler-warnings-in-megaraid-driver
> >> +++ a/drivers/scsi/megaraid.c
> >> @@ -73,10 +73,14 @@ static unsigned short int max_mbox_busy_
> >>  module_param(max_mbox_busy_wait, ushort, 0);
> >>  MODULE_PARM_DESC(max_mbox_busy_wait, "Maximum wait for mailbox in microseconds if busy (default=MBOX_BUSY_WAIT=10)");
> >>  
> >> -#define RDINDOOR(adapter)	readl((adapter)->mmio_base + 0x20)
> >> -#define RDOUTDOOR(adapter)	readl((adapter)->mmio_base + 0x2C)
> >> -#define WRINDOOR(adapter,value)	 writel(value, (adapter)->mmio_base + 0x20)
> >> -#define WROUTDOOR(adapter,value) writel(value, (adapter)->mmio_base + 0x2C)
> >> +#define RDINDOOR(adapter)		readl((volatile void __iomem *) \
> >> +							(adapter)->base + 0x20)
> >> +#define RDOUTDOOR(adapter)		readl((volatile void __iomem *) \
> >> +							(adapter)->base + 0x2C)
> >> +#define WRINDOOR(adapter,value)		writel(value, (volatile void __iomem *)\
> >> +							(adapter)->base + 0x20)
> >> +#define WROUTDOOR(adapter,value)	writel(value, (volatile void __iomem *)\
> >> +							(adapter)->base + 0x2C)
> > 
> > This is both unnecessary and wrong ... it coerces the iomem value and
> > would squelch the useful warnings gcc would issue if base ever lost its
> > iomem annotation.
> 
> Is there another, better, way to stop it spewing compile warnings like
> something out of a horror movie?

It only spews pointer to int conversion warnings on 64 bit for the four
cases you identified below this.  I suspect the above is a remnant from
before the driver was converted to the __iomem annotations ... it should
now be unnecessary because the (adapter)->base has an __iomem
annotation).

James


-
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