[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1607582998-13098-1-git-send-email-yejune.deng@gmail.com>
Date: Thu, 10 Dec 2020 14:49:58 +0800
From: Yejune Deng <yejune.deng@...il.com>
To: ysato@...rs.sourceforge.jp, dalias@...c.org
Cc: yejune.deng@...il.com, linux-sh@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] sh: kdump: add some attribute to function
add '__iomem' for ioremap() and '__user' for copy_to_user().
Signed-off-by: Yejune Deng <yejune.deng@...il.com>
---
arch/sh/kernel/crash_dump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/kernel/crash_dump.c b/arch/sh/kernel/crash_dump.c
index a908612..5b41b59 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;
}
--
1.9.1
Powered by blists - more mailing lists