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]
Message-ID: <20191020130440.k5o5vxwuzb354e7w@earth.universe>
Date:   Sun, 20 Oct 2019 15:04:40 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     "Ben Dooks (Codethink)" <ben.dooks@...ethink.co.uk>
Cc:     linux-kernel@...ts.codethink.co.uk,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Ludovic Desroches <ludovic.desroches@...rochip.com>,
        linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: reset: fix __le32 cast in reset code

Hi,

On Tue, Oct 15, 2019 at 04:54:14PM +0100, Ben Dooks (Codethink) wrote:
> The writel() takes standard integers, not __le32 so
> fix the following sparse warnings by removing the
> cpu_to_le32() calls.
> 
> drivers/power/reset/at91-reset.c:134:9: warning: cast from restricted __le32
> drivers/power/reset/at91-reset.c:143:9: warning: cast from restricted __le32
> 
> This has made no code changes, the md5sums pre and post applying
> this patch are the same. The at91 should be natively little endian
> anyway.
> 
> Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
> ---

Thanks, queued.

-- Sebastian

> Cc: Sebastian Reichel <sre@...nel.org>
> Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>
> Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@...rochip.com>
> Cc: linux-pm@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org
> ---
>  drivers/power/reset/at91-reset.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
> index 44ca983a49a1..d94e3267c3b6 100644
> --- a/drivers/power/reset/at91-reset.c
> +++ b/drivers/power/reset/at91-reset.c
> @@ -131,7 +131,7 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,
>  static int sama5d3_restart(struct notifier_block *this, unsigned long mode,
>  			   void *cmd)
>  {
> -	writel(cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST),
> +	writel(AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST,
>  	       at91_rstc_base);
>  
>  	return NOTIFY_DONE;
> @@ -140,9 +140,7 @@ static int sama5d3_restart(struct notifier_block *this, unsigned long mode,
>  static int samx7_restart(struct notifier_block *this, unsigned long mode,
>  			 void *cmd)
>  {
> -	writel(cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PROCRST),
> -	       at91_rstc_base);
> -
> +	writel(AT91_RSTC_KEY | AT91_RSTC_PROCRST, at91_rstc_base);
>  	return NOTIFY_DONE;
>  }
>  
> -- 
> 2.23.0
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ