]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: mpt3sas: Fix adapter replyPostRegisterIndex declaration
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 7 Mar 2022 23:48:54 +0000 (08:48 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 02:30:05 +0000 (22:30 -0400)
The replyPostRegisterIndex array of struct MPT3SAS_ADAPTER stores iomem
resource addresses. Fix its declaration to annotate it with __iomem to
avoid sparse warnings for writel() calls using the stored addresses.

Link: https://lore.kernel.org/r/20220307234854.148145-6-damien.lemoal@opensource.wdc.com
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.h

index baacba436fce3b3869f197f64a10874fcf7ee5c2..4961be5d527bc46b8b4f0d139ede0494569b6f00 100644 (file)
@@ -3692,10 +3692,11 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc)
                }
 
                for (i = 0; i < ioc->combined_reply_index_count; i++) {
-                       ioc->replyPostRegisterIndex[i] = (resource_size_t *)
-                            ((u8 __force *)&ioc->chip->Doorbell +
-                            MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
-                            (i * MPT3_SUP_REPLY_POST_HOST_INDEX_REG_OFFSET));
+                       ioc->replyPostRegisterIndex[i] =
+                               (resource_size_t __iomem *)
+                               ((u8 __force *)&ioc->chip->Doorbell +
+                                MPI25_SUP_REPLY_POST_HOST_INDEX_OFFSET +
+                                (i * MPT3_SUP_REPLY_POST_HOST_INDEX_REG_OFFSET));
                }
        }
 
index 949e98d523e2836425286373cdb19c61c8e16dff..209f8680c01dfb6502ec4b7947e04ce6efaef78a 100644 (file)
@@ -1588,7 +1588,7 @@ struct MPT3SAS_ADAPTER {
        u8              combined_reply_index_count;
        u8              smp_affinity_enable;
        /* reply post register index */
-       resource_size_t **replyPostRegisterIndex;
+       resource_size_t __iomem **replyPostRegisterIndex;
 
        struct list_head delayed_tr_list;
        struct list_head delayed_tr_volume_list;