summaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorYejune Deng <yejune.deng@gmail.com>2020-12-10 14:49:58 +0800
committerRich Felker <dalias@libc.org>2021-09-17 14:00:12 -0400
commit12285ff8667bf06c168113c10d3619834e423ae6 (patch)
treefdf540997f0d45fd002da6bf2440e3e1e99ed143 /arch/sh
parentbde82ee391fa6d3ad054313c4aa7b726d32515ce (diff)
sh: kdump: add some attribute to function
add '__iomem' for ioremap() and '__user' for copy_to_user(). Signed-off-by: Yejune Deng <yejune.deng@gmail.com> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Rich Felker <dalias@libc.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/crash_dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/crash_dump.c b/arch/sh/kernel/crash_dump.c
index a9086127b16d..5b41b59698c1 100644
--- a/arch/sh/kernel/crash_dump.c
+++ b/arch/sh/kernel/crash_dump.c
@@ -26,7 +26,7 @@
ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
size_t csize, unsigned long offset, int userbuf)
{
- void *vaddr;
+ void __iomem *vaddr;
if (!csize)
return 0;
@@ -34,7 +34,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
if (userbuf) {
- if (copy_to_user(buf, (vaddr + offset), csize)) {
+ if (copy_to_user((void __user *)buf, (vaddr + offset), csize)) {
iounmap(vaddr);
return -EFAULT;
}