summaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-04-17 11:39:18 -0700
committerThomas Gleixner <tglx@linutronix.de>2015-04-22 12:03:39 +0200
commit7de4e74430139f2484cb16cedf6c281d1a5a696e (patch)
tree10a587f0ac3df845c85f8a78728edcfe1d603d0c /kernel/time
parent646da63172f660ba84f195c1165360a9b73583ee (diff)
downloadlinux-stable-7de4e74430139f2484cb16cedf6c281d1a5a696e.tar.gz
linux-stable-7de4e74430139f2484cb16cedf6c281d1a5a696e.tar.bz2
linux-stable-7de4e74430139f2484cb16cedf6c281d1a5a696e.zip
timer_list: Reduce SEQ_printf footprint
This macro can be converted to a static function to reduce object size. (x86-64 defconfig) $ size kernel/time/timer_list.o* text data bss dec hex filename 6583 8 0 6591 19bf kernel/time/timer_list.o.old 4647 8 0 4655 122f kernel/time/timer_list.o.new Signed-off-by: Joe Perches <joe@perches.com> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/1429295958.2850.104.camel@perches.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/timer_list.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index e878c2e0ba45..5960af2196ac 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -35,13 +35,20 @@ DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases);
* This allows printing both to /proc/timer_list and
* to the console (on SysRq-Q):
*/
-#define SEQ_printf(m, x...) \
- do { \
- if (m) \
- seq_printf(m, x); \
- else \
- printk(x); \
- } while (0)
+__printf(2, 3)
+static void SEQ_printf(struct seq_file *m, const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+
+ if (m)
+ seq_vprintf(m, fmt, args);
+ else
+ vprintk(fmt, args);
+
+ va_end(args);
+}
static void print_name_offset(struct seq_file *m, void *sym)
{