Re: [PATCH 8/9] qla2xxx: Add ISP25XX support.

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

 



On Thu, 19 Jul 2007, James Bottomley wrote:

> On Thu, 2007-07-19 at 15:06 -0700, Andrew Vasquez wrote:
> > +		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
> > +		WRT_REG_DWORD(dmp_reg, 0xB0100000);
> > +		dmp_reg = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);
> > +		fw->shadow_reg[1] = htonl(RD_REG_DWORD(dmp_reg));
> 
> Repeating this horrible cast over and over again is really eye watering.
> 
> If you can't simply extend the struct device_reg_24xx as device_reg_25xx
> or something which seems more logical, what about 
> 
> uint32_t __iomem *mailbox_reg_select = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xF0);
> uint32_t __iomem *mailbox_reg_value = (uint32_t __iomem *)((uint8_t __iomem *)reg + 0xFC);

Ok, let me clean this up a bit...

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