lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 2 Jan 2018 22:52:56 +0100
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m32r: fix readl/writel prototypes

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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ