* [PATCH] remoteproc: xlnx: fix typecast warnings
@ 2026-08-28 15:58 Tanmay Shah
2026-09-30 15:17 ` Mathieu Poirier
0 siblings, 1 reply; 3+ messages in thread
From: Tanmay Shah @ 2026-08-28 15:58 UTC (permalink / raw)
To: andersson, mathieu.poirier
Cc: linux-remoteproc, linux-kernel, Tanmay Shah, kernel test robot
Fix following sparse warnings by using __force attribute:
sparse warnings: (new ones prefixed by >>)
drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse:
cast removes address space '__iomem' of expression
drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse:
cast removes address space '__iomem' of expression
>> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse:
incorrect type in initializer (different address spaces) @@ expected
void *rsc_offset @@ got void [noderef] __iomem * @@
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse:
expected void *rsc_offset
drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got
void [noderef] __iomem *
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202608190009.uCbYi1Y5-lkp@intel.com/
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
---
drivers/remoteproc/xlnx_r5_remoteproc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index c685bb5fa62c..f9cdd3c024dc 100644
--- a/drivers/remoteproc/xlnx_r5_remoteproc.c
+++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
@@ -568,7 +568,7 @@ static int tcm_mem_map(struct rproc *rproc,
return -ENOMEM;
/* Update memory entry va */
- mem->va = (void *)va;
+ mem->va = (__force void *)va;
/* clear TCMs */
memset_io(va, 0, mem->len);
@@ -746,7 +746,7 @@ static struct resource_table *zynqmp_r5_get_loaded_rsc_table(struct rproc *rproc
*size = r5_core->rsc_tbl_size;
- return (struct resource_table *)r5_core->rsc_tbl_va;
+ return (__force struct resource_table *)r5_core->rsc_tbl_va;
}
static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
@@ -770,7 +770,7 @@ static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
return -EINVAL;
}
- rsc_data_va = (struct rsc_tbl_data *)ioremap_wc(res_mem.start,
+ rsc_data_va = (__force struct rsc_tbl_data *)ioremap_wc(res_mem.start,
sizeof(struct rsc_tbl_data));
if (!rsc_data_va) {
dev_err(dev, "failed to map resource table data address\n");
@@ -794,7 +794,7 @@ static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
return -EINVAL;
}
- rsc_tbl_addr = (struct resource_table *)r5_core->rsc_tbl_va;
+ rsc_tbl_addr = (__force struct resource_table *)r5_core->rsc_tbl_va;
/*
* As of now resource table version 1 is expected. Don't fail to attach
@@ -834,7 +834,7 @@ static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32 rsc_type, void *rsc,
int offset, int avail)
{
struct zynqmp_r5_core *r5_core = rproc->priv;
- void *rsc_offset = (r5_core->rsc_tbl_va + offset);
+ void *rsc_offset = (__force void *)(r5_core->rsc_tbl_va + offset);
if (rsc_type != XLNX_RPROC_FW_CRASH_REPORT)
return RSC_IGNORED;
base-commit: d4d61a4b0a52e8f3cdb3e1578602850a3452ec3e
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] remoteproc: xlnx: fix typecast warnings
2026-08-28 15:58 [PATCH] remoteproc: xlnx: fix typecast warnings Tanmay Shah
@ 2026-09-30 15:17 ` Mathieu Poirier
2026-09-30 17:59 ` Shah, Tanmay
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Poirier @ 2026-09-30 15:17 UTC (permalink / raw)
To: Tanmay Shah; +Cc: andersson, linux-remoteproc, linux-kernel, kernel test robot
On Fri, Aug 28, 2026 at 08:58:46AM -0700, Tanmay Shah wrote:
> Fix following sparse warnings by using __force attribute:
>
> sparse warnings: (new ones prefixed by >>)
> drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse:
> cast removes address space '__iomem' of expression
> drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse:
> cast removes address space '__iomem' of expression
> drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse:
> cast removes address space '__iomem' of expression
> drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse:
> cast removes address space '__iomem' of expression
>
> >> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse:
> incorrect type in initializer (different address spaces) @@ expected
> void *rsc_offset @@ got void [noderef] __iomem * @@
> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse:
> expected void *rsc_offset
> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got
> void [noderef] __iomem *
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202608190009.uCbYi1Y5-lkp@intel.com/
> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
I have applied this patch - apoligies for the delay, it got lost in the heap.
Mathieu
> ---
> drivers/remoteproc/xlnx_r5_remoteproc.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
> index c685bb5fa62c..f9cdd3c024dc 100644
> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c
> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
> @@ -568,7 +568,7 @@ static int tcm_mem_map(struct rproc *rproc,
> return -ENOMEM;
>
> /* Update memory entry va */
> - mem->va = (void *)va;
> + mem->va = (__force void *)va;
>
> /* clear TCMs */
> memset_io(va, 0, mem->len);
> @@ -746,7 +746,7 @@ static struct resource_table *zynqmp_r5_get_loaded_rsc_table(struct rproc *rproc
>
> *size = r5_core->rsc_tbl_size;
>
> - return (struct resource_table *)r5_core->rsc_tbl_va;
> + return (__force struct resource_table *)r5_core->rsc_tbl_va;
> }
>
> static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
> @@ -770,7 +770,7 @@ static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
> return -EINVAL;
> }
>
> - rsc_data_va = (struct rsc_tbl_data *)ioremap_wc(res_mem.start,
> + rsc_data_va = (__force struct rsc_tbl_data *)ioremap_wc(res_mem.start,
> sizeof(struct rsc_tbl_data));
> if (!rsc_data_va) {
> dev_err(dev, "failed to map resource table data address\n");
> @@ -794,7 +794,7 @@ static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
> return -EINVAL;
> }
>
> - rsc_tbl_addr = (struct resource_table *)r5_core->rsc_tbl_va;
> + rsc_tbl_addr = (__force struct resource_table *)r5_core->rsc_tbl_va;
>
> /*
> * As of now resource table version 1 is expected. Don't fail to attach
> @@ -834,7 +834,7 @@ static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32 rsc_type, void *rsc,
> int offset, int avail)
> {
> struct zynqmp_r5_core *r5_core = rproc->priv;
> - void *rsc_offset = (r5_core->rsc_tbl_va + offset);
> + void *rsc_offset = (__force void *)(r5_core->rsc_tbl_va + offset);
>
> if (rsc_type != XLNX_RPROC_FW_CRASH_REPORT)
> return RSC_IGNORED;
>
> base-commit: d4d61a4b0a52e8f3cdb3e1578602850a3452ec3e
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] remoteproc: xlnx: fix typecast warnings
2026-09-30 15:17 ` Mathieu Poirier
@ 2026-09-30 17:59 ` Shah, Tanmay
0 siblings, 0 replies; 3+ messages in thread
From: Shah, Tanmay @ 2026-09-30 17:59 UTC (permalink / raw)
To: Mathieu Poirier, Tanmay Shah
Cc: andersson, linux-remoteproc, linux-kernel, kernel test robot
On 9/30/2026 10:17 AM, Mathieu Poirier wrote:
> On Fri, Aug 28, 2026 at 08:58:46AM -0700, Tanmay Shah wrote:
>> Fix following sparse warnings by using __force attribute:
>>
>> sparse warnings: (new ones prefixed by >>)
>> drivers/remoteproc/xlnx_r5_remoteproc.c:571:20: sparse: sparse:
>> cast removes address space '__iomem' of expression
>> drivers/remoteproc/xlnx_r5_remoteproc.c:749:17: sparse: sparse:
>> cast removes address space '__iomem' of expression
>> drivers/remoteproc/xlnx_r5_remoteproc.c:773:24: sparse: sparse:
>> cast removes address space '__iomem' of expression
>> drivers/remoteproc/xlnx_r5_remoteproc.c:797:25: sparse: sparse:
>> cast removes address space '__iomem' of expression
>>
>>>> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: sparse:
>> incorrect type in initializer (different address spaces) @@ expected
>> void *rsc_offset @@ got void [noderef] __iomem * @@
>> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse:
>> expected void *rsc_offset
>> drivers/remoteproc/xlnx_r5_remoteproc.c:837:49: sparse: got
>> void [noderef] __iomem *
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202608190009.uCbYi1Y5-lkp@intel.com/
>> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
>
> I have applied this patch - apoligies for the delay, it got lost in the heap.
>
Thank You, no problem.
Tanmay
> Mathieu
>
>> ---
>> drivers/remoteproc/xlnx_r5_remoteproc.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
>> index c685bb5fa62c..f9cdd3c024dc 100644
>> --- a/drivers/remoteproc/xlnx_r5_remoteproc.c
>> +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
>> @@ -568,7 +568,7 @@ static int tcm_mem_map(struct rproc *rproc,
>> return -ENOMEM;
>>
>> /* Update memory entry va */
>> - mem->va = (void *)va;
>> + mem->va = (__force void *)va;
>>
>> /* clear TCMs */
>> memset_io(va, 0, mem->len);
>> @@ -746,7 +746,7 @@ static struct resource_table *zynqmp_r5_get_loaded_rsc_table(struct rproc *rproc
>>
>> *size = r5_core->rsc_tbl_size;
>>
>> - return (struct resource_table *)r5_core->rsc_tbl_va;
>> + return (__force struct resource_table *)r5_core->rsc_tbl_va;
>> }
>>
>> static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
>> @@ -770,7 +770,7 @@ static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
>> return -EINVAL;
>> }
>>
>> - rsc_data_va = (struct rsc_tbl_data *)ioremap_wc(res_mem.start,
>> + rsc_data_va = (__force struct rsc_tbl_data *)ioremap_wc(res_mem.start,
>> sizeof(struct rsc_tbl_data));
>> if (!rsc_data_va) {
>> dev_err(dev, "failed to map resource table data address\n");
>> @@ -794,7 +794,7 @@ static int zynqmp_r5_get_rsc_table_va(struct zynqmp_r5_core *r5_core)
>> return -EINVAL;
>> }
>>
>> - rsc_tbl_addr = (struct resource_table *)r5_core->rsc_tbl_va;
>> + rsc_tbl_addr = (__force struct resource_table *)r5_core->rsc_tbl_va;
>>
>> /*
>> * As of now resource table version 1 is expected. Don't fail to attach
>> @@ -834,7 +834,7 @@ static int zynqmp_r5_handle_rsc(struct rproc *rproc, u32 rsc_type, void *rsc,
>> int offset, int avail)
>> {
>> struct zynqmp_r5_core *r5_core = rproc->priv;
>> - void *rsc_offset = (r5_core->rsc_tbl_va + offset);
>> + void *rsc_offset = (__force void *)(r5_core->rsc_tbl_va + offset);
>>
>> if (rsc_type != XLNX_RPROC_FW_CRASH_REPORT)
>> return RSC_IGNORED;
>>
>> base-commit: d4d61a4b0a52e8f3cdb3e1578602850a3452ec3e
>> --
>> 2.43.0
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-30 17:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-28 15:58 [PATCH] remoteproc: xlnx: fix typecast warnings Tanmay Shah
2026-09-30 15:17 ` Mathieu Poirier
2026-09-30 17:59 ` Shah, Tanmay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®