public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: Sparse warnings fix.
@ 2006-01-06 14:07 Luiz Fernando Capitulino
  2006-01-06 22:26 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Luiz Fernando Capitulino @ 2006-01-06 14:07 UTC (permalink / raw)
  To: akpm; +Cc: ak, lkml


 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: Luiz Capitulino <lcapitulino@mandriva.com.br>

 arch/x86_64/kernel/mce_amd.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c
index 1f76175..ed5bc57 100644
--- a/arch/x86_64/kernel/mce_amd.c
+++ b/arch/x86_64/kernel/mce_amd.c
@@ -318,7 +318,7 @@ static struct kobj_type threshold_ktype 
 static __cpuinit int threshold_create_bank(unsigned int cpu, int bank)
 {
 	int err = 0;
-	struct threshold_bank *b = 0;
+	struct threshold_bank *b = NULL;
 
 #ifdef CONFIG_SMP
 	if (cpu_core_id[cpu] && shared_bank[bank]) {	/* symlink */
@@ -407,7 +407,7 @@ static __cpuinit void threshold_remove_b
 	if (shared_bank[bank] && atomic_read(&b->kobj.kref.refcount) > 2) {
 		sprintf(name, "bank%i", bank);
 		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 {
 		kobject_unregister(&b->kobj);
 		kfree(per_cpu(threshold_banks, cpu)[bank]);


-- 
Luiz Fernando N. Capitulino

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86_64: Sparse warnings fix.
  2006-01-06 14:07 [PATCH] x86_64: Sparse warnings fix Luiz Fernando Capitulino
@ 2006-01-06 22:26 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-01-06 22:26 UTC (permalink / raw)
  To: Luiz Fernando Capitulino; +Cc: akpm, lkml

On Friday 06 January 2006 15:07, Luiz Fernando Capitulino wrote:
> 
>  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: Luiz Capitulino <lcapitulino@mandriva.com.br>


Queued. Thanks.

-Andi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-06 22:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-06 14:07 [PATCH] x86_64: Sparse warnings fix Luiz Fernando Capitulino
2006-01-06 22:26 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox