public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	arnd@arndb.de, Stefan Roese <sr@denx.de>
Subject: Re: [PATCH v3] Lattice ECP3 FPGA: Correct endianness
Date: Tue, 22 Jul 2014 16:27:48 -0700	[thread overview]
Message-ID: <20140722232748.GA19112@kroah.com> (raw)
In-Reply-To: <CAL8zT=jfAPG3P7FW1Akp1Q2pbji=Vt_6jUJJzCFvp8F2uBs+fg@mail.gmail.com>

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

      reply	other threads:[~2014-07-22 23:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 17:00 [PATCH v3] Lattice ECP3 FPGA: Correct endianness Jean-Michel Hautbois
2014-07-22 23:27 ` Greg KH [this message]

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=20140722232748.GA19112@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=jean-michel.hautbois@vodalys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sr@denx.de \
    /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