diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-08 02:53:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 16:42:59 -0500 |
commit | a29d642a4aa99c5234314ab2523281139226c231 (patch) | |
tree | 818996643addcea3963dd143a94ce3c293f225fd | |
parent | 7423172a50968de1905a61413c52bb070a62f5ce (diff) |
[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>
-rw-r--r-- | drivers/base/cpu.c | 2 | ||||
-rw-r--r-- | include/linux/cpu.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 07a7f97e1de9..29f3d7504da1 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -141,7 +141,7 @@ int __devinit register_cpu(struct cpu *cpu, int num, struct node *root) | |||
141 | return error; | 141 | return error; |
142 | } | 142 | } |
143 | 143 | ||
144 | struct sys_device *get_cpu_sysdev(int cpu) | 144 | struct sys_device *get_cpu_sysdev(unsigned cpu) |
145 | { | 145 | { |
146 | if (cpu < NR_CPUS) | 146 | if (cpu < NR_CPUS) |
147 | return cpu_sys_devices[cpu]; | 147 | return cpu_sys_devices[cpu]; |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 0ed1d4853c69..d612b89dce33 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -32,7 +32,7 @@ struct cpu { | |||
32 | }; | 32 | }; |
33 | 33 | ||
34 | extern int register_cpu(struct cpu *, int, struct node *); | 34 | extern int register_cpu(struct cpu *, int, struct node *); |
35 | extern struct sys_device *get_cpu_sysdev(int cpu); | 35 | extern struct sys_device *get_cpu_sysdev(unsigned cpu); |
36 | #ifdef CONFIG_HOTPLUG_CPU | 36 | #ifdef CONFIG_HOTPLUG_CPU |
37 | extern void unregister_cpu(struct cpu *, struct node *); | 37 | extern void unregister_cpu(struct cpu *, struct node *); |
38 | #endif | 38 | #endif |