diff options
author | Yejune Deng <yejune.deng@gmail.com> | 2020-12-10 07:49:58 +0100 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2021-09-17 20:00:12 +0200 |
commit | 12285ff8667bf06c168113c10d3619834e423ae6 (patch) | |
tree | fdf540997f0d45fd002da6bf2440e3e1e99ed143 /arch/sh | |
parent | maple: fix wrong return value of maple_bus_init(). (diff) | |
download | linux-12285ff8667bf06c168113c10d3619834e423ae6.tar.xz linux-12285ff8667bf06c168113c10d3619834e423ae6.zip |
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.c | 4 |
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; } |