Skip to content
  • Joe Perches's avatar
    dev_dbg/dynamic_debug: Update to use printk_emit, optimize stack · 798efc60
    Joe Perches authored
    commit c4e00daa
    ("driver-core: extend dev_printk() to pass structured data")
    changed __dev_printk and broke dynamic-debug's ability to control the
    dynamic prefix of dev_dbg(dev,..).
    
    commit af7f2158
    
    
    ("drivers-core: make structured logging play nice with dynamic-debug")
    made a minimal correction.
    
    The current dynamic debug code uses up to 3 recursion levels via %pV.
    This can consume quite a bit of stack.  Directly call printk_emit to
    reduce the recursion depth.
    
    These changes include:
    
    dev_dbg:
    o Create and use function create_syslog_header to format the syslog
      header for printk_emit uses.
    o Call create_syslog_header and neaten __dev_printk
    o Make __dev_printk static not global
    o Remove include header declaration of __dev_printk
    o Remove now unused EXPORT_SYMBOL() of __dev_printk
    o Whitespace neatening
    
    dynamic_dev_dbg:
    o Remove KERN_DEBUG from dynamic_emit_prefix
    o Call create_syslog_header and printk_emit
    o Whitespace neatening
    
    Signed-off-by: default avatarJoe Perches <joe@perches.com>
    Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
    Tested-by: default avatarJim Cromie <jim.cromie@gmail.com>
    Acked-by: default avatarJason Baron <jbaron@redhat.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    798efc60