From 56b5871223f66d4a34e6e1069f241077e9f0a154 Mon Sep 17 00:00:00 2001 From: Mark Haverkamp Date: Wed, 27 Apr 2005 06:05:51 -0700 Subject: [SCSI] aacraid: remove sparse warnings This patch addresses the sparse -Wbitwise warnings that Christoph wanted me to eliminate. This mostly consisted of making data structure elements of hardware associated structures the __le* equivalent. Although there were a couple places where there was mixing of cpu and le variable math. These changes have been tested on both an x86 and ppc machine running bonnie++. The usage of the LE32_ALL_ONES macro has been eliminated. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley --- drivers/scsi/aacraid/commsup.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'drivers/scsi/aacraid/commsup.c') diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 2d6bae661790..e2720b7be652 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -102,7 +102,7 @@ int fib_setup(struct aac_dev * dev) fibptr->next = fibptr+1; /* Forward chain the fibs */ init_MUTEX_LOCKED(&fibptr->event_wait); spin_lock_init(&fibptr->event_lock); - hw_fib_va->header.XferState = 0xffffffff; + hw_fib_va->header.XferState = cpu_to_le32(0xffffffff); hw_fib_va->header.SenderSize = cpu_to_le16(sizeof(struct hw_fib)); fibptr->hw_fib_pa = hw_fib_pa; hw_fib_va = (struct hw_fib *)((unsigned char *)hw_fib_va + sizeof(struct hw_fib)); @@ -658,9 +658,8 @@ int fib_adapter_complete(struct fib * fibptr, unsigned short size) } if (aac_insert_entry(dev, index, AdapHighRespQueue, (nointr & (int)aac_config.irq_mod)) != 0) { } - } - else if (hw_fib->header.XferState & NormalPriority) - { + } else if (hw_fib->header.XferState & + cpu_to_le32(NormalPriority)) { u32 index; if (size) { @@ -832,8 +831,8 @@ int aac_command_thread(struct aac_dev * dev) aifcmd = (struct aac_aifcmd *) hw_fib->data; if (aifcmd->command == cpu_to_le32(AifCmdDriverNotify)) { /* Handle Driver Notify Events */ - *(u32 *)hw_fib->data = cpu_to_le32(ST_OK); - fib_adapter_complete(fib, sizeof(u32)); + *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); + fib_adapter_complete(fib, (u16)sizeof(u32)); } else { struct list_head *entry; /* The u32 here is important and intended. We are using @@ -916,7 +915,7 @@ int aac_command_thread(struct aac_dev * dev) /* * Set the status of this FIB */ - *(u32 *)hw_fib->data = cpu_to_le32(ST_OK); + *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); fib_adapter_complete(fib, sizeof(u32)); spin_unlock_irqrestore(&dev->fib_lock, flagv); } -- cgit v1.2.2