aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:10:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:10:44 -0400
commit06d2fe153b9b35e57221e35831a26918f462db68 (patch)
treef77cb72dfba7f2a47ceb93e120abd9399a24a1b9 /net/core/dev.c
parent3aebd34b1200a902a8662da8845824a02f00772e (diff)
parente0f21e6d52cc245e7d4f7e02ca4b7b6571660ec2 (diff)
Merge tag 'driver-core-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core merge from Greg Kroah-Hartman: "Here is the big driver core update for 3.7-rc1. A number of firmware_class.c updates (as you saw a month or so ago), and some hyper-v updates and some printk fixes as well. All patches that are outside of the drivers/base area have been acked by the respective maintainers, and have all been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'driver-core-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (95 commits) memory: tegra{20,30}-mc: Fix reading incorrect register in mc_readl() device.h: Add missing inline to #ifndef CONFIG_PRINTK dev_vprintk_emit memory: emif: Add ifdef CONFIG_DEBUG_FS guard for emif_debugfs_[init|exit] Documentation: Fixes some translation error in Documentation/zh_CN/gpio.txt Documentation: Remove 3 byte redundant code at the head of the Documentation/zh_CN/arm/booting Documentation: Chinese translation of Documentation/video4linux/omap3isp.txt device and dynamic_debug: Use dev_vprintk_emit and dev_printk_emit dev: Add dev_vprintk_emit and dev_printk_emit netdev_printk/netif_printk: Remove a superfluous logging colon netdev_printk/dynamic_netdev_dbg: Directly call printk_emit dev_dbg/dynamic_debug: Update to use printk_emit, optimize stack driver-core: Shut up dev_dbg_reatelimited() without DEBUG tools/hv: Parse /etc/os-release tools/hv: Check for read/write errors tools/hv: Fix exit() error code tools/hv: Fix file handle leak Tools: hv: Implement the KVP verb - KVP_OP_GET_IP_INFO Tools: hv: Rename the function kvp_get_ip_address() Tools: hv: Implement the KVP verb - KVP_OP_SET_IP_INFO Tools: hv: Add an example script to configure an interface ...
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 89e33a5d4d93..36c4a0cdb6c1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6424,22 +6424,26 @@ const char *netdev_drivername(const struct net_device *dev)
6424 return empty; 6424 return empty;
6425} 6425}
6426 6426
6427int __netdev_printk(const char *level, const struct net_device *dev, 6427static int __netdev_printk(const char *level, const struct net_device *dev,
6428 struct va_format *vaf) 6428 struct va_format *vaf)
6429{ 6429{
6430 int r; 6430 int r;
6431 6431
6432 if (dev && dev->dev.parent) 6432 if (dev && dev->dev.parent) {
6433 r = dev_printk(level, dev->dev.parent, "%s: %pV", 6433 r = dev_printk_emit(level[1] - '0',
6434 netdev_name(dev), vaf); 6434 dev->dev.parent,
6435 else if (dev) 6435 "%s %s %s: %pV",
6436 dev_driver_string(dev->dev.parent),
6437 dev_name(dev->dev.parent),
6438 netdev_name(dev), vaf);
6439 } else if (dev) {
6436 r = printk("%s%s: %pV", level, netdev_name(dev), vaf); 6440 r = printk("%s%s: %pV", level, netdev_name(dev), vaf);
6437 else 6441 } else {
6438 r = printk("%s(NULL net_device): %pV", level, vaf); 6442 r = printk("%s(NULL net_device): %pV", level, vaf);
6443 }
6439 6444
6440 return r; 6445 return r;
6441} 6446}
6442EXPORT_SYMBOL(__netdev_printk);
6443 6447
6444int netdev_printk(const char *level, const struct net_device *dev, 6448int netdev_printk(const char *level, const struct net_device *dev,
6445 const char *format, ...) 6449 const char *format, ...)
@@ -6454,6 +6458,7 @@ int netdev_printk(const char *level, const struct net_device *dev,
6454 vaf.va = &args; 6458 vaf.va = &args;
6455 6459
6456 r = __netdev_printk(level, dev, &vaf); 6460 r = __netdev_printk(level, dev, &vaf);
6461
6457 va_end(args); 6462 va_end(args);
6458 6463
6459 return r; 6464 return r;
@@ -6473,6 +6478,7 @@ int func(const struct net_device *dev, const char *fmt, ...) \
6473 vaf.va = &args; \ 6478 vaf.va = &args; \
6474 \ 6479 \
6475 r = __netdev_printk(level, dev, &vaf); \ 6480 r = __netdev_printk(level, dev, &vaf); \
6481 \
6476 va_end(args); \ 6482 va_end(args); \
6477 \ 6483 \
6478 return r; \ 6484 return r; \