Commit 91db418d authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] m68k: NULL vs. 0 cleanups

A few more NULL vs. 0 cleanups, as detected by sparse.
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 54f9f778
...@@ -352,7 +352,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -352,7 +352,7 @@ void __init setup_arch(char **cmdline_p)
#ifndef CONFIG_SUN3 #ifndef CONFIG_SUN3
startmem= m68k_memory[0].addr; startmem= m68k_memory[0].addr;
endmem = startmem + m68k_memory[0].size; endmem = startmem + m68k_memory[0].size;
high_memory = PAGE_OFFSET; high_memory = (void *)PAGE_OFFSET;
for (i = 0; i < m68k_num_memory; i++) { for (i = 0; i < m68k_num_memory; i++) {
m68k_memory[i].size &= MASK_256K; m68k_memory[i].size &= MASK_256K;
if (m68k_memory[i].addr < startmem) if (m68k_memory[i].addr < startmem)
......
...@@ -77,7 +77,7 @@ pmd_t *get_pointer_table (void) ...@@ -77,7 +77,7 @@ pmd_t *get_pointer_table (void)
ptable_desc *new; ptable_desc *new;
if (!(page = (void *)get_zeroed_page(GFP_KERNEL))) if (!(page = (void *)get_zeroed_page(GFP_KERNEL)))
return 0; return NULL;
flush_tlb_kernel_page(page); flush_tlb_kernel_page(page);
nocache_page(page); nocache_page(page);
......
...@@ -646,7 +646,7 @@ static int startup(struct async_struct * info) ...@@ -646,7 +646,7 @@ static int startup(struct async_struct * info)
/* /*
* and set the speed of the serial port * and set the speed of the serial port
*/ */
change_speed(info, 0); change_speed(info, NULL);
info->flags |= ASYNC_INITIALIZED; info->flags |= ASYNC_INITIALIZED;
local_irq_restore(flags); local_irq_restore(flags);
...@@ -692,7 +692,7 @@ static void shutdown(struct async_struct * info) ...@@ -692,7 +692,7 @@ static void shutdown(struct async_struct * info)
if (info->xmit.buf) { if (info->xmit.buf) {
free_page((unsigned long) info->xmit.buf); free_page((unsigned long) info->xmit.buf);
info->xmit.buf = 0; info->xmit.buf = NULL;
} }
info->IER = 0; info->IER = 0;
...@@ -1206,7 +1206,7 @@ static int set_serial_info(struct async_struct * info, ...@@ -1206,7 +1206,7 @@ static int set_serial_info(struct async_struct * info,
info->tty->alt_speed = 230400; info->tty->alt_speed = 230400;
if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP) if ((state->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
info->tty->alt_speed = 460800; info->tty->alt_speed = 460800;
change_speed(info, 0); change_speed(info, NULL);
} }
} else } else
retval = startup(info); retval = startup(info);
...@@ -1561,7 +1561,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) ...@@ -1561,7 +1561,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
tty_ldisc_flush(tty); tty_ldisc_flush(tty);
tty->closing = 0; tty->closing = 0;
info->event = 0; info->event = 0;
info->tty = 0; info->tty = NULL;
if (info->blocked_open) { if (info->blocked_open) {
if (info->close_delay) { if (info->close_delay) {
msleep_interruptible(jiffies_to_msecs(info->close_delay)); msleep_interruptible(jiffies_to_msecs(info->close_delay));
...@@ -1652,7 +1652,7 @@ static void rs_hangup(struct tty_struct *tty) ...@@ -1652,7 +1652,7 @@ static void rs_hangup(struct tty_struct *tty)
info->event = 0; info->event = 0;
state->count = 0; state->count = 0;
info->flags &= ~ASYNC_NORMAL_ACTIVE; info->flags &= ~ASYNC_NORMAL_ACTIVE;
info->tty = 0; info->tty = NULL;
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->open_wait);
} }
...@@ -1908,7 +1908,7 @@ static inline int line_info(char *buf, struct serial_state *state) ...@@ -1908,7 +1908,7 @@ static inline int line_info(char *buf, struct serial_state *state)
info->magic = SERIAL_MAGIC; info->magic = SERIAL_MAGIC;
info->flags = state->flags; info->flags = state->flags;
info->quot = 0; info->quot = 0;
info->tty = 0; info->tty = NULL;
} }
local_irq_save(flags); local_irq_save(flags);
status = ciab.pra; status = ciab.pra;
......
...@@ -9,7 +9,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, ...@@ -9,7 +9,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
int flag) int flag)
{ {
BUG(); BUG();
return 0; return NULL;
} }
static inline void static inline void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment