To: linus, akpm Cc: lkml Subject: [PATCH] NULL vs. 0 cleanups A few more NULL vs. 0 cleanups, as detected by sparse. Signed-off-by: Geert Uytterhoeven --- arch/m68k/kernel/setup.c | 2 +- arch/m68k/mm/memory.c | 2 +- drivers/char/amiserial.c | 12 ++++++------ include/asm-generic/dma-mapping-broken.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) --- linux-2.6.9-rc3/arch/m68k/kernel/setup.c 2004-08-04 12:13:35.000000000 +0200 +++ linux-m68k-2.6.9-rc3-sparse/arch/m68k/kernel/setup.c 2004-09-29 14:25:11.000000000 +0200 @@ -352,7 +343,7 @@ #ifndef CONFIG_SUN3 startmem= m68k_memory[0].addr; endmem = startmem + m68k_memory[0].size; - high_memory = PAGE_OFFSET; + high_memory = (void *)PAGE_OFFSET; for (i = 0; i < m68k_num_memory; i++) { m68k_memory[i].size &= MASK_256K; if (m68k_memory[i].addr < startmem) --- linux-2.6.9-rc3/arch/m68k/mm/memory.c 2004-08-14 15:35:36.000000000 +0200 +++ linux-m68k-2.6.9-rc3-sparse/arch/m68k/mm/memory.c 2004-09-29 14:22:34.000000000 +0200 @@ -77,7 +77,7 @@ ptable_desc *new; if (!(page = (void *)get_zeroed_page(GFP_KERNEL))) - return 0; + return NULL; flush_tlb_kernel_page(page); nocache_page(page); --- linux-2.6.9-rc3/include/asm-generic/dma-mapping-broken.h 2004-04-28 15:49:03.000000000 +0200 +++ linux-m68k-2.6.9-rc3-sparse/include/asm-generic/dma-mapping-broken.h 2004-09-30 17:53:55.000000000 +0200 @@ -9,7 +9,7 @@ int flag) { BUG(); - return 0; + return NULL; } static inline void --- linux-2.6.9-rc3/drivers/char/amiserial.c 2004-09-13 21:57:40.000000000 +0200 +++ linux-m68k-2.6.9-rc3-sparse/drivers/char/amiserial.c 2004-09-30 17:59:41.000000000 +0200 @@ -647,7 +651,7 @@ /* * and set the speed of the serial port */ - change_speed(info, 0); + change_speed(info, NULL); info->flags |= ASYNC_INITIALIZED; local_irq_restore(flags); @@ -693,7 +697,7 @@ if (info->xmit.buf) { free_page((unsigned long) info->xmit.buf); - info->xmit.buf = 0; + info->xmit.buf = NULL; } info->IER = 0; @@ -1209,7 +1215,7 @@ info->tty->alt_speed = 230400; if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP) info->tty->alt_speed = 460800; - change_speed(info, 0); + change_speed(info, NULL); } } else retval = startup(info); @@ -1564,7 +1570,7 @@ tty->ldisc.flush_buffer(tty); tty->closing = 0; info->event = 0; - info->tty = 0; + info->tty = NULL; if (info->blocked_open) { if (info->close_delay) { current->state = TASK_INTERRUPTIBLE; @@ -1657,7 +1663,7 @@ info->event = 0; state->count = 0; info->flags &= ~ASYNC_NORMAL_ACTIVE; - info->tty = 0; + info->tty = NULL; wake_up_interruptible(&info->open_wait); } @@ -1913,7 +1919,7 @@ info->magic = SERIAL_MAGIC; info->flags = state->flags; info->quot = 0; - info->tty = 0; + info->tty = NULL; } local_irq_save(flags); status = ciab.pra;