aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/commsup.c
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2005-04-27 09:05:51 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 13:53:38 -0400
commit56b5871223f66d4a34e6e1069f241077e9f0a154 (patch)
tree8a259fd9d1544dd6d8b3a607b8589ffd2f935693 /drivers/scsi/aacraid/commsup.c
parent1c2fb3f38e250dd3b88612435869acf92b4f51e2 (diff)
[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 <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r--drivers/scsi/aacraid/commsup.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 2d6bae66179..e2720b7be65 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -102,7 +102,7 @@ int fib_setup(struct aac_dev * dev)
102 fibptr->next = fibptr+1; /* Forward chain the fibs */ 102 fibptr->next = fibptr+1; /* Forward chain the fibs */
103 init_MUTEX_LOCKED(&fibptr->event_wait); 103 init_MUTEX_LOCKED(&fibptr->event_wait);
104 spin_lock_init(&fibptr->event_lock); 104 spin_lock_init(&fibptr->event_lock);
105 hw_fib_va->header.XferState = 0xffffffff; 105 hw_fib_va->header.XferState = cpu_to_le32(0xffffffff);
106 hw_fib_va->header.SenderSize = cpu_to_le16(sizeof(struct hw_fib)); 106 hw_fib_va->header.SenderSize = cpu_to_le16(sizeof(struct hw_fib));
107 fibptr->hw_fib_pa = hw_fib_pa; 107 fibptr->hw_fib_pa = hw_fib_pa;
108 hw_fib_va = (struct hw_fib *)((unsigned char *)hw_fib_va + sizeof(struct hw_fib)); 108 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)
658 } 658 }
659 if (aac_insert_entry(dev, index, AdapHighRespQueue, (nointr & (int)aac_config.irq_mod)) != 0) { 659 if (aac_insert_entry(dev, index, AdapHighRespQueue, (nointr & (int)aac_config.irq_mod)) != 0) {
660 } 660 }
661 } 661 } else if (hw_fib->header.XferState &
662 else if (hw_fib->header.XferState & NormalPriority) 662 cpu_to_le32(NormalPriority)) {
663 {
664 u32 index; 663 u32 index;
665 664
666 if (size) { 665 if (size) {
@@ -832,8 +831,8 @@ int aac_command_thread(struct aac_dev * dev)
832 aifcmd = (struct aac_aifcmd *) hw_fib->data; 831 aifcmd = (struct aac_aifcmd *) hw_fib->data;
833 if (aifcmd->command == cpu_to_le32(AifCmdDriverNotify)) { 832 if (aifcmd->command == cpu_to_le32(AifCmdDriverNotify)) {
834 /* Handle Driver Notify Events */ 833 /* Handle Driver Notify Events */
835 *(u32 *)hw_fib->data = cpu_to_le32(ST_OK); 834 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
836 fib_adapter_complete(fib, sizeof(u32)); 835 fib_adapter_complete(fib, (u16)sizeof(u32));
837 } else { 836 } else {
838 struct list_head *entry; 837 struct list_head *entry;
839 /* The u32 here is important and intended. We are using 838 /* The u32 here is important and intended. We are using
@@ -916,7 +915,7 @@ int aac_command_thread(struct aac_dev * dev)
916 /* 915 /*
917 * Set the status of this FIB 916 * Set the status of this FIB
918 */ 917 */
919 *(u32 *)hw_fib->data = cpu_to_le32(ST_OK); 918 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
920 fib_adapter_complete(fib, sizeof(u32)); 919 fib_adapter_complete(fib, sizeof(u32));
921 spin_unlock_irqrestore(&dev->fib_lock, flagv); 920 spin_unlock_irqrestore(&dev->fib_lock, flagv);
922 } 921 }