From 5886f9a2f172442cb06c150f7c909884df65eba8 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 7 Feb 2013 12:25:58 +1100 Subject: [PATCH] timer_list-convert-timer-list-to-be-a-proper-seq_file-fix-fix kernel/time/timer_list.c: In function 'timer_list_show': kernel/time/timer_list.c:262: warning: cast to pointer from integer of different size kernel/time/timer_list.c:267: warning: cast to pointer from integer of different size kernel/time/timer_list.c: In function 'timer_list_start': kernel/time/timer_list.c:297: warning: cast to pointer from integer of different size This code is revolting :( Cc: Dave Jones Cc: John Stultz Cc: Nathan Zimmer Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- kernel/time/timer_list.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index a5f74f68b7d3..9904e4880d04 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -259,12 +259,12 @@ static int timer_list_show(struct seq_file *m, void *v) HRTIMER_MAX_CLOCK_BASES); SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now); SEQ_printf(m, "\n"); - } else if (v < (void *)(nr_cpu_ids + 2)) { + } else if (v < (void *)(unsigned long)(nr_cpu_ids + 2)) { cpu = (unsigned long)(v - 2); print_cpu(m, cpu, now); } #ifdef CONFIG_GENERIC_CLOCKEVENTS - else if (v == (void *)nr_cpu_ids + 2) { + else if (v == (void *)(unsigned long)nr_cpu_ids + 2) { timer_list_show_tickdevices_header(m); } else { cpu = (unsigned long)(v - 3 - nr_cpu_ids); @@ -306,7 +306,7 @@ static void *timer_list_start(struct seq_file *file, loff_t *offset) #ifdef CONFIG_GENERIC_CLOCKEVENTS if (n == nr_cpu_ids + 1) - return (void *) (nr_cpu_ids + 2); + return (void *)(unsigned long)(nr_cpu_ids + 2); if (n < nr_cpu_ids * 2 + 2) { n -= (nr_cpu_ids + 2); -- 2.39.5