diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-11-08 12:27:47 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-11 19:22:46 -0500 |
commit | f3307f7276067e2f8f29a20e3ebe52887e8f9f00 (patch) | |
tree | 83ba74916e6dff503066c15e07495af8e2562eb4 /drivers/scsi/aacraid/dpcsup.c | |
parent | 3fb8931645e23785ee406444a782ba03c31d0e71 (diff) |
[SCSI] aacraid: don't assign cpu_to_le32(int) to u8
On Wed, Nov 07, 2007 at 01:51:44PM -0500, Salyzyn, Mark wrote:
> Christoph Hellwig [mailto:hch@infradead.org] sez:
> > Did anyone run the driver through sparse to see if we have
> > more issues like this?
>
> There are some warnings from sparse, none like this one. I will deal
> with the warnings ...
Actually there are a lot of endianess warnings, fortunately most of them
harmless. The patch below fixes all of them up (including the ones in
the patch I replied to), except for aac_init_adapter which is really odd
and I don't know what to do.
[jejb fixed up rejections and checkpatch issues]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aacraid/dpcsup.c')
-rw-r--r-- | drivers/scsi/aacraid/dpcsup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c index e6032ffc66a6..4726ab666c52 100644 --- a/drivers/scsi/aacraid/dpcsup.c +++ b/drivers/scsi/aacraid/dpcsup.c | |||
@@ -229,11 +229,9 @@ unsigned int aac_command_normal(struct aac_queue *q) | |||
229 | * all QE there are and wake up all the waiters before exiting. | 229 | * all QE there are and wake up all the waiters before exiting. |
230 | */ | 230 | */ |
231 | 231 | ||
232 | unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index) | 232 | unsigned int aac_intr_normal(struct aac_dev *dev, u32 index) |
233 | { | 233 | { |
234 | u32 index = le32_to_cpu(Index); | 234 | dprintk((KERN_INFO "aac_intr_normal(%p,%x)\n", dev, index)); |
235 | |||
236 | dprintk((KERN_INFO "aac_intr_normal(%p,%x)\n", dev, Index)); | ||
237 | if ((index & 0x00000002L)) { | 235 | if ((index & 0x00000002L)) { |
238 | struct hw_fib * hw_fib; | 236 | struct hw_fib * hw_fib; |
239 | struct fib * fib; | 237 | struct fib * fib; |
@@ -301,7 +299,7 @@ unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index) | |||
301 | 299 | ||
302 | if (hwfib->header.Command == cpu_to_le16(NuFileSystem)) | 300 | if (hwfib->header.Command == cpu_to_le16(NuFileSystem)) |
303 | { | 301 | { |
304 | u32 *pstatus = (u32 *)hwfib->data; | 302 | __le32 *pstatus = (__le32 *)hwfib->data; |
305 | if (*pstatus & cpu_to_le32(0xffff0000)) | 303 | if (*pstatus & cpu_to_le32(0xffff0000)) |
306 | *pstatus = cpu_to_le32(ST_OK); | 304 | *pstatus = cpu_to_le32(ST_OK); |
307 | } | 305 | } |