All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Yejune Deng <yejune.deng@gmail.com>,
	ysato@users.sourceforge.jp, dalias@libc.org
Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sh: kdump: add some attribute to function
Date: Mon, 18 Jan 2021 20:59:45 +0100	[thread overview]
Message-ID: <2a4c3426-8afb-f56f-b31a-44a4505f5030@physik.fu-berlin.de> (raw)
In-Reply-To: <1607582998-13098-1-git-send-email-yejune.deng@gmail.com>

On 12/10/20 7:49 AM, Yejune Deng wrote:
> 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;
>  		}

Successfully boot-tested on my SH-7785LCR. No regressions.

Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


      reply	other threads:[~2021-01-18 20:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a4c3426-8afb-f56f-b31a-44a4505f5030@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=dalias@libc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=yejune.deng@gmail.com \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.