* [PATCH 0/4] Introduce and use printk pointer extension %pV
@ 2010-06-27 11:02 Joe Perches
2010-06-27 11:02 ` [PATCH 1/4] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format Joe Perches
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Joe Perches @ 2010-06-27 11:02 UTC (permalink / raw)
To: Andrew Morton, David Miller; +Cc: linux-kernel, netdev
Recursive printk can reduce the total image size of an x86 defconfig about 1%
by reducing duplicated KERN_<level> strings and centralizing the functions
used by macros in new separate functions.
Joe Perches (4):
vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
device.h drivers/base/core.c Convert dev_<level> logging macros to functions
netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
netdevice.h: Change netif_<level> macros to call netdev_<level> functions
drivers/base/core.c | 64 +++++++++++++++++++++++++
include/linux/device.h | 112 ++++++++++++++++++++++++++++++++++----------
include/linux/kernel.h | 5 ++
include/linux/netdevice.h | 56 ++++++++++++----------
lib/vsprintf.c | 9 ++++
net/core/dev.c | 62 +++++++++++++++++++++++++
6 files changed, 256 insertions(+), 52 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
2010-06-27 11:02 [PATCH 0/4] Introduce and use printk pointer extension %pV Joe Perches
@ 2010-06-27 11:02 ` Joe Perches
2010-06-27 11:02 ` [PATCH 2/4] device.h drivers/base/core.c Convert dev_<level> logging macros to functions Joe Perches
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2010-06-27 11:02 UTC (permalink / raw)
To: Andrew Morton, David Miller; +Cc: linux-kernel, netdev
Add the ability to print a format and va_list from a structure pointer
Allows __dev_printk to be implemented as a single printk while
minimizing string space duplication.
%pV should not be used without some mechanism to verify the
format and argument use ala __attribute__(format (printf(...))).
Signed-off-by: Joe Perches <joe@perches.com>
---
include/linux/kernel.h | 5 +++++
lib/vsprintf.c | 9 +++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 8317ec4..01dfc05 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -171,6 +171,11 @@ static inline void might_fault(void)
}
#endif
+struct va_format {
+ const char *fmt;
+ va_list *va;
+};
+
extern struct atomic_notifier_head panic_notifier_list;
extern long (*panic_blink)(long time);
NORET_TYPE void panic(const char * fmt, ...)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index b8a2f54..4ee19d0 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -980,6 +980,11 @@ char *uuid_string(char *buf, char *end, const u8 *addr,
* [0][1][2][3]-[4][5]-[6][7]-[8][9]-[10][11][12][13][14][15]
* little endian output byte order is:
* [3][2][1][0]-[5][4]-[7][6]-[8][9]-[10][11][12][13][14][15]
+ * - 'V' For a struct va_format which contains a format string * and va_list *,
+ * call vsnprintf(->format, *->va_list).
+ * Implements a "recursive vsnprintf".
+ * Do not use this feature without some mechanism to verify the
+ * correctness of the format string and va_list arguments.
*
* Note: The difference between 'S' and 'F' is that on ia64 and ppc64
* function pointers are really function descriptors, which contain a
@@ -1025,6 +1030,10 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
break;
case 'U':
return uuid_string(buf, end, ptr, spec, fmt);
+ case 'V':
+ return buf + vsnprintf(buf, end - buf,
+ ((struct va_format *)ptr)->fmt,
+ *(((struct va_format *)ptr)->va));
}
spec.flags |= SMALL;
if (spec.field_width == -1) {
--
1.7.1.337.g6068.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] device.h drivers/base/core.c Convert dev_<level> logging macros to functions
2010-06-27 11:02 [PATCH 0/4] Introduce and use printk pointer extension %pV Joe Perches
2010-06-27 11:02 ` [PATCH 1/4] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format Joe Perches
@ 2010-06-27 11:02 ` Joe Perches
2010-06-27 11:02 ` [PATCH 3/4] netdevice.h net/core/dev.c: Convert netdev_<level> " Joe Perches
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2010-06-27 11:02 UTC (permalink / raw)
To: Andrew Morton, David Miller; +Cc: linux-kernel, netdev
Reduces an x86 defconfig text and data ~55k, .6% smaller.
$ size vmlinux*
text data bss dec hex filename
7205273 716016 1366288 9287577 8db799 vmlinux
7258890 719768 1366288 9344946 8e97b2 vmlinux.master
Uses %pV and struct va_format
Format arguments are verified before printk
The dev_info macro is converted to _dev_info because there are
existing uses of variables named dev_info in the kernel tree
like drivers/net/pcmcia/pcnet_cs.c
A dev_info macro is created to call _dev_info
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/base/core.c | 64 +++++++++++++++++++++++++++
include/linux/device.h | 112 ++++++++++++++++++++++++++++++++++++-----------
2 files changed, 150 insertions(+), 26 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 9630fbd..38bbbd0 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1819,3 +1819,67 @@ void device_shutdown(void)
spin_unlock(&devices_kset->list_lock);
async_synchronize_full();
}
+
+/*
+ * Device logging functions
+ */
+
+#ifdef CONFIG_PRINTK
+
+static int __dev_printk(const char *level, const struct device *dev,
+ struct va_format *vaf)
+{
+ if (!dev)
+ return printk("%s(NULL device *): %pV", level, vaf);
+
+ return printk("%s%s %s: %pV",
+ level, dev_driver_string(dev), dev_name(dev), vaf);
+}
+
+int dev_printk(const char *level, const struct device *dev,
+ const char *fmt, ...)
+{
+ struct va_format vaf;
+ va_list args;
+ int r;
+
+ va_start(args, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &args;
+
+ r = __dev_printk(level, dev, &vaf);
+ va_end(args);
+
+ return r;
+}
+EXPORT_SYMBOL(dev_printk);
+
+#define define_dev_printk_level(func, kern_level) \
+int func(const struct device *dev, const char *fmt, ...) \
+{ \
+ struct va_format vaf; \
+ va_list args; \
+ int r; \
+ \
+ va_start(args, fmt); \
+ \
+ vaf.fmt = fmt; \
+ vaf.va = &args; \
+ \
+ r = __dev_printk(kern_level, dev, &vaf); \
+ va_end(args); \
+ \
+ return r; \
+} \
+EXPORT_SYMBOL(func);
+
+define_dev_printk_level(dev_emerg, KERN_EMERG);
+define_dev_printk_level(dev_alert, KERN_ALERT);
+define_dev_printk_level(dev_crit, KERN_CRIT);
+define_dev_printk_level(dev_err, KERN_ERR);
+define_dev_printk_level(dev_warn, KERN_WARNING);
+define_dev_printk_level(dev_notice, KERN_NOTICE);
+define_dev_printk_level(_dev_info, KERN_INFO);
+
+#endif
diff --git a/include/linux/device.h b/include/linux/device.h
index 0713e10..6a8276f 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -638,43 +638,103 @@ extern void sysdev_shutdown(void);
/* debugging and troubleshooting/diagnostic helpers. */
extern const char *dev_driver_string(const struct device *dev);
-#define dev_printk(level, dev, format, arg...) \
- printk(level "%s %s: " format , dev_driver_string(dev) , \
- dev_name(dev) , ## arg)
-
-#define dev_emerg(dev, format, arg...) \
- dev_printk(KERN_EMERG , dev , format , ## arg)
-#define dev_alert(dev, format, arg...) \
- dev_printk(KERN_ALERT , dev , format , ## arg)
-#define dev_crit(dev, format, arg...) \
- dev_printk(KERN_CRIT , dev , format , ## arg)
-#define dev_err(dev, format, arg...) \
- dev_printk(KERN_ERR , dev , format , ## arg)
-#define dev_warn(dev, format, arg...) \
- dev_printk(KERN_WARNING , dev , format , ## arg)
-#define dev_notice(dev, format, arg...) \
- dev_printk(KERN_NOTICE , dev , format , ## arg)
-#define dev_info(dev, format, arg...) \
- dev_printk(KERN_INFO , dev , format , ## arg)
+
+
+#ifdef CONFIG_PRINTK
+
+extern int dev_printk(const char *level, const struct device *dev,
+ const char *fmt, ...)
+ __attribute__ ((format (printf, 3, 4)));
+extern int dev_emerg(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int dev_alert(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int dev_crit(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int dev_err(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int dev_warn(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int dev_notice(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int _dev_info(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+
+#else
+
+static inline int dev_printk(const char *level, const struct device *dev,
+ const char *fmt, ...)
+ __attribute__ ((format (printf, 3, 4)));
+static inline int dev_printk(const char *level, const struct device *dev,
+ const char *fmt, ...)
+ { return 0; }
+
+static inline int dev_emerg(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+static inline int dev_emerg(const struct device *dev, const char *fmt, ...)
+ { return 0; }
+static inline int dev_crit(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+static inline int dev_crit(const struct device *dev, const char *fmt, ...)
+ { return 0; }
+static inline int dev_alert(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+static inline int dev_alert(const struct device *dev, const char *fmt, ...)
+ { return 0; }
+static inline int dev_err(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+static inline int dev_err(const struct device *dev, const char *fmt, ...)
+ { return 0; }
+static inline int dev_warn(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+static inline int dev_warn(const struct device *dev, const char *fmt, ...)
+ { return 0; }
+static inline int dev_notice(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+static inline int dev_notice(const struct device *dev, const char *fmt, ...)
+ { return 0; }
+static inline int _dev_info(const struct device *dev, const char *fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
+static inline int _dev_info(const struct device *dev, const char *fmt, ...)
+ { return 0; }
+
+#endif
+
+/*
+ * Stupid hackaround for existing uses of non-printk uses dev_info
+ *
+ * Note that the definition of dev_info below is actually _dev_info
+ * and a macro is used to avoid redefining dev_info
+ */
+
+#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
#if defined(DEBUG)
#define dev_dbg(dev, format, arg...) \
- dev_printk(KERN_DEBUG , dev , format , ## arg)
+ dev_printk(KERN_DEBUG, dev, format, ##arg)
#elif defined(CONFIG_DYNAMIC_DEBUG)
-#define dev_dbg(dev, format, ...) do { \
+#define dev_dbg(dev, format, ...) \
+do { \
dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
- } while (0)
+} while (0)
#else
-#define dev_dbg(dev, format, arg...) \
- ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
+#define dev_dbg(dev, format, arg...) \
+({ \
+ if (0) \
+ dev_printk(KERN_DEBUG, dev, format, ##arg); \
+ 0; \
+})
#endif
#ifdef VERBOSE_DEBUG
#define dev_vdbg dev_dbg
#else
-
-#define dev_vdbg(dev, format, arg...) \
- ({ if (0) dev_printk(KERN_DEBUG, dev, format, ##arg); 0; })
+#define dev_vdbg(dev, format, arg...) \
+({ \
+ if (0) \
+ dev_printk(KERN_DEBUG, dev, format, ##arg); \
+ 0; \
+})
#endif
/*
--
1.7.1.337.g6068.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
2010-06-27 11:02 [PATCH 0/4] Introduce and use printk pointer extension %pV Joe Perches
2010-06-27 11:02 ` [PATCH 1/4] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format Joe Perches
2010-06-27 11:02 ` [PATCH 2/4] device.h drivers/base/core.c Convert dev_<level> logging macros to functions Joe Perches
@ 2010-06-27 11:02 ` Joe Perches
2010-06-27 11:02 ` [PATCH 4/4] netdevice.h: Change netif_<level> macros to call netdev_<level> functions Joe Perches
2010-06-30 20:07 ` [PATCH 0/4] Introduce and use printk pointer extension %pV David Miller
4 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2010-06-27 11:02 UTC (permalink / raw)
To: Andrew Morton, David Miller; +Cc: linux-kernel, netdev
Reduces an x86 defconfig text and data ~2k.
text is smaller, data is larger.
$ size vmlinux*
text data bss dec hex filename
7198862 720112 1366288 9285262 8dae8e vmlinux
7205273 716016 1366288 9287577 8db799 vmlinux.device_h
Uses %pV and struct va_format
Format arguments are verified before printk
Signed-off-by: Joe Perches <joe@perches.com>
---
include/linux/netdevice.h | 36 ++++++++++++-------------
net/core/dev.c | 62 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+), 19 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 40291f3..7f3197d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2227,25 +2227,23 @@ static inline const char *netdev_name(const struct net_device *dev)
return dev->name;
}
-#define netdev_printk(level, netdev, format, args...) \
- dev_printk(level, (netdev)->dev.parent, \
- "%s: " format, \
- netdev_name(netdev), ##args)
-
-#define netdev_emerg(dev, format, args...) \
- netdev_printk(KERN_EMERG, dev, format, ##args)
-#define netdev_alert(dev, format, args...) \
- netdev_printk(KERN_ALERT, dev, format, ##args)
-#define netdev_crit(dev, format, args...) \
- netdev_printk(KERN_CRIT, dev, format, ##args)
-#define netdev_err(dev, format, args...) \
- netdev_printk(KERN_ERR, dev, format, ##args)
-#define netdev_warn(dev, format, args...) \
- netdev_printk(KERN_WARNING, dev, format, ##args)
-#define netdev_notice(dev, format, args...) \
- netdev_printk(KERN_NOTICE, dev, format, ##args)
-#define netdev_info(dev, format, args...) \
- netdev_printk(KERN_INFO, dev, format, ##args)
+extern int netdev_printk(const char *level, const struct net_device *dev,
+ const char *format, ...)
+ __attribute__ ((format (printf, 3, 4)));
+extern int netdev_emerg(const struct net_device *dev, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int netdev_alert(const struct net_device *dev, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int netdev_crit(const struct net_device *dev, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int netdev_err(const struct net_device *dev, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int netdev_warn(const struct net_device *dev, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int netdev_notice(const struct net_device *dev, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int netdev_info(const struct net_device *dev, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
#if defined(DEBUG)
#define netdev_dbg(__dev, format, args...) \
diff --git a/net/core/dev.c b/net/core/dev.c
index 2b3bf53..6f6e1f4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5790,6 +5790,68 @@ char *netdev_drivername(const struct net_device *dev, char *buffer, int len)
return buffer;
}
+static int __netdev_printk(const char *level, const struct net_device *dev,
+ struct va_format *vaf)
+{
+ int r;
+
+ if (dev && dev->dev.parent)
+ r = dev_printk(level, dev->dev.parent, "%s: %pV",
+ netdev_name(dev), vaf);
+ else if (dev)
+ r = printk("%s%s: %pV", level, netdev_name(dev), vaf);
+ else
+ r = printk("%s(NULL net_device): %pV", level, vaf);
+
+ return r;
+}
+
+int netdev_printk(const char *level, const struct net_device *dev,
+ const char *format, ...)
+{
+ struct va_format vaf;
+ va_list args;
+ int r;
+
+ va_start(args, format);
+
+ vaf.fmt = format;
+ vaf.va = &args;
+
+ r = __netdev_printk(level, dev, &vaf);
+ va_end(args);
+
+ return r;
+}
+EXPORT_SYMBOL(netdev_printk);
+
+#define define_netdev_printk_level(func, level) \
+int func(const struct net_device *dev, const char *fmt, ...) \
+{ \
+ int r; \
+ struct va_format vaf; \
+ va_list args; \
+ \
+ va_start(args, fmt); \
+ \
+ vaf.fmt = fmt; \
+ vaf.va = &args; \
+ \
+ r = __netdev_printk(level, dev, &vaf); \
+ va_end(args); \
+ \
+ return r; \
+} \
+EXPORT_SYMBOL(func);
+
+define_netdev_printk_level(netdev_emerg, KERN_EMERG);
+define_netdev_printk_level(netdev_alert, KERN_ALERT);
+define_netdev_printk_level(netdev_crit, KERN_CRIT);
+define_netdev_printk_level(netdev_err, KERN_ERR);
+define_netdev_printk_level(netdev_warn, KERN_WARNING);
+define_netdev_printk_level(netdev_notice, KERN_NOTICE);
+define_netdev_printk_level(netdev_info, KERN_INFO);
+
static void __net_exit netdev_exit(struct net *net)
{
kfree(net->dev_name_head);
--
1.7.1.337.g6068.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] netdevice.h: Change netif_<level> macros to call netdev_<level> functions
2010-06-27 11:02 [PATCH 0/4] Introduce and use printk pointer extension %pV Joe Perches
` (2 preceding siblings ...)
2010-06-27 11:02 ` [PATCH 3/4] netdevice.h net/core/dev.c: Convert netdev_<level> " Joe Perches
@ 2010-06-27 11:02 ` Joe Perches
2010-06-30 20:07 ` [PATCH 0/4] Introduce and use printk pointer extension %pV David Miller
4 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2010-06-27 11:02 UTC (permalink / raw)
To: Andrew Morton, David Miller; +Cc: linux-kernel, netdev
Reduces text ~300 bytes of text (woohoo!) in an x86 defconfig
$ size vmlinux*
text data bss dec hex filename
7198526 720112 1366288 9284926 8dad3e vmlinux
7198862 720112 1366288 9285262 8dae8e vmlinux.netdev
Signed-off-by: Joe Perches <joe@perches.com>
---
include/linux/netdevice.h | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7f3197d..489a612 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2291,20 +2291,26 @@ do { \
netdev_printk(level, (dev), fmt, ##args); \
} while (0)
+#define netif_level(level, priv, type, dev, fmt, args...) \
+do { \
+ if (netif_msg_##type(priv)) \
+ netdev_##level(dev, fmt, ##args); \
+} while (0)
+
#define netif_emerg(priv, type, dev, fmt, args...) \
- netif_printk(priv, type, KERN_EMERG, dev, fmt, ##args)
+ netif_level(emerg, priv, type, dev, fmt, ##args)
#define netif_alert(priv, type, dev, fmt, args...) \
- netif_printk(priv, type, KERN_ALERT, dev, fmt, ##args)
+ netif_level(alert, priv, type, dev, fmt, ##args)
#define netif_crit(priv, type, dev, fmt, args...) \
- netif_printk(priv, type, KERN_CRIT, dev, fmt, ##args)
+ netif_level(crit, priv, type, dev, fmt, ##args)
#define netif_err(priv, type, dev, fmt, args...) \
- netif_printk(priv, type, KERN_ERR, dev, fmt, ##args)
+ netif_level(err, priv, type, dev, fmt, ##args)
#define netif_warn(priv, type, dev, fmt, args...) \
- netif_printk(priv, type, KERN_WARNING, dev, fmt, ##args)
+ netif_level(warn, priv, type, dev, fmt, ##args)
#define netif_notice(priv, type, dev, fmt, args...) \
- netif_printk(priv, type, KERN_NOTICE, dev, fmt, ##args)
+ netif_level(notice, priv, type, dev, fmt, ##args)
#define netif_info(priv, type, dev, fmt, args...) \
- netif_printk(priv, type, KERN_INFO, (dev), fmt, ##args)
+ netif_level(info, priv, type, dev, fmt, ##args)
#if defined(DEBUG)
#define netif_dbg(priv, type, dev, format, args...) \
--
1.7.1.337.g6068.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] Introduce and use printk pointer extension %pV
2010-06-27 11:02 [PATCH 0/4] Introduce and use printk pointer extension %pV Joe Perches
` (3 preceding siblings ...)
2010-06-27 11:02 ` [PATCH 4/4] netdevice.h: Change netif_<level> macros to call netdev_<level> functions Joe Perches
@ 2010-06-30 20:07 ` David Miller
2010-07-03 5:32 ` David Miller
4 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2010-06-30 20:07 UTC (permalink / raw)
To: joe; +Cc: akpm, linux-kernel, netdev, greg
From: Joe Perches <joe@perches.com>
Date: Sun, 27 Jun 2010 04:02:32 -0700
> Recursive printk can reduce the total image size of an x86 defconfig about 1%
> by reducing duplicated KERN_<level> strings and centralizing the functions
> used by macros in new separate functions.
>
> Joe Perches (4):
> vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
> device.h drivers/base/core.c Convert dev_<level> logging macros to functions
> netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
> netdevice.h: Change netif_<level> macros to call netdev_<level> functions
I'm fine with this, thanks Joe.
Greg, could you ACK this and let me know if it's OK if it swings
through my net-next-2.6 tree?
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] Introduce and use printk pointer extension %pV
2010-06-30 20:07 ` [PATCH 0/4] Introduce and use printk pointer extension %pV David Miller
@ 2010-07-03 5:32 ` David Miller
2010-07-03 16:08 ` Greg KH
0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2010-07-03 5:32 UTC (permalink / raw)
To: joe; +Cc: akpm, linux-kernel, netdev, greg
From: David Miller <davem@davemloft.net>
Date: Wed, 30 Jun 2010 13:07:09 -0700 (PDT)
> From: Joe Perches <joe@perches.com>
> Date: Sun, 27 Jun 2010 04:02:32 -0700
>
>> Recursive printk can reduce the total image size of an x86 defconfig about 1%
>> by reducing duplicated KERN_<level> strings and centralizing the functions
>> used by macros in new separate functions.
>>
>> Joe Perches (4):
>> vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
>> device.h drivers/base/core.c Convert dev_<level> logging macros to functions
>> netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
>> netdevice.h: Change netif_<level> macros to call netdev_<level> functions
>
> I'm fine with this, thanks Joe.
>
> Greg, could you ACK this and let me know if it's OK if it swings
> through my net-next-2.6 tree?
Greg, ping?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] Introduce and use printk pointer extension %pV
2010-07-03 5:32 ` David Miller
@ 2010-07-03 16:08 ` Greg KH
2010-07-04 17:40 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2010-07-03 16:08 UTC (permalink / raw)
To: David Miller; +Cc: joe, akpm, linux-kernel, netdev
On Fri, Jul 02, 2010 at 10:32:44PM -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 30 Jun 2010 13:07:09 -0700 (PDT)
>
> > From: Joe Perches <joe@perches.com>
> > Date: Sun, 27 Jun 2010 04:02:32 -0700
> >
> >> Recursive printk can reduce the total image size of an x86 defconfig about 1%
> >> by reducing duplicated KERN_<level> strings and centralizing the functions
> >> used by macros in new separate functions.
> >>
> >> Joe Perches (4):
> >> vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
> >> device.h drivers/base/core.c Convert dev_<level> logging macros to functions
> >> netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
> >> netdevice.h: Change netif_<level> macros to call netdev_<level> functions
> >
> > I'm fine with this, thanks Joe.
> >
> > Greg, could you ACK this and let me know if it's OK if it swings
> > through my net-next-2.6 tree?
>
> Greg, ping?
Sorry about the delay.
Yes, that's fine to take it through your tree, thanks for doing that:
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] Introduce and use printk pointer extension %pV
2010-07-03 16:08 ` Greg KH
@ 2010-07-04 17:40 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2010-07-04 17:40 UTC (permalink / raw)
To: greg; +Cc: joe, akpm, linux-kernel, netdev
From: Greg KH <greg@kroah.com>
Date: Sat, 3 Jul 2010 09:08:57 -0700
> On Fri, Jul 02, 2010 at 10:32:44PM -0700, David Miller wrote:
>> From: David Miller <davem@davemloft.net>
>> Date: Wed, 30 Jun 2010 13:07:09 -0700 (PDT)
>>
>> > From: Joe Perches <joe@perches.com>
>> > Date: Sun, 27 Jun 2010 04:02:32 -0700
>> >
>> >> Recursive printk can reduce the total image size of an x86 defconfig about 1%
>> >> by reducing duplicated KERN_<level> strings and centralizing the functions
>> >> used by macros in new separate functions.
>> >>
>> >> Joe Perches (4):
>> >> vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
>> >> device.h drivers/base/core.c Convert dev_<level> logging macros to functions
>> >> netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
>> >> netdevice.h: Change netif_<level> macros to call netdev_<level> functions
>> >
>> > I'm fine with this, thanks Joe.
>> >
>> > Greg, could you ACK this and let me know if it's OK if it swings
>> > through my net-next-2.6 tree?
>>
>> Greg, ping?
>
> Sorry about the delay.
>
> Yes, that's fine to take it through your tree, thanks for doing that:
> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Thanks! I've added this set to my tree.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-07-04 17:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-27 11:02 [PATCH 0/4] Introduce and use printk pointer extension %pV Joe Perches
2010-06-27 11:02 ` [PATCH 1/4] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format Joe Perches
2010-06-27 11:02 ` [PATCH 2/4] device.h drivers/base/core.c Convert dev_<level> logging macros to functions Joe Perches
2010-06-27 11:02 ` [PATCH 3/4] netdevice.h net/core/dev.c: Convert netdev_<level> " Joe Perches
2010-06-27 11:02 ` [PATCH 4/4] netdevice.h: Change netif_<level> macros to call netdev_<level> functions Joe Perches
2010-06-30 20:07 ` [PATCH 0/4] Introduce and use printk pointer extension %pV David Miller
2010-07-03 5:32 ` David Miller
2010-07-03 16:08 ` Greg KH
2010-07-04 17:40 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).