u-boot/drivers/mtd
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
..
nand spl: fit: nand: fix fit loading in case of bad blocks 2020-07-08 17:21:46 -04:00
onenand common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spi sandbox: spi: sandbox_sf_state_name() is required 2020-07-09 18:57:21 -06:00
ubi common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
ubispl common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
altera_qspi.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
cfi_flash.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
cfi_mtd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hbmc-am654.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
jedec_flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig configs: migrate CONFIG_SYS_MTDPARTS_RUNTIME to defconfigs 2020-05-08 09:16:26 -04:00
Makefile mtd: Makefile: deep cleanup 2019-12-04 17:10:51 -05:00
mtd-uclass.c mtd: uclass: add probe function 2018-10-02 22:12:31 +05:30
mtd_uboot.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mtdconcat.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
mtdcore.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
mw_eeprom.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pic32_flash.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
renesas_rpc_hf.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
st_smi.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
stm32_flash.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00