sh: kdump: add some attribute to function
authorYejune Deng <yejune.deng@gmail.com>
Thu, 10 Dec 2020 06:49:58 +0000 (14:49 +0800)
committerRich Felker <dalias@libc.org>
Fri, 17 Sep 2021 18:00:12 +0000 (14:00 -0400)
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>
arch/sh/kernel/crash_dump.c

index a908612..5b41b59 100644 (file)
@@ -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;
                }