From: Andrew Morton Doing (int < NR_CPUS) doesn't dtrt if it's negative.. Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/base/cpu.c | 2 +- include/linux/cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/base/cpu.c~get_cpu_sysdev-signedness-fix drivers/base/cpu.c --- devel/drivers/base/cpu.c~get_cpu_sysdev-signedness-fix 2006-03-07 23:53:05.000000000 -0800 +++ devel-akpm/drivers/base/cpu.c 2006-03-07 23:53:05.000000000 -0800 @@ -141,7 +141,7 @@ int __devinit register_cpu(struct cpu *c 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]; diff -puN include/linux/cpu.h~get_cpu_sysdev-signedness-fix include/linux/cpu.h --- devel/include/linux/cpu.h~get_cpu_sysdev-signedness-fix 2006-03-07 23:53:05.000000000 -0800 +++ devel-akpm/include/linux/cpu.h 2006-03-07 23:53:05.000000000 -0800 @@ -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 _