Skip to content

Commit

Permalink
sh: kdump: add some attribute to function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yejune Deng authored and Rich Felker committed Sep 17, 2021
1 parent bde82ee commit 12285ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sh/kernel/crash_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
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;

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;
}
Expand Down

0 comments on commit 12285ff

Please sign in to comment.