From akpm@osdl.org Tue Mar 7 23:55:21 2006 Message-Id: <200603080755.k287tEKn001163@shell0.pdx.osdl.net> From: Andrew Morton Subject: get_cpu_sysdev() signedness fix To: greg@kroah.com Cc: akpm@osdl.org Date: Tue, 07 Mar 2006 23:53:25 -0800 From: Andrew Morton Doing (int < NR_CPUS) doesn't dtrt if it's negative.. Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/base/cpu.c | 2 +- include/linux/cpu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/drivers/base/cpu.c +++ gregkh-2.6/drivers/base/cpu.c @@ -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]; --- gregkh-2.6.orig/include/linux/cpu.h +++ gregkh-2.6/include/linux/cpu.h @@ -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