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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 25 Jul 2022 15:52:02 +0300
From:   Vadym Kochan <vadym.kochan@...ision.eu>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     broonie@...nel.org, enachman@...vell.com,
        linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
        lnoam@...vell.com
Subject: Re: [PATCH 4/7] spi: a3700: support BE for AC5 SPI driver

Hi Christophe,

On Sat, Jul 23, 2022 at 12:49:55PM +0200, Christophe JAILLET wrote:
> Le 23/07/2022 à 12:22, Vadym Kochan a écrit :
> > From: Noam <lnoam-eYqpPyKDWXRBDgjK7y7TUQ@...lic.gmane.org>
> > 
> > Tested-by: Raz Adashi <raza-eYqpPyKDWXRBDgjK7y7TUQ@...lic.gmane.org>
> > Reviewed-by: Raz Adashi <raza-eYqpPyKDWXRBDgjK7y7TUQ@...lic.gmane.org>
> > Signed-off-by: Vadym Kochan <vadym.kochan-Nq3fbkz6jlnsq35pWSNszA@...lic.gmane.org>
> > ---
> >   drivers/spi/spi-armada-3700.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
> > index d8cc4b270644..386c7959ea93 100644
> > --- a/drivers/spi/spi-armada-3700.c
> > +++ b/drivers/spi/spi-armada-3700.c
> > @@ -497,7 +497,7 @@ static int a3700_spi_fifo_write(struct a3700_spi *a3700_spi)
> >   	while (!a3700_is_wfifo_full(a3700_spi) && a3700_spi->buf_len) {
> >   		val = *(u32 *)a3700_spi->tx_buf;
> > -		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, val);
> > +		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, cpu_to_le32(val));
> >   		a3700_spi->buf_len -= 4;
> >   		a3700_spi->tx_buf += 4;
> >   	}
> > @@ -519,7 +519,7 @@ static int a3700_spi_fifo_read(struct a3700_spi *a3700_spi)
> >   	while (!a3700_is_rfifo_empty(a3700_spi) && a3700_spi->buf_len) {
> >   		val = spireg_read(a3700_spi, A3700_SPI_DATA_IN_REG);
> >   		if (a3700_spi->buf_len >= 4) {
> > -
> > +			val = cpu_to_le32(val);
> 
> Hi,
> 
> even if both should generate the same code, should'nt this be le32_to_cpu()?
> 
> CJ
> 
> >   			memcpy(a3700_spi->rx_buf, &val, 4);
> >   			a3700_spi->buf_len -= 4;
> 

Thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ