* [PATCH 1/4] remoteproc: qcom_q6v5_adsp: Fix a NULL vs IS_ERR() check in adsp_alloc_memory_region()
2025-11-29 14:50 [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking Dan Carpenter
@ 2025-11-29 14:50 ` Dan Carpenter
2025-11-29 14:51 ` [PATCH 2/4] remoteproc: qcom: pas: Fix a couple NULL vs IS_ERR() bugs Dan Carpenter
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2025-11-29 14:50 UTC (permalink / raw)
To: Rob Herring
Cc: Bjorn Andersson, Mathieu Poirier, linux-arm-msm, linux-remoteproc,
linux-kernel
The devm_ioremap_resource_wc() function never returns NULL, it returns
error pointers. Update the check to match.
Fixes: c70b9d5fdcd7 ("remoteproc: qcom: Use of_reserved_mem_region_* functions for "memory-region"")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/remoteproc/qcom_q6v5_adsp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c
index d3933a66ed3d..b5c8d6d38c9c 100644
--- a/drivers/remoteproc/qcom_q6v5_adsp.c
+++ b/drivers/remoteproc/qcom_q6v5_adsp.c
@@ -637,9 +637,10 @@ static int adsp_alloc_memory_region(struct qcom_adsp *adsp)
adsp->mem_phys = adsp->mem_reloc = res.start;
adsp->mem_size = resource_size(&res);
adsp->mem_region = devm_ioremap_resource_wc(adsp->dev, &res);
- if (!adsp->mem_region) {
+ if (IS_ERR(adsp->mem_region)) {
dev_err(adsp->dev, "unable to map memory region: %pR\n", &res);
- return -EBUSY;
+ return PTR_ERR(adsp->mem_region);
+
}
return 0;
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/4] remoteproc: qcom: pas: Fix a couple NULL vs IS_ERR() bugs
2025-11-29 14:50 [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking Dan Carpenter
2025-11-29 14:50 ` [PATCH 1/4] remoteproc: qcom_q6v5_adsp: Fix a NULL vs IS_ERR() check in adsp_alloc_memory_region() Dan Carpenter
@ 2025-11-29 14:51 ` Dan Carpenter
2025-11-29 14:51 ` [PATCH 3/4] remoteproc: qcom: q6v5: Fix NULL vs IS_ERR() bug in q6v5_alloc_memory_region() Dan Carpenter
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2025-11-29 14:51 UTC (permalink / raw)
To: Rob Herring
Cc: Bjorn Andersson, Mathieu Poirier, linux-arm-msm, linux-remoteproc,
linux-kernel
The devm_ioremap_resource_wc() function never returns NULL, it returns
error pointers. Update the checking to match.
Fixes: c70b9d5fdcd7 ("remoteproc: qcom: Use of_reserved_mem_region_* functions for "memory-region"")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/remoteproc/qcom_q6v5_pas.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 609df141ecb1..52680ac99589 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -559,9 +559,9 @@ static int qcom_pas_alloc_memory_region(struct qcom_pas *pas)
pas->mem_phys = pas->mem_reloc = res.start;
pas->mem_size = resource_size(&res);
pas->mem_region = devm_ioremap_resource_wc(pas->dev, &res);
- if (!pas->mem_region) {
+ if (IS_ERR(pas->mem_region)) {
dev_err(pas->dev, "unable to map memory region: %pR\n", &res);
- return -EBUSY;
+ return PTR_ERR(pas->mem_region);
}
if (!pas->dtb_pas_id)
@@ -576,9 +576,9 @@ static int qcom_pas_alloc_memory_region(struct qcom_pas *pas)
pas->dtb_mem_phys = pas->dtb_mem_reloc = res.start;
pas->dtb_mem_size = resource_size(&res);
pas->dtb_mem_region = devm_ioremap_resource_wc(pas->dev, &res);
- if (!pas->dtb_mem_region) {
+ if (IS_ERR(pas->dtb_mem_region)) {
dev_err(pas->dev, "unable to map dtb memory region: %pR\n", &res);
- return -EBUSY;
+ return PTR_ERR(pas->dtb_mem_region);
}
return 0;
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4] remoteproc: qcom: q6v5: Fix NULL vs IS_ERR() bug in q6v5_alloc_memory_region()
2025-11-29 14:50 [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking Dan Carpenter
2025-11-29 14:50 ` [PATCH 1/4] remoteproc: qcom_q6v5_adsp: Fix a NULL vs IS_ERR() check in adsp_alloc_memory_region() Dan Carpenter
2025-11-29 14:51 ` [PATCH 2/4] remoteproc: qcom: pas: Fix a couple NULL vs IS_ERR() bugs Dan Carpenter
@ 2025-11-29 14:51 ` Dan Carpenter
2025-11-29 14:51 ` [PATCH 4/4] remoteproc: qcom_wcnss: Fix NULL vs IS_ERR() bug in wcnss_alloc_memory_region() Dan Carpenter
2025-12-01 11:26 ` [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking Konrad Dybcio
4 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2025-11-29 14:51 UTC (permalink / raw)
To: Rob Herring
Cc: Bjorn Andersson, Mathieu Poirier, linux-arm-msm, linux-remoteproc,
linux-kernel
The devm_ioremap_resource_wc() function never returns NULL, it returns
error pointers. Update the checking to match.
Fixes: c70b9d5fdcd7 ("remoteproc: qcom: Use of_reserved_mem_region_* functions for "memory-region"")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/remoteproc/qcom_q6v5_wcss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index ca748e3bcc7f..d96af0e0f665 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -887,9 +887,9 @@ static int q6v5_alloc_memory_region(struct q6v5_wcss *wcss)
wcss->mem_reloc = res.start;
wcss->mem_size = resource_size(&res);
wcss->mem_region = devm_ioremap_resource_wc(dev, &res);
- if (!wcss->mem_region) {
+ if (IS_ERR(wcss->mem_region)) {
dev_err(dev, "unable to map memory region: %pR\n", &res);
- return -EBUSY;
+ return PTR_ERR(wcss->mem_region);
}
return 0;
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 4/4] remoteproc: qcom_wcnss: Fix NULL vs IS_ERR() bug in wcnss_alloc_memory_region()
2025-11-29 14:50 [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking Dan Carpenter
` (2 preceding siblings ...)
2025-11-29 14:51 ` [PATCH 3/4] remoteproc: qcom: q6v5: Fix NULL vs IS_ERR() bug in q6v5_alloc_memory_region() Dan Carpenter
@ 2025-11-29 14:51 ` Dan Carpenter
2025-12-01 11:26 ` [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking Konrad Dybcio
4 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2025-11-29 14:51 UTC (permalink / raw)
To: Rob Herring
Cc: Bjorn Andersson, Mathieu Poirier, linux-arm-msm, linux-remoteproc,
linux-kernel
The devm_ioremap_resource_wc() function never returns NULL, it returns
error pointers. Update the checking to match.
Fixes: c70b9d5fdcd7 ("remoteproc: qcom: Use of_reserved_mem_region_* functions for "memory-region"")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/remoteproc/qcom_wcnss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 14005fb049a2..ee18bf2e8054 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -538,9 +538,9 @@ static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss)
wcnss->mem_phys = wcnss->mem_reloc = res.start;
wcnss->mem_size = resource_size(&res);
wcnss->mem_region = devm_ioremap_resource_wc(wcnss->dev, &res);
- if (!wcnss->mem_region) {
+ if (IS_ERR(wcnss->mem_region)) {
dev_err(wcnss->dev, "unable to map memory region: %pR\n", &res);
- return -EBUSY;
+ return PTR_ERR(wcnss->mem_region);
}
return 0;
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking
2025-11-29 14:50 [PATCH 0/4] remoteproc: qcom: Fix devm_ioremap_resource_wc() checking Dan Carpenter
` (3 preceding siblings ...)
2025-11-29 14:51 ` [PATCH 4/4] remoteproc: qcom_wcnss: Fix NULL vs IS_ERR() bug in wcnss_alloc_memory_region() Dan Carpenter
@ 2025-12-01 11:26 ` Konrad Dybcio
4 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2025-12-01 11:26 UTC (permalink / raw)
To: Dan Carpenter, Rob Herring
Cc: Bjorn Andersson, linux-arm-msm, linux-kernel, linux-remoteproc,
Mathieu Poirier
On 11/29/25 3:50 PM, Dan Carpenter wrote:
> The devm_ioremap_resource_wc() function returns error pointers and not
> NULL. I don't know, if you'll want to fold these patches all together
> or not. Or into the original patch, perhaps?
Thanks for catching this!
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread