From: Stefan Roese <sr@denx.de>
To: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Cc: Joe Perches <joe@perches.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Lattice ECP3 FPGA: Correct endianness
Date: Fri, 04 Jul 2014 15:14:49 +0200 [thread overview]
Message-ID: <53B6A8C9.2030705@denx.de> (raw)
In-Reply-To: <CAPwkgkOjr6y2M8FMytx6Ooz_LJwUtDckU1Q2piuV0mR0vOnD1w@mail.gmail.com>
On 04.07.2014 15:11, Jean-Michel Hautbois wrote:
> 2014-07-03 18:12 GMT+02:00 Joe Perches <joe@perches.com>:
>> trivial:
>>
>>> diff --git a/drivers/misc/lattice-ecp3-config.c
>> []
>>> @@ -165,8 +165,8 @@ static void firmware_load(const struct firmware
>>> *fw, void *context)
>>>
>>> txbuf[0] = FPGA_CMD_READ_STATUS;
>>> ret = spi_write_then_read(spi, txbuf, 8, rxbuf, rx_len);
>>> - dev_dbg(&spi->dev, "FPGA Status=%08x\n", *(u32 *)&rxbuf[4]);
>>> - status = *(u32 *)&rxbuf[4];
>>> + dev_dbg(&spi->dev, "FPGA Status=%08x\n", be32_to_cpu(*(u32 *)&rxbuf[4]));
>>> + status = be32_to_cpu(*(u32 *)&rxbuf[4]);
>>
>> This should emit a sparse error.
>> It'd be simpler as:
>>
>> status = be32_to_cpu(*(__be32 *)&rxbuf[4]);
>> dev_dbg(&spi->dev, "FPGA Status=%08x\n", status);
>>
>>
>
> OK, do you want me to send a new patch including this modification ?
Yes. Please send a v2 patch version. You can add my "Acked-by:.." to the
new version.
Thanks,
Stefan
next prev parent reply other threads:[~2014-07-04 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 15:54 [PATCH] Lattice ECP3 FPGA: Correct endianness Jean-Michel Hautbois
2014-07-03 15:59 ` Stefan Roese
2014-07-03 16:12 ` Joe Perches
2014-07-04 13:11 ` Jean-Michel Hautbois
2014-07-04 13:14 ` Stefan Roese [this message]
2014-07-04 14:58 ` Geert Uytterhoeven
2014-07-04 15:16 ` 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=53B6A8C9.2030705@denx.de \
--to=sr@denx.de \
--cc=jean-michel.hautbois@vodalys.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/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.