[PATCH] sparse cleanups: NULL pointers, C99 struct init.
Convert most of the remaining "Using plain integer as NULL pointer" sparse warnings to use NULL. (Not duplicating patches that are already in -mm, -bird, or -kj.) Convert isdn driver struct initializer to use C99 syntax. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
b888c87b74
commit
874ec33ff9
|
@ -44,7 +44,7 @@ void mach_reboot_fixups(void)
|
||||||
|
|
||||||
for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0])); i++) {
|
for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0])); i++) {
|
||||||
cur = &(fixups_table[i]);
|
cur = &(fixups_table[i]);
|
||||||
dev = pci_get_device(cur->vendor, cur->device, 0);
|
dev = pci_get_device(cur->vendor, cur->device, NULL);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ static struct attribute* atmel_attrs[] = {
|
||||||
&dev_attr_pcrs.attr,
|
&dev_attr_pcrs.attr,
|
||||||
&dev_attr_caps.attr,
|
&dev_attr_caps.attr,
|
||||||
&dev_attr_cancel.attr,
|
&dev_attr_cancel.attr,
|
||||||
0,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs };
|
static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs };
|
||||||
|
|
|
@ -244,7 +244,7 @@ static struct attribute * nsc_attrs[] = {
|
||||||
&dev_attr_pcrs.attr,
|
&dev_attr_pcrs.attr,
|
||||||
&dev_attr_caps.attr,
|
&dev_attr_caps.attr,
|
||||||
&dev_attr_cancel.attr,
|
&dev_attr_cancel.attr,
|
||||||
0,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs };
|
static struct attribute_group nsc_attr_grp = { .attrs = nsc_attrs };
|
||||||
|
|
|
@ -1063,7 +1063,7 @@ tx_b_frame(struct hfc4s8s_btype *bch)
|
||||||
Write_hfc8(l1->hw, A_INC_RES_FIFO, 1);
|
Write_hfc8(l1->hw, A_INC_RES_FIFO, 1);
|
||||||
}
|
}
|
||||||
ack_len += skb->truesize;
|
ack_len += skb->truesize;
|
||||||
bch->tx_skb = 0;
|
bch->tx_skb = NULL;
|
||||||
bch->tx_cnt = 0;
|
bch->tx_cnt = 0;
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
} else
|
} else
|
||||||
|
@ -1659,10 +1659,10 @@ hfc4s8s_remove(struct pci_dev *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pci_driver hfc4s8s_driver = {
|
static struct pci_driver hfc4s8s_driver = {
|
||||||
name:"hfc4s8s_l1",
|
.name = "hfc4s8s_l1",
|
||||||
probe:hfc4s8s_probe,
|
.probe = hfc4s8s_probe,
|
||||||
remove:__devexit_p(hfc4s8s_remove),
|
.remove = __devexit_p(hfc4s8s_remove),
|
||||||
id_table:hfc4s8s_ids,
|
.id_table = hfc4s8s_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**********************/
|
/**********************/
|
||||||
|
|
|
@ -151,7 +151,7 @@ static struct dvb_usb_properties dtt200u_properties = {
|
||||||
.cold_ids = { &dtt200u_usb_table[0], NULL },
|
.cold_ids = { &dtt200u_usb_table[0], NULL },
|
||||||
.warm_ids = { &dtt200u_usb_table[1], NULL },
|
.warm_ids = { &dtt200u_usb_table[1], NULL },
|
||||||
},
|
},
|
||||||
{ 0 },
|
{ NULL },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ static struct dvb_usb_properties wt220u_properties = {
|
||||||
.cold_ids = { &dtt200u_usb_table[2], NULL },
|
.cold_ids = { &dtt200u_usb_table[2], NULL },
|
||||||
.warm_ids = { &dtt200u_usb_table[3], NULL },
|
.warm_ids = { &dtt200u_usb_table[3], NULL },
|
||||||
},
|
},
|
||||||
{ 0 },
|
{ NULL },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ static struct dvb_usb_properties vp7045_properties = {
|
||||||
.cold_ids = { &vp7045_usb_table[2], NULL },
|
.cold_ids = { &vp7045_usb_table[2], NULL },
|
||||||
.warm_ids = { &vp7045_usb_table[3], NULL },
|
.warm_ids = { &vp7045_usb_table[3], NULL },
|
||||||
},
|
},
|
||||||
{ 0 },
|
{ NULL },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1896,7 +1896,7 @@ void smt_swap_para(struct smt_header *sm, int len, int direction)
|
||||||
|
|
||||||
static void smt_string_swap(char *data, const char *format, int len)
|
static void smt_string_swap(char *data, const char *format, int len)
|
||||||
{
|
{
|
||||||
const char *open_paren = 0 ;
|
const char *open_paren = NULL ;
|
||||||
int x ;
|
int x ;
|
||||||
|
|
||||||
while (len > 0 && *format) {
|
while (len > 0 && *format) {
|
||||||
|
|
Loading…
Reference in a new issue