Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m32r: fix readl/writel prototypes
Date: Tue, 2 Jan 2018 22:52:56 +0100	[thread overview]
Message-ID: <20180102215245.ajrvyctrffqiynhi@ltop.local> (raw)
In-Reply-To: <20180102105653.1645748-1-arnd@arndb.de>

On Tue, Jan 02, 2018 at 11:56:41AM +0100, Arnd Bergmann wrote:
> All other architectures use 'unsigned int' as the data in readl/write,
> but m32r uses 'unsigned long', leading to lots of harmless build warnings
> like:
> 
> drivers/mmc/host/dw_mmc.c: In function 'dw_mci_regs_show':
> drivers/mmc/host/dw_mmc.c:168:31: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
>   seq_printf(s, "STATUS:\t0x%08x\n", mci_readl(host, STATUS));
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/m32r/include/asm/io.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/m32r/include/asm/io.h b/arch/m32r/include/asm/io.h
> index 1b653bb16f9a..093486b5b931 100644
> --- a/arch/m32r/include/asm/io.h
> +++ b/arch/m32r/include/asm/io.h
> @@ -108,9 +108,9 @@ static inline unsigned short _readw(unsigned long addr)
>  	return *(volatile unsigned short __force *)addr;
>  }
>  
> -static inline unsigned long _readl(unsigned long addr)
> +static inline unsigned int _readl(unsigned long addr)
>  {
> -	return *(volatile unsigned long __force *)addr;
> +	return *(volatile unsigned int __force *)addr;
>  }

The __force is not needed here, so I think it would be better to
remove it. Maybe better to do that in another patch, though.

-- Luc Van Oostenryck

  parent reply	other threads:[~2018-01-02 21:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 10:56 [PATCH] m32r: fix readl/writel prototypes Arnd Bergmann
2018-01-02 14:20 ` Geert Uytterhoeven
2018-01-02 14:20   ` Geert Uytterhoeven
2018-01-02 21:52 ` Luc Van Oostenryck [this message]
2018-01-02 21:52   ` Luc Van Oostenryck

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=20180102215245.ajrvyctrffqiynhi@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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