public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Linux SCSI Mailing List <linux-scsi@vger.kernel.org>,
	Seokmann Ju <seokmann.ju@qlogic.com>
Subject: Re: [PATCH 8/9] qla2xxx: Add ISP25XX support.
Date: Thu, 19 Jul 2007 17:53:53 -0500	[thread overview]
Message-ID: <1184885633.3464.114.camel@localhost.localdomain> (raw)
In-Reply-To: <11848827643315-git-send-email-andrew.vasquez@qlogic.com>

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

?

James



  reply	other threads:[~2007-07-19 22:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 22:04 [PATCH 0/9] qla2xxx: updates for 2.6.23 [8.02.00-k2] Andrew Vasquez
2007-07-19 22:05 ` [PATCH 1/9] qla2xxx: Generalize FW-Interface-2 support Andrew Vasquez
2007-07-19 22:05 ` [PATCH 2/9] qla2xxx: Generalize iIDMA support Andrew Vasquez
2007-07-19 22:05 ` [PATCH 3/9] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration Andrew Vasquez
2007-07-19 22:05 ` [PATCH 4/9] qla2xxx: Validate mid-layer 'underflow' during check-condition handling Andrew Vasquez
2007-07-22 10:50   ` Boaz Harrosh
2007-07-22 13:42     ` James Bottomley
2007-07-22 14:28       ` Boaz Harrosh
2007-07-23  0:27         ` Andrew Vasquez
2007-07-19 22:06 ` [PATCH 5/9] qla2xxx: Re-factor isp_operations to static structures Andrew Vasquez
2007-07-19 22:06 ` [PATCH 6/9] qla2xxx: Use PCI-X/PCI-Express read control interfaces Andrew Vasquez
2007-07-19 22:06 ` [PATCH 7/9] qla2xxx: Use pci_try_set_mwi() Andrew Vasquez
2007-07-19 22:06 ` [PATCH 8/9] qla2xxx: Add ISP25XX support Andrew Vasquez
2007-07-19 22:53   ` James Bottomley [this message]
2007-07-20  0:08     ` Andrew Vasquez
2007-07-20  3:37     ` [PATCH 8/9 TAKE2] " Andrew Vasquez
2007-07-19 22:06 ` [PATCH 9/9] qla2xxx: Update version number to 8.02.00-k2 Andrew Vasquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1184885633.3464.114.camel@localhost.localdomain \
    --to=james.bottomley@steeleye.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=seokmann.ju@qlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox