[PATCH 2/2] spi: intel: Implement dirmap hooks

Mika Westerberg mika.westerberg at linux.intel.com
Tue Apr 19 23:25:48 PDT 2022


Hi Mark,

On Tue, Apr 19, 2022 at 01:12:59PM +0100, Mark Brown wrote:
> On Mon, Apr 11, 2022 at 02:31:58PM +0300, Mika Westerberg wrote:
> > Currently the driver goes over the supported opcodes list each time
> > ->exec_op() is called and finds the suitable for the given operation.
> > This consumes unnecessary amount of CPU cycles because the operation is
> > always the same. For this reason populate dirmap hooks for the driver so
> > that we cache the selected operation and then simply call it on each
> > read/write.
> 
> This breaks an x86 allmodconfig build:
> 
> /build/stage/linux/drivers/spi/spi-intel.c: In function ‘intel_spi_dirmap_read’:
> /build/stage/linux/drivers/spi/spi-intel.c:808:38: error: passing argument 2 of ‘iop->exec_op’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>   808 |         ret = iop->exec_op(ispi, desc->mem, iop, &op);
>       |                                  ~~~~^~~~~
>       |                                      |
>       |                                      struct spi_mem *

Oh, indeed :( I have another patch adding second chip select support
that adds the parameter and then I changed the ordering, and of course
forgot to reflect that to this patch. I will fix this up and re-send.
Sorry about this.



More information about the linux-mtd mailing list