Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68209407 authored by Luiz Fernando Capitulino's avatar Luiz Fernando Capitulino Committed by Linus Torvalds
Browse files

[PATCH] x86_64: Sparse warnings fix.



 Fixes the following sparse warnings:

arch/x86_64/kernel/mce_amd.c:321:29: warning: Using plain integer as NULL pointer
arch/x86_64/kernel/mce_amd.c:410:41: warning: Using plain integer as NULL pointer

Signed-off-by: default avatarLuiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 915f34e2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -320,7 +320,7 @@ static struct kobj_type threshold_ktype = {
static __cpuinit int threshold_create_bank(unsigned int cpu, int bank)
static __cpuinit int threshold_create_bank(unsigned int cpu, int bank)
{
{
	int err = 0;
	int err = 0;
	struct threshold_bank *b = 0;
	struct threshold_bank *b = NULL;


#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
	if (cpu_core_id[cpu] && shared_bank[bank]) {	/* symlink */
	if (cpu_core_id[cpu] && shared_bank[bank]) {	/* symlink */
@@ -409,7 +409,7 @@ static __cpuinit void threshold_remove_bank(unsigned int cpu, int bank)
	if (shared_bank[bank] && atomic_read(&b->kobj.kref.refcount) > 2) {
	if (shared_bank[bank] && atomic_read(&b->kobj.kref.refcount) > 2) {
		sprintf(name, "bank%i", bank);
		sprintf(name, "bank%i", bank);
		sysfs_remove_link(&per_cpu(device_threshold, cpu).kobj, name);
		sysfs_remove_link(&per_cpu(device_threshold, cpu).kobj, name);
		per_cpu(threshold_banks, cpu)[bank] = 0;
		per_cpu(threshold_banks, cpu)[bank] = NULL;
	} else {
	} else {
		kobject_unregister(&b->kobj);
		kobject_unregister(&b->kobj);
		kfree(per_cpu(threshold_banks, cpu)[bank]);
		kfree(per_cpu(threshold_banks, cpu)[bank]);