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
| ||
|
Message-ID: <20140722232748.GA19112@kroah.com> Date: Tue, 22 Jul 2014 16:27:48 -0700 From: Greg KH <gregkh@...uxfoundation.org> To: Jean-Michel Hautbois <jean-michel.hautbois@...alys.com> Cc: linux-kernel <linux-kernel@...r.kernel.org>, arnd@...db.de, Stefan Roese <sr@...x.de> Subject: Re: [PATCH v3] Lattice ECP3 FPGA: Correct endianness On Mon, Jul 21, 2014 at 07:00:37PM +0200, Jean-Michel Hautbois wrote: > This code corrects endianness and avoids a sparse error. > Tested with Lattice ECP3-35 with Freescale i.MX6. > It also sends uevent in order to load it. > > Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@...alys.com> > --- > drivers/misc/lattice-ecp3-config.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/drivers/misc/lattice-ecp3-config.c > b/drivers/misc/lattice-ecp3-config.c > index bb26f08..f77ff4b 100644 > --- a/drivers/misc/lattice-ecp3-config.c > +++ b/drivers/misc/lattice-ecp3-config.c > @@ -16,6 +16,7 @@ > #include <linux/spi/spi.h> > #include <linux/platform_device.h> > #include <linux/delay.h> > +#include <asm/unaligned.h> > > #define FIRMWARE_NAME "lattice-ecp3.bit" > > @@ -92,8 +93,8 @@ static void firmware_load(const struct firmware *fw, > void *context) > /* Trying to speak with the FPGA via SPI... */ > txbuf[0] = FPGA_CMD_READ_ID; > ret = spi_write_then_read(spi, txbuf, 8, rxbuf, rx_len); > - dev_dbg(&spi->dev, "FPGA JTAG ID=%08x\n", *(u32 *)&rxbuf[4]); > - jedec_id = *(u32 *)&rxbuf[4]; > + jedec_id = get_unaligned_be32(&rxbuf[4]); > + dev_dbg(&spi->dev, "FPGA JTAG ID=%08x\n", jedec_id); All tabs are converted to spaces, making this patch impossible to apply :( Can you fix that up and resend? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists