[PATCH] get_cpu_sysdev() signedness fix

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>
此提交包含在:
Andrew Morton
2006-03-07 23:53:25 -08:00
提交者 Greg Kroah-Hartman
父節點 7423172a50
當前提交 a29d642a4a
共有 2 個檔案被更改,包括 2 行新增2 行删除

查看文件

@@ -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];