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

Tudor.Ambarus at microchip.com Tudor.Ambarus at microchip.com
Sun Jul 12 23:55:02 EDT 2020


On 6/23/20 9:30 PM, Pratyush Yadav wrote:
> 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.


More information about the Linux-mediatek mailing list