All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jean-Michel Hautbois <jhautbois@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Stefan Roese <sr@denx.de>
Subject: Re: [PATCH v4] Lattice ECP3 FPGA: Correct endianness
Date: Wed, 23 Jul 2014 16:58:50 -0700	[thread overview]
Message-ID: <20140723235850.GA1241@kroah.com> (raw)
In-Reply-To: <CAL8zT=g5aO1aNbADQ9Usv6J952D5t8_NvmDozTjvtczq-BGbrw@mail.gmail.com>

On Wed, Jul 23, 2014 at 11:39:35AM +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..2c86319 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);

Your email client ate all the tabs and spit out spaces and then
line-wrapped the patch, making it impossible to apply :(

Can you fix it up and resend it in a format we can use?

thanks,

greg k-h

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23  9:39 [PATCH v4] Lattice ECP3 FPGA: Correct endianness Jean-Michel Hautbois
2014-07-23 23:58 ` Greg KH [this message]
2014-07-24  6:53   ` Jean-Michel Hautbois
2014-07-24  7:37     ` Greg KH
2014-07-24  8:21       ` Jean-Michel Hautbois

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=20140723235850.GA1241@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=jhautbois@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.