Skip to content
Snippets Groups Projects
Commit ad41641e authored by Horia Geantă's avatar Horia Geantă
Browse files

crypto: caam - make dev_dbg() format string constant


Changing dev_info() to dev_dbg() has exposed an issue with the format
string, which is not constant - and leads to compilation failure in case
CONFIG_DYNAMIC_DEBUG=y:

In file included from ./include/linux/printk.h:334:0,
                 from ./include/linux/kernel.h:14,
                 from drivers/crypto/caam/compat.h:9,
                 from drivers/crypto/caam/sm_test.c:23:
drivers/crypto/caam/sm_test.c: In function 'key_display':
./include/linux/dynamic_debug.h:75:16: error: initializer element is not constant
  static struct _ddebug  __aligned(8)   \
                ^
./include/linux/dynamic_debug.h:111:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
  DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
  ^
./include/linux/dynamic_debug.h:133:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
./include/linux/device.h:1351:2: note: in expansion of macro 'dynamic_dev_dbg'
  dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
  ^
drivers/crypto/caam/sm_test.c:77:2: note: in expansion of macro 'dev_dbg'
  dev_dbg(dev, label);
  ^
./include/linux/dynamic_debug.h:75:16: error: (near initialization for 'descriptor.format')
  static struct _ddebug  __aligned(8)   \
                ^
./include/linux/dynamic_debug.h:111:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
  DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
  ^
./include/linux/dynamic_debug.h:133:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^
./include/linux/device.h:1351:2: note: in expansion of macro 'dynamic_dev_dbg'
  dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
  ^
drivers/crypto/caam/sm_test.c:77:2: note: in expansion of macro 'dev_dbg'
  dev_dbg(dev, label);
  ^
make[3]: *** [drivers/crypto/caam/sm_test.o] Error 1

Fixes: c59d342d ("crypto: caam - lower SM test verbosity")
Suggested-by: default avatarLeonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: default avatarLeonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: default avatarHoria Geantă <horia.geanta@nxp.com>
parent 3ffc16ac
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment