Thread (43 messages) 43 messages, 5 authors, 2020-09-29

Re: [PATCH v10 01/17] spi: spi-mem: allow specifying whether an op is DTR or not

From: <hidden>
Date: 2020-07-13 03:55:19
Also in: linux-mediatek, linux-spi, lkml

On 6/23/20 9:30 PM, Pratyush Yadav wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 9a86cc27fcc0..93e255287ab9 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -156,6 +156,9 @@ bool spi_mem_default_supports_op(struct spi_mem *mem,
                                   op->data.dir == SPI_MEM_DATA_OUT))
                return false;

+       if (op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr)
+               return false;

I would put this check the first thing in the function to exit sooner
and avoid the rest of the checks, that would become superfluous.

Anyway this is just a nit.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help