Skip to content

Commit

Permalink
remoteproc: coredump: Correct argument 2 type for memcpy_fromio
Browse files Browse the repository at this point in the history
Address the sparse check warning:
>> drivers/remoteproc/remoteproc_coredump.c:169:53:
sparse: warning: incorrect type in argument 2 (different address spaces)
sparse:    expected void const volatile [noderef] __iomem *src
sparse:    got void *[assigned] ptr

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mathieu Poirier <[email protected]>
  • Loading branch information
MrVan authored and mathieupoirier committed Nov 17, 2021
1 parent 4da9617 commit 876e0b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/remoteproc/remoteproc_coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static void rproc_copy_segment(struct rproc *rproc, void *dest,
memset(dest, 0xff, size);
} else {
if (is_iomem)
memcpy_fromio(dest, ptr, size);
memcpy_fromio(dest, (void const __iomem *)ptr, size);
else
memcpy(dest, ptr, size);
}
Expand Down

0 comments on commit 876e0b2

Please sign in to comment.