From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH] soc: qcom: smsm: fix __iomem annotations
Date: Tue, 23 Jun 2026 10:09:54 +0100 [thread overview]
Message-ID: <20260623090954.620688-1-ben.dooks@codethink.co.uk> (raw)
There are a number of points in the driver which miss out
on __iomem annotations, so add these to remove the following
sparse warnings:
drivers/soc/qcom/smsm.c:159:32: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/qcom/smsm.c:159:32: expected void const volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:159:32: got unsigned int [usertype] *local_state
drivers/soc/qcom/smsm.c:171:25: warning: incorrect type in argument 2 (different address spaces)
drivers/soc/qcom/smsm.c:171:25: expected void volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:171:25: got unsigned int [usertype] *local_state
drivers/soc/qcom/smsm.c:181:48: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/qcom/smsm.c:181:48: expected void const volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:181:48: got unsigned int [usertype] *
drivers/soc/qcom/smsm.c:219:26: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/qcom/smsm.c:219:26: expected void const volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:219:26: got unsigned int [usertype] *remote_state
drivers/soc/qcom/smsm.c:257:49: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/qcom/smsm.c:257:49: expected void const volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:257:49: got unsigned int [usertype] *
drivers/soc/qcom/smsm.c:259:49: warning: incorrect type in argument 2 (different address spaces)
drivers/soc/qcom/smsm.c:259:49: expected void volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:259:49: got unsigned int [usertype] *
drivers/soc/qcom/smsm.c:280:24: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/qcom/smsm.c:280:24: expected void const volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:280:24: got unsigned int [usertype] *remote_state
drivers/soc/qcom/smsm.c:288:49: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/qcom/smsm.c:288:49: expected void const volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:288:49: got unsigned int [usertype] *
drivers/soc/qcom/smsm.c:290:49: warning: incorrect type in argument 2 (different address spaces)
drivers/soc/qcom/smsm.c:290:49: expected void volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:290:49: got unsigned int [usertype] *
drivers/soc/qcom/smsm.c:330:26: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/qcom/smsm.c:330:26: expected void const volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:330:26: got unsigned int [usertype] *remote_state
drivers/soc/qcom/smsm.c:635:47: warning: incorrect type in argument 2 (different address spaces)
drivers/soc/qcom/smsm.c:635:47: expected void volatile [noderef] __iomem *addr
drivers/soc/qcom/smsm.c:635:47: got unsigned int [usertype] *
Note, we don't fixup the qcom_smem_get() to return an __iomem annotated pointer.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
drivers/soc/qcom/smsm.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
index 021e9d1f61dc..8d6656edd959 100644
--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -82,8 +82,8 @@ struct qcom_smsm {
u32 num_hosts;
u32 num_entries;
- u32 *local_state;
- u32 *subscription;
+ u32 __iomem *local_state;
+ u32 __iomem *subscription;
struct qcom_smem_state *state;
spinlock_t lock;
@@ -115,8 +115,8 @@ struct smsm_entry {
DECLARE_BITMAP(irq_falling, 32);
unsigned long last_value;
- u32 *remote_state;
- u32 *subscription;
+ u32 __iomem *remote_state;
+ u32 __iomem *subscription;
};
/**
@@ -138,7 +138,7 @@ struct smsm_host {
* smsm_update_bits() - change bit in outgoing entry and inform subscribers
* @data: smsm context pointer
* @mask: value mask
- * @value: new value
+ * @Value: new value
*
* Used to set and clear the bits in the outgoing/local entry and inform
* subscribers about the change.
@@ -513,9 +513,9 @@ static int qcom_smsm_probe(struct platform_device *pdev)
struct device_node *node;
struct smsm_entry *entry;
struct qcom_smsm *smsm;
- u32 *intr_mask;
+ u32 __iomem *intr_mask;
size_t size;
- u32 *states;
+ u32 __iomem *states;
u32 id;
int ret;
@@ -579,7 +579,7 @@ static int qcom_smsm_probe(struct platform_device *pdev)
goto out_put;
}
- states = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_SMSM_SHARED_STATE, NULL);
+ states = (u32 __iomem *)qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_SMSM_SHARED_STATE, NULL);
if (IS_ERR(states)) {
dev_err(&pdev->dev, "Unable to acquire shared state entry\n");
ret = PTR_ERR(states);
@@ -594,7 +594,7 @@ static int qcom_smsm_probe(struct platform_device *pdev)
goto out_put;
}
- intr_mask = qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_SMSM_CPU_INTR_MASK, NULL);
+ intr_mask = (u32 __iomem *)qcom_smem_get(QCOM_SMEM_HOST_ANY, SMEM_SMSM_CPU_INTR_MASK, NULL);
if (IS_ERR(intr_mask)) {
dev_err(&pdev->dev, "unable to acquire shared memory interrupt mask\n");
ret = PTR_ERR(intr_mask);
--
2.37.2.352.g3c44437643
reply other threads:[~2026-06-23 9:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260623090954.620688-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=andersson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome