From: Andrew Morton <akpm@osdl.org>
Date: Wed, 8 Mar 2006 07:53:25 +0000 (-0800)
Subject: [PATCH] get_cpu_sysdev() signedness fix
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a29d642a4aa99c5234314ab2523281139226c231;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git

[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>
---

diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 07a7f97e1de..29f3d7504da 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 0ed1d4853c6..d612b89dce3 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