[PATCH v2 20/27] spi: spi-mem: Estimate the time taken by operations

Mark Brown broonie at kernel.org
Fri Jan 10 04:42:47 PST 2025


On Tue, Dec 24, 2024 at 06:06:05PM +0100, Miquel Raynal wrote:
> In the SPI-NAND layer, we currently make list of operation variants from
> the fastest one to the slowest and there is a bit of logic in the core
> to go over them and pick the first one that is supported by the
> controller, ie. the fastest one among the supported ops.

This breaks the build:

/build/stage/linux/drivers/spi/spi-mem.c:580:5: error: conflicting types for ‘spi_mem_calc_op_duration’; have ‘u64(struct spi_mem_op *)’ {aka ‘long long unsigned int(struct spi_mem_op *)’}
  580 | u64 spi_mem_calc_op_duration(struct spi_mem_op *op)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/stage/linux/drivers/spi/spi-mem.c:12:
/build/stage/linux/include/linux/spi/spi-mem.h:427:5: note: previous declaration of ‘spi_mem_calc_op_duration’ with type ‘u64(struct spi_mem *, struct spi_mem_op *)’ {aka ‘long long unsigned int(struct spi_mem *, struct spi_mem_op *)’}
  427 | u64 spi_mem_calc_op_duration(struct spi_mem *mem, struct spi_mem_op *op);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/stage/linux/include/linux/linkage.h:7,
                 from /build/stage/linux/arch/arm/include/asm/bug.h:5,
                 from /build/stage/linux/include/linux/bug.h:5,
                 from /build/stage/linux/include/linux/thread_info.h:13,
                 from /build/stage/linux/include/linux/sched.h:14,
                 from /build/stage/linux/include/linux/ratelimit.h:6,
                 from /build/stage/linux/include/linux/dev_printk.h:16,
                 from /build/stage/linux/include/linux/device.h:15,
                 from /build/stage/linux/include/linux/dmaengine.h:8,
                 from /build/stage/linux/drivers/spi/spi-mem.c:8:
/build/stage/linux/drivers/spi/spi-mem.c:593:19: error: conflicting types for ‘spi_mem_calc_op_duration’; have ‘u64(struct spi_mem_op *)’ {aka ‘long long unsigned int(struct spi_mem_op *)’}
  593 | EXPORT_SYMBOL_GPL(spi_mem_calc_op_duration);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
/build/stage/linux/include/linux/export.h:56:28: note: in definition of macro ‘__EXPORT_SYMBOL’
   56 |         extern typeof(sym) sym;                                 \
      |                            ^~~
/build/stage/linux/include/linux/export.h:69:41: note: in expansion of macro ‘_EXPORT_SYMBOL’
   69 | #define EXPORT_SYMBOL_GPL(sym)          _EXPORT_SYMBOL(sym, "GPL")
      |                                         ^~~~~~~~~~~~~~
/build/stage/linux/drivers/spi/spi-mem.c:593:1: note: in expansion of macro ‘EXPORT_SYMBOL_GPL’
  593 | EXPORT_SYMBOL_GPL(spi_mem_calc_op_duration);
      | ^~~~~~~~~~~~~~~~~
/build/stage/linux/include/linux/spi/spi-mem.h:427:5: note: previous declaration of ‘spi_mem_calc_op_duration’ with type ‘u64(struct spi_mem *, struct spi_mem_op *)’ {aka ‘long long unsigned int(struct spi_mem *, struct spi_mem_op *)’}
  427 | u64 spi_mem_calc_op_duration(struct spi_mem *mem, struct spi_mem_op *op);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20250110/777a7536/attachment.sig>


More information about the Linux-mediatek mailing list