u-boot/drivers/mtd/spi
Heinrich Schuchardt a6cfc34e36 sandbox: spi: sandbox_sf_state_name() is required
Compiling drivers/mtd/spi/sandbox.c fails when compiled with
CONFIG_LOG=n:

In file included from include/common.h:20,
                 from drivers/mtd/spi/sandbox.c:13:
drivers/mtd/spi/sandbox.c:295:15: error: format ‘%s’ expects argument of
type ‘char *’, but argument 7 has type ‘int’ [-Werror=format=]
  295 |   log_content(" cmd: transition to %s state\n",
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:37:21: note: in definition of macro ‘pr_fmt’
   37 | #define pr_fmt(fmt) fmt
      |                     ^~~
include/log.h:128:30: note: in expansion of macro ‘log_nop’
  128 | #define log_content(_fmt...) log_nop(LOG_CATEGORY, \
      |                              ^~~~~~~
drivers/mtd/spi/sandbox.c:295:3: note: in expansion of macro
‘log_content’
  295 |   log_content(" cmd: transition to %s state\n",
      |   ^~~~~~~~~~~
drivers/mtd/spi/sandbox.c:295:37: note: format string is defined here
  295 |   log_content(" cmd: transition to %s state\n",
      |                                    ~^
      |                                     |
      |                                     char *
      |                                    %d

Supply function sandbox_sf_state_name() independent of CONFIG_LOG.

Fixes: c3aed5db59 ("sandbox: spi: Add more logging")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-09 18:57:21 -06:00
..
fsl_espi_spl.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
Kconfig mtd: spi: SPI_FLASH_MTD depends on MTD 2019-12-04 17:10:51 -05:00
Makefile spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
sandbox.c sandbox: spi: sandbox_sf_state_name() is required 2020-07-09 18:57:21 -06:00
sf-uclass.c sf: Drop spl_flash_get_sw_write_prot 2020-06-01 17:55:24 +05:30
sf_dataflash.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
sf_internal.h sf: Drop spl_flash_get_sw_write_prot 2020-06-01 17:55:24 +05:30
sf_mtd.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
sf_probe.c spi: Convert CONFIG_DM_SPI* to CONFIG_$(SPL_TPL_)DM_SPI* 2020-06-29 13:34:43 -04:00
spi-nor-core.c mtd: spi: Call sst_write in _write ops 2020-06-01 17:55:24 +05:30
spi-nor-ids.c sf: Add Macronix MX25R6435F SPI NOR flash to flash parameters array 2020-05-11 01:30:49 +05:30
spi-nor-tiny.c sf: Drop spl_flash_get_sw_write_prot 2020-06-01 17:55:24 +05:30