device and dynamic_debug: Use dev_vprintk_emit and dev_printk_emit
Convert direct calls of vprintk_emit and printk_emit to the dev_ equivalents. Make create_syslog_header static. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David S. Miller <davem@davemloft.net> Tested-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
05e4e5b87a
commit
666f355f38
@@ -6429,16 +6429,12 @@ static int __netdev_printk(const char *level, const struct net_device *dev,
|
||||
int r;
|
||||
|
||||
if (dev && dev->dev.parent) {
|
||||
char dict[128];
|
||||
size_t dictlen = create_syslog_header(dev->dev.parent,
|
||||
dict, sizeof(dict));
|
||||
|
||||
r = printk_emit(0, level[1] - '0',
|
||||
dictlen ? dict : NULL, dictlen,
|
||||
"%s %s %s: %pV",
|
||||
dev_driver_string(dev->dev.parent),
|
||||
dev_name(dev->dev.parent),
|
||||
netdev_name(dev), vaf);
|
||||
r = dev_printk_emit(level[1] - '0',
|
||||
dev->dev.parent,
|
||||
"%s %s %s: %pV",
|
||||
dev_driver_string(dev->dev.parent),
|
||||
dev_name(dev->dev.parent),
|
||||
netdev_name(dev), vaf);
|
||||
} else if (dev) {
|
||||
r = printk("%s%s: %pV", level, netdev_name(dev), vaf);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user