public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alternatives/paravirt: use NULL for pointers
@ 2006-11-29 21:17 Randy Dunlap
  2006-11-30  0:31 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2006-11-29 21:17 UTC (permalink / raw)
  To: lkml; +Cc: ak, akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

Use NULL instead of 0 for pointers.

arch/x86_64/kernel/../../i386/kernel/alternative.c:432:18: warning: Using plain integer as NULL pointer
arch/x86_64/kernel/../../i386/kernel/alternative.c:432:44: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 include/asm-i386/alternative.h   |    5 +++--
 include/asm-x86_64/alternative.h |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

--- linux-2.6.19-rc6-mm2.orig/include/asm-i386/alternative.h
+++ linux-2.6.19-rc6-mm2/include/asm-i386/alternative.h
@@ -5,6 +5,7 @@
 
 #include <asm/types.h>
 
+#include <linux/stddef.h>
 #include <linux/types.h>
 
 struct alt_instr {
@@ -125,8 +126,8 @@ void apply_paravirt(struct paravirt_patc
 static inline void
 apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end)
 {}
-#define __start_parainstructions 0
-#define __stop_parainstructions 0
+#define __start_parainstructions NULL
+#define __stop_parainstructions NULL
 #endif
 
 #endif /* _I386_ALTERNATIVE_H */
--- linux-2.6.19-rc6-mm2.orig/include/asm-x86_64/alternative.h
+++ linux-2.6.19-rc6-mm2/include/asm-x86_64/alternative.h
@@ -3,6 +3,7 @@
 
 #ifdef __KERNEL__
 
+#include <linux/stddef.h>
 #include <linux/types.h>
 #include <asm/cpufeature.h>
 
@@ -140,8 +141,8 @@ void apply_paravirt(struct paravirt_patc
 static inline void
 apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end)
 {}
-#define __start_parainstructions 0
-#define __stop_parainstructions 0
+#define __start_parainstructions NULL
+#define __stop_parainstructions NULL
 #endif
 
 #endif /* _X86_64_ALTERNATIVE_H */


---

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

* Re: [PATCH] alternatives/paravirt: use NULL for pointers
  2006-11-29 21:17 [PATCH] alternatives/paravirt: use NULL for pointers Randy Dunlap
@ 2006-11-30  0:31 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-11-30  0:31 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, akpm

On Wednesday 29 November 2006 22:17, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Use NULL instead of 0 for pointers.
> 
> arch/x86_64/kernel/../../i386/kernel/alternative.c:432:18: warning: Using plain integer as NULL pointer
> arch/x86_64/kernel/../../i386/kernel/alternative.c:432:44: warning: Using plain integer as NULL pointer

I fixed it in the original patch thanks

-Andi

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

end of thread, other threads:[~2006-11-30  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29 21:17 [PATCH] alternatives/paravirt: use NULL for pointers Randy Dunlap
2006-11-30  0:31 ` Andi Kleen

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