[PATCH] get_cpu_sysdev() signedness fix
authorAndrew Morton <akpm@osdl.org>
Wed, 8 Mar 2006 07:53:25 +0000 (23:53 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 21:42:59 +0000 (13:42 -0800)
Doing (int < NR_CPUS) doesn't dtrt if it's negative..

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/cpu.c
include/linux/cpu.h

index 07a7f97e1de9d95a488f9fea90288052786f6e98..29f3d7504da1fd797d8753f644e0b408ef2a8b19 100644 (file)
@@ -141,7 +141,7 @@ int __devinit register_cpu(struct cpu *cpu, int num, struct node *root)
        return error;
 }
 
-struct sys_device *get_cpu_sysdev(int cpu)
+struct sys_device *get_cpu_sysdev(unsigned cpu)
 {
        if (cpu < NR_CPUS)
                return cpu_sys_devices[cpu];
index 0ed1d4853c69814530920c14b9c2bb6cee445b92..d612b89dce3320db7d4edafe02dde8d50f8def56 100644 (file)
@@ -32,7 +32,7 @@ struct cpu {
 };
 
 extern int register_cpu(struct cpu *, int, struct node *);
-extern struct sys_device *get_cpu_sysdev(int cpu);
+extern struct sys_device *get_cpu_sysdev(unsigned cpu);
 #ifdef CONFIG_HOTPLUG_CPU
 extern void unregister_cpu(struct cpu *, struct node *);
 #endif