public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Matthias Kaehlcke <mka@chromium.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Vladimir Murzin <vladimir.murzin@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Grant Grundler <grundler@chromium.org>,
	Greg Hackmann <ghackmann@google.com>,
	Michael Davidson <md@google.com>
Subject: Re: [PATCH] arm64: Fix multiple 'asm-operand-widths' warnings
Date: Tue, 2 May 2017 18:29:48 +0100	[thread overview]
Message-ID: <20170502172948.GE28132@leverpostej> (raw)
In-Reply-To: <20170501212622.153720-1-mka@chromium.org>

Hi,

On Mon, May 01, 2017 at 02:26:22PM -0700, Matthias Kaehlcke wrote:
> diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
> index 5308d696311b..7db143689694 100644
> --- a/arch/arm64/include/asm/uaccess.h
> +++ b/arch/arm64/include/asm/uaccess.h
> @@ -302,7 +302,7 @@ do {									\
>  	"	.previous\n"						\
>  	_ASM_EXTABLE(1b, 3b)						\
>  	: "+r" (err)							\
> -	: "r" (x), "r" (addr), "i" (-EFAULT))
> +	: "r" ((__u64)x), "r" (addr), "i" (-EFAULT))
>  

For reference, do you have the warning for this case to hand?

In __put_user_err() we make __pu_val the same type as *ptr, then we
switch on sizeof(*ptr), and pass __pu_val to __put_user_asm(), as x.
For cases 1, 2, and 4, we use "%w" as the register template.

So I can't see why we'd  need this cast in __put_user_err().

I must be missing something.

Thanks,
Mark.

  parent reply	other threads:[~2017-05-02 17:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01 21:26 [PATCH] arm64: Fix multiple 'asm-operand-widths' warnings Matthias Kaehlcke
2017-05-02  8:25 ` Marc Zyngier
2017-05-02 10:27 ` Mark Rutland
2017-05-02 17:26   ` Matthias Kaehlcke
2017-05-02 17:29 ` Mark Rutland [this message]
2017-05-02 18:52   ` Matthias Kaehlcke
2017-05-03 10:51     ` Mark Rutland

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=20170502172948.GE28132@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=ghackmann@google.com \
    --cc=grundler@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=md@google.com \
    --cc=mka@chromium.org \
    --cc=vladimir.murzin@arm.com \
    --cc=will.deacon@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox