Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1580744 > unrolled thread
| Started by | Mark Brown <broonie@kernel.org> |
|---|---|
| First post | 2017-02-14 19:30 +0100 |
| Last post | 2017-02-14 19:30 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/2] spi: imx: dynamic burst length adjust for PIO mode Mark Brown <broonie@kernel.org> - 2017-02-14 19:30 +0100
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2017-02-14 19:30 +0100 |
| Subject | Re: [PATCH 1/2] spi: imx: dynamic burst length adjust for PIO mode |
| Message-ID | <taQ1s-5hv-27@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Feb 08, 2017 at 03:20:27PM +0900, Jiada Wang wrote:
This looks basically fine, a couple of fairly minor things here:
> + for (i = 0; i < transfer->len / 4; i++) {
> + u8 temp;
> +
> + temp = *(buf + i * 4);
> + *(buf + i * 4) = *(buf + i * 4 + 3);
> + *(buf + i * 4 + 3) = temp;
Should this be using one of the cpu_to_ functions? It's a bit unclear
what the goal is here and if it'll work if the kernel is big endian
(which people do do with i.MX systems IIRC).
> + if (spi_imx->bpw_w == 1)
> + spi_imx_buf_rx_u8(spi_imx);
> + else if (spi_imx->bpw_w == 2)
> + spi_imx_buf_rx_u16(spi_imx);
switch statement please.
> + if (spi_imx->dynamic_burst) {
> + spi_imx->count_index =
> + spi_imx->count > MX51_ECSPI_CTRL_MAX_BURST ?
> + spi_imx->count % MX51_ECSPI_CTRL_MAX_BURST :
> + spi_imx->count % sizeof(u32);
Just write a normal if statement please, it's easier to read.
Back to top | Article view | linux.kernel
csiph-web