Skip to content
Snippets Groups Projects
  • Horia Geantă's avatar
    crypto: caam - make dev_dbg() format string constant · ad41641e
    Horia Geantă authored
    
    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>
    ad41641e
Code owners
Assign users and groups as approvers for specific file changes. Learn more.