Commit d2493ae5 authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] sparse: NULL vs 0 - drivers/char/*

parent 0791e035
......@@ -883,7 +883,7 @@ void *agp_generic_alloc_page(void)
page = alloc_page(GFP_KERNEL);
if (page == NULL)
return 0;
return NULL;
map_page_into_agp(page);
......
......@@ -369,7 +369,7 @@ static int intel_i830_create_gatt_table(void)
size = agp_bridge->current_size;
page_order = size->page_order;
num_entries = size->num_entries;
agp_bridge->gatt_table_real = 0;
agp_bridge->gatt_table_real = NULL;
pci_read_config_dword(intel_i830_private.i830_dev,I810_MMADDR,&temp);
temp &= 0xfff80000;
......
......@@ -167,7 +167,7 @@ static int intel_i830_create_gatt_table(void)
size = agp_bridge->current_size;
page_order = size->page_order;
num_entries = size->num_entries;
agp_bridge->gatt_table_real = 0;
agp_bridge->gatt_table_real = NULL;
pci_read_config_dword(intel_i830_private.i830_dev,I810_MMADDR,&temp);
temp &= 0xfff80000;
......
......@@ -139,10 +139,10 @@ u_short ctrl_alt_map[NR_KEYS] = {
};
ushort *key_maps[MAX_NR_KEYMAPS] = {
plain_map, shift_map, altgr_map, 0,
ctrl_map, shift_ctrl_map, 0, 0,
alt_map, 0, 0, 0,
ctrl_alt_map, 0
plain_map, shift_map, altgr_map, NULL,
ctrl_map, shift_ctrl_map, NULL, NULL,
alt_map, NULL, NULL, NULL,
ctrl_alt_map, NULL
};
unsigned int keymap_count = 7;
......@@ -216,10 +216,10 @@ char *func_table[MAX_NR_FUNC] = {
func_buf + 135,
func_buf + 140,
func_buf + 145,
0,
0,
NULL,
NULL,
func_buf + 149,
0,
NULL,
};
struct kbdiacr accent_table[MAX_DIACR] = {
......
......@@ -152,7 +152,7 @@ void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf)
buf->waiting = 0;
buf->pending = 0;
buf->filp = 0;
buf->filp = NULL;
buf->used = 0;
if ( __HAVE_DMA_WAITQUEUE && waitqueue_active(&buf->dma_wait)) {
......
......@@ -95,7 +95,7 @@ int DRM(lock_transfer)(drm_device_t *dev,
{
unsigned int old, new, prev;
dev->lock.filp = 0;
dev->lock.filp = NULL;
do {
old = *lock;
new = context | _DRM_LOCK_HELD;
......@@ -120,7 +120,7 @@ int DRM(lock_free)(drm_device_t *dev,
{
unsigned int old, new, prev;
dev->lock.filp = 0;
dev->lock.filp = NULL;
do {
old = *lock;
new = 0;
......
......@@ -171,7 +171,7 @@ static int i830_map_buffer(drm_buf_t *buf, struct file *filp)
/* Real error */
DRM_ERROR("mmap error\n");
retcode = PTR_ERR(buf_priv->virtual);
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
}
up_write( &current->mm->mmap_sem );
......@@ -193,7 +193,7 @@ static int i830_unmap_buffer(drm_buf_t *buf)
up_write(&current->mm->mmap_sem);
buf_priv->currently_mapped = I830_BUF_UNMAPPED;
buf_priv->virtual = 0;
buf_priv->virtual = NULL;
return retcode;
}
......
......@@ -903,7 +903,7 @@ static void n_tty_close(struct tty_struct *tty)
n_tty_flush_buffer(tty);
if (tty->read_buf) {
free_buf(tty->read_buf);
tty->read_buf = 0;
tty->read_buf = NULL;
}
}
......@@ -920,7 +920,7 @@ static int n_tty_open(struct tty_struct *tty)
memset(tty->read_buf, 0, N_TTY_BUF_SIZE);
reset_buffer_flags(tty);
tty->column = 0;
n_tty_set_termios(tty, 0);
n_tty_set_termios(tty, NULL);
tty->minimum_to_wake = 1;
tty->closing = 0;
return 0;
......
......@@ -144,14 +144,14 @@ static int pty_write(struct tty_struct * tty, int from_user,
buf += n;
c += n;
count -= n;
to->ldisc.receive_buf(to, temp_buffer, 0, n);
to->ldisc.receive_buf(to, temp_buffer, NULL, n);
}
up(&tty->flip.pty_sem);
} else {
c = to->ldisc.receive_room(to);
if (c > count)
c = count;
to->ldisc.receive_buf(to, buf, 0, c);
to->ldisc.receive_buf(to, buf, NULL, c);
}
return c;
......
......@@ -296,7 +296,7 @@ int paste_selection(struct tty_struct *tty)
}
count = sel_buffer_lth - pasted;
count = MIN(count, tty->ldisc.receive_room(tty));
tty->ldisc.receive_buf(tty, sel_buffer + pasted, 0, count);
tty->ldisc.receive_buf(tty, sel_buffer + pasted, NULL, count);
pasted += count;
}
remove_wait_queue(&vt->paste_wait, &wait);
......
......@@ -2498,7 +2498,7 @@ static void con_close(struct tty_struct *tty, struct file *filp)
vt = tty->driver_data;
if (vt)
vc_cons[vt->vc_num].d->vc_tty = NULL;
tty->driver_data = 0;
tty->driver_data = NULL;
release_console_sem();
vcs_remove_devfs(tty);
up(&tty_sem);
......
......@@ -100,7 +100,7 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str
/* disallocate map */
key_map = key_maps[s];
if (s && key_map) {
key_maps[s] = 0;
key_maps[s] = NULL;
if (key_map[0] == U(K_ALLOCATED)) {
kfree(key_map);
keymap_count--;
......
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