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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 *
/build/stage/linux/drivers/spi/spi-intel.c:808:38: note: expected ‘const struct intel_spi_mem_op *’ but argument is of type ‘struct spi_mem *’
/build/stage/linux/drivers/spi/spi-intel.c:808:45: error: passing argument 3 of ‘iop->exec_op’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  808 |         ret = iop->exec_op(ispi, desc->mem, iop, &op);
      |                                             ^~~
      |                                             |
      |                                             const struct intel_spi_mem_op *
/build/stage/linux/drivers/spi/spi-intel.c:808:45: note: expected ‘const struct spi_mem_op *’ but argument is of type ‘const struct intel_spi_mem_op *’
/build/stage/linux/drivers/spi/spi-intel.c:808:15: error: too many arguments to function ‘iop->exec_op’
  808 |         ret = iop->exec_op(ispi, desc->mem, iop, &op);
      |               ^~~
/build/stage/linux/drivers/spi/spi-intel.c: In function ‘intel_spi_dirmap_write’:
/build/stage/linux/drivers/spi/spi-intel.c:824:38: error: passing argument 2 of ‘iop->exec_op’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  824 |         ret = iop->exec_op(ispi, desc->mem, iop, &op);
      |                                  ~~~~^~~~~
      |                                      |
      |                                      struct spi_mem *
/build/stage/linux/drivers/spi/spi-intel.c:824:38: note: expected ‘const struct intel_spi_mem_op *’ but argument is of type ‘struct spi_mem *’
/build/stage/linux/drivers/spi/spi-intel.c:824:45: error: passing argument 3 of ‘iop->exec_op’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  824 |         ret = iop->exec_op(ispi, desc->mem, iop, &op);
      |                                             ^~~
      |                                             |
      |                                             const struct intel_spi_mem_op *
/build/stage/linux/drivers/spi/spi-intel.c:824:45: note: expected ‘const struct spi_mem_op *’ but argument is of type ‘const struct intel_spi_mem_op *’
/build/stage/linux/drivers/spi/spi-intel.c:824:15: error: too many arguments to function ‘iop->exec_op’
  824 |         ret = iop->exec_op(ispi, desc->mem, iop, &op);
      |               ^~~
cc1: all warnings being treated as errors

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux