]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
timer_list-convert-timer-list-to-be-a-proper-seq_file-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:13:46 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:11 +0000 (16:52 +1100)
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 <davej@redhat.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Nathan Zimmer <nzimmer@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/time/timer_list.c

index a5f74f68b7d37122278bf16b8ca66bd6e211761e..9904e4880d04de9ea0913aa5d67af52a07144fb1 100644 (file)
@@ -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);