mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sh: kdump: add some attribute to function
@ 2020-12-10  6:49 Yejune Deng
  2021-01-18 19:59 ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 2+ messages in thread
From: Yejune Deng @ 2020-12-10  6:49 UTC (permalink / raw)
  To: ysato, dalias; +Cc: yejune.deng, linux-sh, linux-kernel

add '__iomem' for ioremap() and '__user' for copy_to_user().

Signed-off-by: Yejune Deng <yejune.deng@gmail.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-18 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10  6:49 [PATCH] sh: kdump: add some attribute to function Yejune Deng
2021-01-18 19:59 ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®