mpt2sas: annotate ioc->reply_post_host_index as __iomem
authorJoe Lawrence <joe.lawrence@stratus.com>
Wed, 25 Jun 2014 21:04:06 +0000 (17:04 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 Jul 2014 21:16:56 +0000 (17:16 -0400)
The MPT2SAS_ADAPTER reply_post_host_index[] holds calculated addresses
in memory mapped register space.  Add an "__iomem" annotation to silence
the following sparse warnings:

  drivers/scsi/mpt2sas/mpt2sas_base.c:1006:43:
    warning: incorrect type in argument 2 (different address spaces)
       expected void volatile [noderef] <asn:2>*addr
       got unsigned long long [usertype] *<noident>

  drivers/scsi/mpt2sas/mpt2sas_base.c:4299:22:
    warning: cast removes address space of expression
  drivers/scsi/mpt2sas/mpt2sas_base.c:4303:27:
    warning: cast removes address space of expression

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/mpt2sas/mpt2sas_base.c
drivers/scsi/mpt2sas/mpt2sas_base.h

index 8b88118e20e6cb0bcb0e1145761908b49da01be9..a31397c1f16e381745d57d4c5b4580250c7393f6 100644 (file)
@@ -4295,12 +4295,13 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
                goto out_free_resources;
 
        if (ioc->is_warpdrive) {
-               ioc->reply_post_host_index[0] =
-                   (resource_size_t *)&ioc->chip->ReplyPostHostIndex;
+               ioc->reply_post_host_index[0] = (resource_size_t __iomem *)
+                   &ioc->chip->ReplyPostHostIndex;
 
                for (i = 1; i < ioc->cpu_msix_table_sz; i++)
-                       ioc->reply_post_host_index[i] = (resource_size_t *)
-                       ((u8 *)&ioc->chip->Doorbell + (0x4000 + ((i - 1)
+                       ioc->reply_post_host_index[i] =
+                       (resource_size_t __iomem *)
+                       ((u8 __iomem *)&ioc->chip->Doorbell + (0x4000 + ((i - 1)
                        * 4)));
        }
 
index fd3b998c75b1cfa37ede0887f3725d13567ba7c9..0ac5815a7f911c0cfdd41806fde0dd0ec252ddc7 100644 (file)
@@ -837,7 +837,7 @@ struct MPT2SAS_ADAPTER {
        u8              msix_enable;
        u16             msix_vector_count;
        u8              *cpu_msix_table;
-       resource_size_t **reply_post_host_index;
+       resource_size_t __iomem **reply_post_host_index;
        u16             cpu_msix_table_sz;
        u32             ioc_reset_count;
        MPT2SAS_FLUSH_RUNNING_CMDS schedule_dead_ioc_flush_running_cmds;