From: Andrew Morton Date: Wed, 20 Feb 2013 02:13:46 +0000 (+1100) Subject: timer_list-convert-timer-list-to-be-a-proper-seq_file-fix-fix X-Git-Tag: next-20130220~1^2~631 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c89222d81840fbc78869948edb0713c5aac5c20a;p=karo-tx-linux.git 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 --- 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);