Commit 8a4ba9cf authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: assorted drivers/* NULL noise removal

parent d4439fce
...@@ -721,7 +721,7 @@ static unsigned char *cy_isa_addresses[] = { ...@@ -721,7 +721,7 @@ static unsigned char *cy_isa_addresses[] = {
(unsigned char *) 0xDA000, (unsigned char *) 0xDA000,
(unsigned char *) 0xDC000, (unsigned char *) 0xDC000,
(unsigned char *) 0xDE000, (unsigned char *) 0xDE000,
0,0,0,0,0,0,0,0 NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
}; };
#define NR_ISA_ADDRS (sizeof(cy_isa_addresses)/sizeof(unsigned char*)) #define NR_ISA_ADDRS (sizeof(cy_isa_addresses)/sizeof(unsigned char*))
...@@ -2236,7 +2236,7 @@ shutdown(struct cyclades_port * info) ...@@ -2236,7 +2236,7 @@ shutdown(struct cyclades_port * info)
if (info->xmit_buf){ if (info->xmit_buf){
unsigned char * temp; unsigned char * temp;
temp = info->xmit_buf; temp = info->xmit_buf;
info->xmit_buf = 0; info->xmit_buf = NULL;
free_page((unsigned long) temp); free_page((unsigned long) temp);
} }
cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel); cy_writeb((u_long)base_addr+(CyCAR<<index), (u_char)channel);
...@@ -2288,7 +2288,7 @@ shutdown(struct cyclades_port * info) ...@@ -2288,7 +2288,7 @@ shutdown(struct cyclades_port * info)
if (info->xmit_buf){ if (info->xmit_buf){
unsigned char * temp; unsigned char * temp;
temp = info->xmit_buf; temp = info->xmit_buf;
info->xmit_buf = 0; info->xmit_buf = NULL;
free_page((unsigned long) temp); free_page((unsigned long) temp);
} }
...@@ -2856,7 +2856,7 @@ cy_close(struct tty_struct *tty, struct file *filp) ...@@ -2856,7 +2856,7 @@ cy_close(struct tty_struct *tty, struct file *filp)
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) {
CY_UNLOCK(info, flags); CY_UNLOCK(info, flags);
if (info->close_delay) { if (info->close_delay) {
...@@ -4583,7 +4583,7 @@ cy_hangup(struct tty_struct *tty) ...@@ -4583,7 +4583,7 @@ cy_hangup(struct tty_struct *tty)
#ifdef CY_DEBUG_COUNT #ifdef CY_DEBUG_COUNT
printk("cyc:cy_hangup (%d): setting count to 0\n", current->pid); printk("cyc:cy_hangup (%d): setting count to 0\n", current->pid);
#endif #endif
info->tty = 0; info->tty = NULL;
info->flags &= ~ASYNC_NORMAL_ACTIVE; info->flags &= ~ASYNC_NORMAL_ACTIVE;
wake_up_interruptible(&info->open_wait); wake_up_interruptible(&info->open_wait);
} /* cy_hangup */ } /* cy_hangup */
...@@ -5471,7 +5471,7 @@ cy_init(void) ...@@ -5471,7 +5471,7 @@ cy_init(void)
info->line = port; info->line = port;
info->chip_rev = 0; info->chip_rev = 0;
info->flags = STD_COM_FLAGS; info->flags = STD_COM_FLAGS;
info->tty = 0; info->tty = NULL;
if (mailbox == ZO_V1) if (mailbox == ZO_V1)
info->xmit_fifo_size = CYZ_FIFO_SIZE; info->xmit_fifo_size = CYZ_FIFO_SIZE;
else else
...@@ -5533,7 +5533,7 @@ cy_init(void) ...@@ -5533,7 +5533,7 @@ cy_init(void)
info->card = board; info->card = board;
info->line = port; info->line = port;
info->flags = STD_COM_FLAGS; info->flags = STD_COM_FLAGS;
info->tty = 0; info->tty = NULL;
info->xmit_fifo_size = CyMAX_CHAR_FIFO; info->xmit_fifo_size = CyMAX_CHAR_FIFO;
info->cor1 = CyPARITY_NONE|Cy_1_STOP|Cy_8_BITS; info->cor1 = CyPARITY_NONE|Cy_1_STOP|Cy_8_BITS;
info->cor2 = CyETC; info->cor2 = CyETC;
......
...@@ -125,7 +125,7 @@ int DRM(addmap)( struct inode *inode, struct file *filp, ...@@ -125,7 +125,7 @@ int DRM(addmap)( struct inode *inode, struct file *filp,
return -EINVAL; return -EINVAL;
} }
map->mtrr = -1; map->mtrr = -1;
map->handle = 0; map->handle = NULL;
switch ( map->type ) { switch ( map->type ) {
case _DRM_REGISTERS: case _DRM_REGISTERS:
...@@ -468,7 +468,7 @@ int DRM(addbufs_agp)( struct inode *inode, struct file *filp, ...@@ -468,7 +468,7 @@ int DRM(addbufs_agp)( struct inode *inode, struct file *filp,
buf->waiting = 0; buf->waiting = 0;
buf->pending = 0; buf->pending = 0;
init_waitqueue_head( &buf->dma_wait ); init_waitqueue_head( &buf->dma_wait );
buf->filp = 0; buf->filp = NULL;
buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T); buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T);
buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T), buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T),
...@@ -692,7 +692,7 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp, ...@@ -692,7 +692,7 @@ int DRM(addbufs_pci)( struct inode *inode, struct file *filp,
buf->waiting = 0; buf->waiting = 0;
buf->pending = 0; buf->pending = 0;
init_waitqueue_head( &buf->dma_wait ); init_waitqueue_head( &buf->dma_wait );
buf->filp = 0; buf->filp = NULL;
buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T); buf->dev_priv_size = sizeof(DRIVER_BUF_PRIV_T);
buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T), buf->dev_private = DRM(alloc)( sizeof(DRIVER_BUF_PRIV_T),
......
...@@ -532,7 +532,7 @@ static int DRM(takedown)( drm_device_t *dev ) ...@@ -532,7 +532,7 @@ static int DRM(takedown)( drm_device_t *dev )
#endif #endif
if ( dev->lock.hw_lock ) { if ( dev->lock.hw_lock ) {
dev->sigdata.lock = dev->lock.hw_lock = NULL; /* SHM removed */ dev->sigdata.lock = dev->lock.hw_lock = NULL; /* SHM removed */
dev->lock.filp = 0; dev->lock.filp = NULL;
wake_up_interruptible( &dev->lock.lock_queue ); wake_up_interruptible( &dev->lock.lock_queue );
} }
up( &dev->struct_sem ); up( &dev->struct_sem );
......
...@@ -49,7 +49,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size, ...@@ -49,7 +49,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto out; goto out;
newblock->start = start; newblock->start = start;
newblock->size = p->size - (start - p->start); newblock->size = p->size - (start - p->start);
newblock->filp = 0; newblock->filp = NULL;
newblock->next = p->next; newblock->next = p->next;
newblock->prev = p; newblock->prev = p;
p->next->prev = newblock; p->next->prev = newblock;
...@@ -65,7 +65,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size, ...@@ -65,7 +65,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto out; goto out;
newblock->start = start + size; newblock->start = start + size;
newblock->size = p->size - size; newblock->size = p->size - size;
newblock->filp = 0; newblock->filp = NULL;
newblock->next = p->next; newblock->next = p->next;
newblock->prev = p; newblock->prev = p;
p->next->prev = newblock; p->next->prev = newblock;
...@@ -108,7 +108,7 @@ static struct mem_block *find_block( struct mem_block *heap, int start ) ...@@ -108,7 +108,7 @@ static struct mem_block *find_block( struct mem_block *heap, int start )
static void free_block( struct mem_block *p ) static void free_block( struct mem_block *p )
{ {
p->filp = 0; p->filp = NULL;
/* Assumes a single contiguous range. Needs a special filp in /* Assumes a single contiguous range. Needs a special filp in
* 'heap' to stop it being subsumed. * 'heap' to stop it being subsumed.
...@@ -147,7 +147,7 @@ static int init_heap(struct mem_block **heap, int start, int size) ...@@ -147,7 +147,7 @@ static int init_heap(struct mem_block **heap, int start, int size)
blocks->start = start; blocks->start = start;
blocks->size = size; blocks->size = size;
blocks->filp = 0; blocks->filp = NULL;
blocks->next = blocks->prev = *heap; blocks->next = blocks->prev = *heap;
memset( *heap, 0, sizeof(**heap) ); memset( *heap, 0, sizeof(**heap) );
...@@ -168,7 +168,7 @@ void radeon_mem_release( DRMFILE filp, struct mem_block *heap ) ...@@ -168,7 +168,7 @@ void radeon_mem_release( DRMFILE filp, struct mem_block *heap )
for (p = heap->next ; p != heap ; p = p->next) { for (p = heap->next ; p != heap ; p = p->next) {
if (p->filp == filp) if (p->filp == filp)
p->filp = 0; p->filp = NULL;
} }
/* Assumes a single contiguous range. Needs a special filp in /* Assumes a single contiguous range. Needs a special filp in
...@@ -201,7 +201,7 @@ void radeon_mem_takedown( struct mem_block **heap ) ...@@ -201,7 +201,7 @@ void radeon_mem_takedown( struct mem_block **heap )
} }
DRM_FREE( *heap, sizeof(**heap) ); DRM_FREE( *heap, sizeof(**heap) );
*heap = 0; *heap = NULL;
} }
...@@ -217,7 +217,7 @@ static struct mem_block **get_heap( drm_radeon_private_t *dev_priv, ...@@ -217,7 +217,7 @@ static struct mem_block **get_heap( drm_radeon_private_t *dev_priv,
case RADEON_MEM_REGION_FB: case RADEON_MEM_REGION_FB:
return &dev_priv->fb_heap; return &dev_priv->fb_heap;
default: default:
return 0; return NULL;
} }
} }
......
...@@ -2310,7 +2310,7 @@ int radeon_cp_cmdbuf( DRM_IOCTL_ARGS ) ...@@ -2310,7 +2310,7 @@ int radeon_cp_cmdbuf( DRM_IOCTL_ARGS )
drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_private_t *dev_priv = dev->dev_private;
drm_file_t *filp_priv; drm_file_t *filp_priv;
drm_device_dma_t *dma = dev->dma; drm_device_dma_t *dma = dev->dma;
drm_buf_t *buf = 0; drm_buf_t *buf = NULL;
int idx; int idx;
drm_radeon_cmd_buffer_t cmdbuf; drm_radeon_cmd_buffer_t cmdbuf;
drm_radeon_cmd_header_t header; drm_radeon_cmd_header_t header;
......
...@@ -165,7 +165,7 @@ memHeap_t *mmInit(int ofs, ...@@ -165,7 +165,7 @@ memHeap_t *mmInit(int ofs,
PMemBlock blocks; PMemBlock blocks;
if (size <= 0) if (size <= 0)
return 0; return NULL;
blocks = (TMemBlock *)DRM(calloc)(1, sizeof(TMemBlock), DRM_MEM_DRIVER); blocks = (TMemBlock *)DRM(calloc)(1, sizeof(TMemBlock), DRM_MEM_DRIVER);
if (blocks != NULL) { if (blocks != NULL) {
...@@ -174,7 +174,7 @@ memHeap_t *mmInit(int ofs, ...@@ -174,7 +174,7 @@ memHeap_t *mmInit(int ofs,
blocks->free = 1; blocks->free = 1;
return (memHeap_t *)blocks; return (memHeap_t *)blocks;
} else } else
return 0; return NULL;
} }
/* Checks if a pointer 'b' is part of the heap 'heap' */ /* Checks if a pointer 'b' is part of the heap 'heap' */
......
...@@ -3112,7 +3112,7 @@ static __init int ipmi_init_msghandler(void) ...@@ -3112,7 +3112,7 @@ static __init int ipmi_init_msghandler(void)
ipmi_interfaces[i] = NULL; ipmi_interfaces[i] = NULL;
} }
proc_ipmi_root = proc_mkdir("ipmi", 0); proc_ipmi_root = proc_mkdir("ipmi", NULL);
if (!proc_ipmi_root) { if (!proc_ipmi_root) {
printk("Unable to create IPMI proc dir"); printk("Unable to create IPMI proc dir");
return -ENOMEM; return -ENOMEM;
......
...@@ -1781,7 +1781,7 @@ static int init_one_smi(int intf_num, struct smi_info **smi) ...@@ -1781,7 +1781,7 @@ static int init_one_smi(int intf_num, struct smi_info **smi)
/* So we know not to free it unless we have allocated one. */ /* So we know not to free it unless we have allocated one. */
new_smi->intf = NULL; new_smi->intf = NULL;
new_smi->si_sm = NULL; new_smi->si_sm = NULL;
new_smi->handlers = 0; new_smi->handlers = NULL;
if (!new_smi->irq_setup) { if (!new_smi->irq_setup) {
new_smi->irq = irqs[intf_num]; new_smi->irq = irqs[intf_num];
......
...@@ -1636,7 +1636,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card) ...@@ -1636,7 +1636,7 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
NULL, /* LLC */ NULL, /* LLC */
NULL, /* HLC */ NULL, /* HLC */
/* BChannelinformation */ /* BChannelinformation */
isleasedline ? AdditionalInfo : 0, isleasedline ? AdditionalInfo : NULL,
NULL, /* Keypadfacility */ NULL, /* Keypadfacility */
NULL, /* Useruserdata */ NULL, /* Useruserdata */
NULL /* Facilitydataarray */ NULL /* Facilitydataarray */
......
...@@ -1227,7 +1227,7 @@ struct acpiphp_slot *get_slot_from_id(int id) ...@@ -1227,7 +1227,7 @@ struct acpiphp_slot *get_slot_from_id(int id)
/* should never happen! */ /* should never happen! */
err("%s: no object for id %d\n", __FUNCTION__, id); err("%s: no object for id %d\n", __FUNCTION__, id);
WARN_ON(1); WARN_ON(1);
return 0; return NULL;
} }
......
...@@ -614,9 +614,9 @@ cpci_start_thread(void) ...@@ -614,9 +614,9 @@ cpci_start_thread(void)
thread_finished = 0; thread_finished = 0;
if(controller->irq) { if(controller->irq) {
pid = kernel_thread(event_thread, 0, 0); pid = kernel_thread(event_thread, NULL, 0);
} else { } else {
pid = kernel_thread(poll_thread, 0, 0); pid = kernel_thread(poll_thread, NULL, 0);
} }
if(pid < 0) { if(pid < 0) {
err("Can't start up our thread"); err("Can't start up our thread");
......
...@@ -1829,7 +1829,7 @@ int cpqhp_event_start_thread(void) ...@@ -1829,7 +1829,7 @@ int cpqhp_event_start_thread(void)
init_MUTEX_LOCKED(&event_exit); init_MUTEX_LOCKED(&event_exit);
event_finished=0; event_finished=0;
pid = kernel_thread(event_thread, 0, 0); pid = kernel_thread(event_thread, NULL, 0);
if (pid < 0) { if (pid < 0) {
err ("Can't start up our event thread\n"); err ("Can't start up our event thread\n");
return -1; return -1;
......
...@@ -1081,7 +1081,7 @@ int __init ibmphp_hpc_start_poll_thread (void) ...@@ -1081,7 +1081,7 @@ int __init ibmphp_hpc_start_poll_thread (void)
debug ("%s - Entry\n", __FUNCTION__); debug ("%s - Entry\n", __FUNCTION__);
tid_poll = kernel_thread (hpc_poll_thread, 0, 0); tid_poll = kernel_thread (hpc_poll_thread, NULL, 0);
if (tid_poll < 0) { if (tid_poll < 0) {
err ("%s - Error, thread not started\n", __FUNCTION__); err ("%s - Error, thread not started\n", __FUNCTION__);
rc = -1; rc = -1;
......
...@@ -1454,7 +1454,7 @@ int pciehp_event_start_thread(void) ...@@ -1454,7 +1454,7 @@ int pciehp_event_start_thread(void)
event_finished=0; event_finished=0;
init_MUTEX_LOCKED(&event_semaphore); init_MUTEX_LOCKED(&event_semaphore);
pid = kernel_thread(event_thread, 0, 0); pid = kernel_thread(event_thread, NULL, 0);
if (pid < 0) { if (pid < 0) {
err ("Can't start up our event thread\n"); err ("Can't start up our event thread\n");
......
...@@ -237,8 +237,8 @@ struct php_ctlr_state_s { ...@@ -237,8 +237,8 @@ struct php_ctlr_state_s {
static spinlock_t hpc_event_lock; static spinlock_t hpc_event_lock;
DEFINE_DBG_BUFFER /* Debug string buffer for entire HPC defined here */ DEFINE_DBG_BUFFER /* Debug string buffer for entire HPC defined here */
static struct php_ctlr_state_s *php_ctlr_list_head = 0; /* HPC state linked list */ static struct php_ctlr_state_s *php_ctlr_list_head; /* HPC state linked list */
static int ctlr_seq_num = 0; /* Controller sequence # */ static int ctlr_seq_num; /* Controller sequence # */
static spinlock_t list_lock; static spinlock_t list_lock;
static irqreturn_t pcie_isr(int IRQ, void *dev_id, struct pt_regs *regs); static irqreturn_t pcie_isr(int IRQ, void *dev_id, struct pt_regs *regs);
...@@ -744,7 +744,7 @@ static void hpc_release_ctlr(struct controller *ctrl) ...@@ -744,7 +744,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
} }
} }
if (php_ctlr->pci_dev) if (php_ctlr->pci_dev)
php_ctlr->pci_dev = 0; php_ctlr->pci_dev = NULL;
spin_lock(&list_lock); spin_lock(&list_lock);
p = php_ctlr_list_head; p = php_ctlr_list_head;
...@@ -1467,7 +1467,7 @@ int pcie_init(struct controller * ctrl, ...@@ -1467,7 +1467,7 @@ int pcie_init(struct controller * ctrl,
if (php_ctlr_list_head == 0) { if (php_ctlr_list_head == 0) {
php_ctlr_list_head = php_ctlr; php_ctlr_list_head = php_ctlr;
p = php_ctlr_list_head; p = php_ctlr_list_head;
p->pnext = 0; p->pnext = NULL;
} else { } else {
p = php_ctlr_list_head; p = php_ctlr_list_head;
......
...@@ -1890,7 +1890,7 @@ int shpchp_event_start_thread (void) ...@@ -1890,7 +1890,7 @@ int shpchp_event_start_thread (void)
event_finished=0; event_finished=0;
init_MUTEX_LOCKED(&event_semaphore); init_MUTEX_LOCKED(&event_semaphore);
pid = kernel_thread(event_thread, 0, 0); pid = kernel_thread(event_thread, NULL, 0);
if (pid < 0) { if (pid < 0) {
err ("Can't start up our event thread\n"); err ("Can't start up our event thread\n");
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
static spinlock_t hpc_event_lock; static spinlock_t hpc_event_lock;
DEFINE_DBG_BUFFER /* Debug string buffer for entire HPC defined here */ DEFINE_DBG_BUFFER /* Debug string buffer for entire HPC defined here */
static struct php_ctlr_state_s *php_ctlr_list_head = 0; /* HPC state linked list */ static struct php_ctlr_state_s *php_ctlr_list_head; /* HPC state linked list */
static int ctlr_seq_num = 0; /* Controller sequenc # */ static int ctlr_seq_num = 0; /* Controller sequenc # */
static spinlock_t list_lock; static spinlock_t list_lock;
...@@ -799,7 +799,7 @@ static void hpc_release_ctlr(struct controller *ctrl) ...@@ -799,7 +799,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
iounmap(php_ctlr->creg); iounmap(php_ctlr->creg);
release_mem_region(pci_resource_start(php_ctlr->pci_dev, 0), pci_resource_len(php_ctlr->pci_dev, 0)); release_mem_region(pci_resource_start(php_ctlr->pci_dev, 0), pci_resource_len(php_ctlr->pci_dev, 0));
dbg("%s: before calling iounmap & release_mem_region\n", __FUNCTION__); dbg("%s: before calling iounmap & release_mem_region\n", __FUNCTION__);
php_ctlr->pci_dev = 0; php_ctlr->pci_dev = NULL;
} }
spin_lock(&list_lock); spin_lock(&list_lock);
...@@ -1572,7 +1572,7 @@ int shpc_init(struct controller * ctrl, ...@@ -1572,7 +1572,7 @@ int shpc_init(struct controller * ctrl,
if (php_ctlr_list_head == 0) { if (php_ctlr_list_head == 0) {
php_ctlr_list_head = php_ctlr; php_ctlr_list_head = php_ctlr;
p = php_ctlr_list_head; p = php_ctlr_list_head;
p->pnext = 0; p->pnext = NULL;
} else { } else {
p = php_ctlr_list_head; p = php_ctlr_list_head;
......
...@@ -118,7 +118,7 @@ static void cb_release_cis_mem(struct pcmcia_socket * s) ...@@ -118,7 +118,7 @@ static void cb_release_cis_mem(struct pcmcia_socket * s)
cs_dbg(s, 1, "cb_release_cis_mem()\n"); cs_dbg(s, 1, "cb_release_cis_mem()\n");
iounmap(s->cb_cis_virt); iounmap(s->cb_cis_virt);
s->cb_cis_virt = NULL; s->cb_cis_virt = NULL;
s->cb_cis_res = 0; s->cb_cis_res = NULL;
} }
} }
......
...@@ -260,7 +260,7 @@ static int __pnp_bios_dev_node_info(struct pnp_dev_node_info *data) ...@@ -260,7 +260,7 @@ static int __pnp_bios_dev_node_info(struct pnp_dev_node_info *data)
if (!pnp_bios_present()) if (!pnp_bios_present())
return PNP_FUNCTION_NOT_SUPPORTED; return PNP_FUNCTION_NOT_SUPPORTED;
status = call_pnp_bios(PNP_GET_NUM_SYS_DEV_NODES, 0, PNP_TS1, 2, PNP_TS1, PNP_DS, 0, 0, status = call_pnp_bios(PNP_GET_NUM_SYS_DEV_NODES, 0, PNP_TS1, 2, PNP_TS1, PNP_DS, 0, 0,
data, sizeof(struct pnp_dev_node_info), 0, 0); data, sizeof(struct pnp_dev_node_info), NULL, 0);
data->no_nodes &= 0xff; data->no_nodes &= 0xff;
return status; return status;
} }
...@@ -323,7 +323,7 @@ static int __pnp_bios_set_dev_node(u8 nodenum, char boot, struct pnp_bios_node * ...@@ -323,7 +323,7 @@ static int __pnp_bios_set_dev_node(u8 nodenum, char boot, struct pnp_bios_node *
if ( !boot && pnpbios_dont_use_current_config ) if ( !boot && pnpbios_dont_use_current_config )
return PNP_FUNCTION_NOT_SUPPORTED; return PNP_FUNCTION_NOT_SUPPORTED;
status = call_pnp_bios(PNP_SET_SYS_DEV_NODE, nodenum, 0, PNP_TS1, boot ? 2 : 1, PNP_DS, 0, 0, status = call_pnp_bios(PNP_SET_SYS_DEV_NODE, nodenum, 0, PNP_TS1, boot ? 2 : 1, PNP_DS, 0, 0,
data, 65536, 0, 0); data, 65536, NULL, 0);
return status; return status;
} }
...@@ -381,7 +381,7 @@ int pnp_bios_dock_station_info(struct pnp_docking_station_info *data) ...@@ -381,7 +381,7 @@ int pnp_bios_dock_station_info(struct pnp_docking_station_info *data)
if (!pnp_bios_present()) if (!pnp_bios_present())
return PNP_FUNCTION_NOT_SUPPORTED; return PNP_FUNCTION_NOT_SUPPORTED;
status = call_pnp_bios(PNP_GET_DOCKING_STATION_INFORMATION, 0, PNP_TS1, PNP_DS, 0, 0, 0, 0, status = call_pnp_bios(PNP_GET_DOCKING_STATION_INFORMATION, 0, PNP_TS1, PNP_DS, 0, 0, 0, 0,
data, sizeof(struct pnp_docking_station_info), 0, 0); data, sizeof(struct pnp_docking_station_info), NULL, 0);
return status; return status;
} }
......
...@@ -130,7 +130,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info) ...@@ -130,7 +130,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
/* only one standardized param to hotplug command: type */ /* only one standardized param to hotplug command: type */
argv [0] = hotplug_path; argv [0] = hotplug_path;
argv [1] = "dock"; argv [1] = "dock";
argv [2] = 0; argv [2] = NULL;
/* minimal command environment */ /* minimal command environment */
envp [i++] = "HOME=/"; envp [i++] = "HOME=/";
...@@ -153,7 +153,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info) ...@@ -153,7 +153,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
envp [i++] = scratch; envp [i++] = scratch;
scratch += sprintf (scratch, "DOCK=%x/%x/%x", scratch += sprintf (scratch, "DOCK=%x/%x/%x",
info->location_id, info->serial, info->capabilities); info->location_id, info->serial, info->capabilities);
envp[i] = 0; envp[i] = NULL;
value = call_usermodehelper (argv [0], argv, envp, 0); value = call_usermodehelper (argv [0], argv, envp, 0);
kfree (buf); kfree (buf);
......
...@@ -621,7 +621,7 @@ int orc_device_reset(ORC_HCS * pHCB, Scsi_Cmnd *SCpnt, unsigned int target) ...@@ -621,7 +621,7 @@ int orc_device_reset(ORC_HCS * pHCB, Scsi_Cmnd *SCpnt, unsigned int target)
pScb->SCB_XferLen = 0; pScb->SCB_XferLen = 0;
pScb->SCB_SGLen = 0; pScb->SCB_SGLen = 0;
pVirEscb->SCB_Srb = 0; pVirEscb->SCB_Srb = NULL;
pVirEscb->SCB_Srb = SCpnt; pVirEscb->SCB_Srb = SCpnt;
orc_exec_scb(pHCB, pScb); /* Start execute SCB */ orc_exec_scb(pHCB, pScb); /* Start execute SCB */
spin_unlock_irqrestore(&(pHCB->BitAllocFlagLock), flags); spin_unlock_irqrestore(&(pHCB->BitAllocFlagLock), flags);
......
...@@ -793,7 +793,7 @@ static void imm_interrupt(void *data) ...@@ -793,7 +793,7 @@ static void imm_interrupt(void *data)
imm_pb_dismiss(dev); imm_pb_dismiss(dev);
spin_lock_irqsave(host->host_lock, flags); spin_lock_irqsave(host->host_lock, flags);
dev->cur_cmd = 0; dev->cur_cmd = NULL;
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
spin_unlock_irqrestore(host->host_lock, flags); spin_unlock_irqrestore(host->host_lock, flags);
return; return;
......
...@@ -682,7 +682,7 @@ static void ppa_interrupt(void *data) ...@@ -682,7 +682,7 @@ static void ppa_interrupt(void *data)
ppa_pb_dismiss(dev); ppa_pb_dismiss(dev);
dev->cur_cmd = 0; dev->cur_cmd = NULL;
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
} }
......
...@@ -183,7 +183,7 @@ int sr_media_change(struct cdrom_device_info *cdi, int slot) ...@@ -183,7 +183,7 @@ int sr_media_change(struct cdrom_device_info *cdi, int slot)
return -EINVAL; return -EINVAL;
} }
retval = scsi_ioctl(cd->device, SCSI_IOCTL_TEST_UNIT_READY, 0); retval = scsi_ioctl(cd->device, SCSI_IOCTL_TEST_UNIT_READY, NULL);
if (retval) { if (retval) {
/* Unable to test, unit probably not ready. This usually /* Unable to test, unit probably not ready. This usually
* means there is no disc in the drive. Mark as changed, * means there is no disc in the drive. Mark as changed,
......
...@@ -182,7 +182,7 @@ struct aty_cursor *__init aty_init_cursor(struct fb_info *info) ...@@ -182,7 +182,7 @@ struct aty_cursor *__init aty_init_cursor(struct fb_info *info)
cursor = kmalloc(sizeof(struct aty_cursor), GFP_ATOMIC); cursor = kmalloc(sizeof(struct aty_cursor), GFP_ATOMIC);
if (!cursor) if (!cursor)
return 0; return NULL;
memset(cursor, 0, sizeof(*cursor)); memset(cursor, 0, sizeof(*cursor));
info->fix.smem_len -= PAGE_SIZE; info->fix.smem_len -= PAGE_SIZE;
......
...@@ -2199,7 +2199,7 @@ static struct cirrusfb_info *cirrusfb_pci_setup (struct pci_dev *pdev, ...@@ -2199,7 +2199,7 @@ static struct cirrusfb_info *cirrusfb_pci_setup (struct pci_dev *pdev,
} else { } else {
DPRINTK ("Attempt to get PCI info for Cirrus Graphics Card\n"); DPRINTK ("Attempt to get PCI info for Cirrus Graphics Card\n");
get_pci_addrs (pdev, &board_addr, &cinfo->fbregs_phys); get_pci_addrs (pdev, &board_addr, &cinfo->fbregs_phys);
cinfo->regbase = 0; /* FIXME: this forces VGA. alternatives? */ cinfo->regbase = NULL; /* FIXME: this forces VGA. alternatives? */
} }
DPRINTK ("Board address: 0x%lx, register address: 0x%lx\n", board_addr, cinfo->fbregs_phys); DPRINTK ("Board address: 0x%lx, register address: 0x%lx\n", board_addr, cinfo->fbregs_phys);
......
...@@ -1459,7 +1459,7 @@ fbmem_init(void) ...@@ -1459,7 +1459,7 @@ fbmem_init(void)
{ {
int i; int i;
create_proc_read_entry("fb", 0, 0, fbmem_read_proc, NULL); create_proc_read_entry("fb", 0, NULL, fbmem_read_proc, NULL);
devfs_mk_dir("fb"); devfs_mk_dir("fb");
if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) if (register_chrdev(FB_MAJOR,"fb",&fb_fops))
......
...@@ -222,7 +222,7 @@ void i810fb_fill_var_timings(struct fb_var_screeninfo *var) { } ...@@ -222,7 +222,7 @@ void i810fb_fill_var_timings(struct fb_var_screeninfo *var) { }
u32 i810_get_watermark(const struct fb_var_screeninfo *var, u32 i810_get_watermark(const struct fb_var_screeninfo *var,
struct i810fb_par *par) struct i810fb_par *par)
{ {
struct wm_info *wmark = 0; struct wm_info *wmark = NULL;
u32 i, size = 0, pixclock, wm_best = 0, min, diff; u32 i, size = 0, pixclock, wm_best = 0, min, diff;
if (par->mem_freq == 100) { if (par->mem_freq == 100) {
......
...@@ -84,7 +84,7 @@ typedef struct { ...@@ -84,7 +84,7 @@ typedef struct {
} device_info_t; } device_info_t;
/* global graphics card info structure (one per card) */ /* global graphics card info structure (one per card) */
static device_info_t deviceInfo = { 0 }; static device_info_t deviceInfo;
static char *mode_option __initdata = NULL; static char *mode_option __initdata = NULL;
static int nopan __initdata = 0; static int nopan __initdata = 0;
......
...@@ -1344,7 +1344,7 @@ static void UpdateFifoState ...@@ -1344,7 +1344,7 @@ static void UpdateFifoState
{ {
case NV_ARCH_04: case NV_ARCH_04:
LOAD_FIXED_STATE(nv4,FIFO); LOAD_FIXED_STATE(nv4,FIFO);
chip->Tri03 = 0L; chip->Tri03 = NULL;
chip->Tri05 = (RivaTexturedTriangle05 *)&(chip->FIFO[0x0000E000/4]); chip->Tri05 = (RivaTexturedTriangle05 *)&(chip->FIFO[0x0000E000/4]);
break; break;
case NV_ARCH_10: case NV_ARCH_10:
...@@ -1354,7 +1354,7 @@ static void UpdateFifoState ...@@ -1354,7 +1354,7 @@ static void UpdateFifoState
*/ */
LOAD_FIXED_STATE(nv10tri05,PGRAPH); LOAD_FIXED_STATE(nv10tri05,PGRAPH);
LOAD_FIXED_STATE(nv10,FIFO); LOAD_FIXED_STATE(nv10,FIFO);
chip->Tri03 = 0L; chip->Tri03 = NULL;
chip->Tri05 = (RivaTexturedTriangle05 *)&(chip->FIFO[0x0000E000/4]); chip->Tri05 = (RivaTexturedTriangle05 *)&(chip->FIFO[0x0000E000/4]);
break; break;
} }
...@@ -1394,13 +1394,13 @@ static void LoadStateExt ...@@ -1394,13 +1394,13 @@ static void LoadStateExt
case 32: case 32:
LOAD_FIXED_STATE_32BPP(nv3,PRAMIN); LOAD_FIXED_STATE_32BPP(nv3,PRAMIN);
LOAD_FIXED_STATE_32BPP(nv3,PGRAPH); LOAD_FIXED_STATE_32BPP(nv3,PGRAPH);
chip->Tri03 = 0L; chip->Tri03 = NULL;
break; break;
case 8: case 8:
default: default:
LOAD_FIXED_STATE_8BPP(nv3,PRAMIN); LOAD_FIXED_STATE_8BPP(nv3,PRAMIN);
LOAD_FIXED_STATE_8BPP(nv3,PGRAPH); LOAD_FIXED_STATE_8BPP(nv3,PGRAPH);
chip->Tri03 = 0L; chip->Tri03 = NULL;
break; break;
} }
for (i = 0x00000; i < 0x00800; i++) for (i = 0x00000; i < 0x00800; i++)
...@@ -1438,13 +1438,13 @@ static void LoadStateExt ...@@ -1438,13 +1438,13 @@ static void LoadStateExt
case 32: case 32:
LOAD_FIXED_STATE_32BPP(nv4,PRAMIN); LOAD_FIXED_STATE_32BPP(nv4,PRAMIN);
LOAD_FIXED_STATE_32BPP(nv4,PGRAPH); LOAD_FIXED_STATE_32BPP(nv4,PGRAPH);
chip->Tri03 = 0L; chip->Tri03 = NULL;
break; break;
case 8: case 8:
default: default:
LOAD_FIXED_STATE_8BPP(nv4,PRAMIN); LOAD_FIXED_STATE_8BPP(nv4,PRAMIN);
LOAD_FIXED_STATE_8BPP(nv4,PGRAPH); LOAD_FIXED_STATE_8BPP(nv4,PGRAPH);
chip->Tri03 = 0L; chip->Tri03 = NULL;
break; break;
} }
chip->PGRAPH[0x00000640/4] = state->offset0; chip->PGRAPH[0x00000640/4] = state->offset0;
...@@ -1483,13 +1483,13 @@ static void LoadStateExt ...@@ -1483,13 +1483,13 @@ static void LoadStateExt
case 32: case 32:
LOAD_FIXED_STATE_32BPP(nv10,PRAMIN); LOAD_FIXED_STATE_32BPP(nv10,PRAMIN);
LOAD_FIXED_STATE_32BPP(nv10,PGRAPH); LOAD_FIXED_STATE_32BPP(nv10,PGRAPH);
chip->Tri03 = 0L; chip->Tri03 = NULL;
break; break;
case 8: case 8:
default: default:
LOAD_FIXED_STATE_8BPP(nv10,PRAMIN); LOAD_FIXED_STATE_8BPP(nv10,PRAMIN);
LOAD_FIXED_STATE_8BPP(nv10,PGRAPH); LOAD_FIXED_STATE_8BPP(nv10,PGRAPH);
chip->Tri03 = 0L; chip->Tri03 = NULL;
break; break;
} }
......
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