All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Sathya Prakash <sathya.prakash@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	Suganath Prabu Subramani  <suganath-prabu.subramani@broadcom.com>,
	MPT-FusionLinux.pdl@broadcom.com
Subject: [PATCH v3 5/5] scsi: mpt3sas: fix adapter replyPostRegisterIndex declaration
Date: Tue,  8 Mar 2022 08:48:54 +0900	[thread overview]
Message-ID: <20220307234854.148145-6-damien.lemoal@opensource.wdc.com> (raw)
In-Reply-To: <20220307234854.148145-1-damien.lemoal@opensource.wdc.com>

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.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 9 +++++----
 drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 5efe4bd186db..fa47f56c046f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -3703,10 +3703,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));
 		}
 	}
 
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index 949e98d523e2..209f8680c01d 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -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;
-- 
2.35.1


  parent reply	other threads:[~2022-03-07 23:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 23:48 [PATCH v3 0/5] Fix mpt3sas driver sparse warnings Damien Le Moal
2022-03-07 23:48 ` [PATCH v3 1/5] scsi: mpt3sas: fix _ctl_set_task_mid() TaskMID check Damien Le Moal
2022-03-07 23:48 ` [PATCH v3 2/5] scsi: mpt3sas: Fix writel() use Damien Le Moal
2022-03-07 23:48 ` [PATCH v3 3/5] scsi: mpt3sas: fix ioc->base_readl() use Damien Le Moal
2022-03-07 23:48 ` [PATCH v3 4/5] scsi: mpt3sas: fix event callback log_code value handling Damien Le Moal
2022-03-07 23:48 ` Damien Le Moal [this message]
2022-03-09  3:56 ` [PATCH v3 0/5] Fix mpt3sas driver sparse warnings Martin K. Petersen
2022-03-09  6:35   ` Sreekanth Reddy
2022-08-02 20:27     ` matoro
2022-08-02 23:36       ` Damien Le Moal
2022-08-11 19:05         ` matoro
2022-08-11 19:17           ` Damien Le Moal
2022-08-22 17:51             ` matoro
2022-08-22 17:53               ` Damien Le Moal
2022-09-15 15:55                 ` matoro
2022-09-16  8:39                   ` Damien Le Moal
2022-09-16 13:04                   ` Damien Le Moal
2022-04-26  4:25 ` Damien Le Moal
2022-04-26 10:37   ` Martin K. Petersen
2022-04-26 10:44     ` Damien Le Moal
2022-05-03  0:51 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220307234854.148145-6-damien.lemoal@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.