summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-07 23:53:25 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-27 22:47:30 -0800
commit4dea21b262ea05825bffade2180e560b0141fd85 (patch)
tree91c0a50570c2ef2190efbfb08dee7d76aa28fa86
parent048eb7e760ef41bcfef09bbd223f18379d260c2c (diff)
downloadlwn-4dea21b262ea05825bffade2180e560b0141fd85.tar.gz
lwn-4dea21b262ea05825bffade2180e560b0141fd85.zip
[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.c2
-rw-r--r--include/linux/cpu.h2
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)
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 --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 {
};
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