This patch also squashes upstream commit 72e6841608b9 ("spi: spi-mem: Fix build error without CONFIG_SPI_MEM")' in the current patch as commit 46109648052f ("spi: spi-mem: export spi_mem_default_supports_op()")' introduced below build error when built without CONFIG_SPI_MEM:
This puts function definition directly into header file; I don't think that will work when multiple files include it.
Adding "static inline" is the usual solution for this.