Commit d4439fce authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: net/* NULL noise removal

parent a0bca188
...@@ -565,7 +565,7 @@ typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int le ...@@ -565,7 +565,7 @@ typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int le
extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf); extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf);
static inline int unregister_gifconf(unsigned int family) static inline int unregister_gifconf(unsigned int family)
{ {
return register_gifconf(family, 0); return register_gifconf(family, NULL);
} }
/* /*
......
...@@ -998,7 +998,7 @@ static int __init atm_clip_init(void) ...@@ -998,7 +998,7 @@ static int __init atm_clip_init(void)
/* so neigh_ifdown() doesn't complain */ /* so neigh_ifdown() doesn't complain */
clip_tbl.proxy_timer.data = 0; clip_tbl.proxy_timer.data = 0;
clip_tbl.proxy_timer.function = 0; clip_tbl.proxy_timer.function = NULL;
init_timer(&clip_tbl.proxy_timer); init_timer(&clip_tbl.proxy_timer);
skb_queue_head_init(&clip_tbl.proxy_queue); skb_queue_head_init(&clip_tbl.proxy_queue);
......
...@@ -135,7 +135,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb) ...@@ -135,7 +135,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
lock_sock(vcc->sk); lock_sock(vcc->sk);
if (vcc->sk->sk_ack_backlog == if (vcc->sk->sk_ack_backlog ==
vcc->sk->sk_max_ack_backlog) { vcc->sk->sk_max_ack_backlog) {
sigd_enq(0,as_reject,vcc,NULL,NULL); sigd_enq(NULL,as_reject,vcc,NULL,NULL);
goto as_indicate_complete; goto as_indicate_complete;
} }
vcc->sk->sk_ack_backlog++; vcc->sk->sk_ack_backlog++;
......
...@@ -354,7 +354,7 @@ static int __init bt_init(void) ...@@ -354,7 +354,7 @@ static int __init bt_init(void)
/* Init socket cache */ /* Init socket cache */
bt_sock_cache = kmem_cache_create("bt_sock", bt_sock_cache = kmem_cache_create("bt_sock",
sizeof(struct bt_sock), 0, sizeof(struct bt_sock), 0,
SLAB_HWCACHE_ALIGN, 0, 0); SLAB_HWCACHE_ALIGN, NULL, NULL);
if (!bt_sock_cache) { if (!bt_sock_cache) {
BT_ERR("Socket cache creation failed"); BT_ERR("Socket cache creation failed");
......
...@@ -91,7 +91,7 @@ static int bt_hotplug(struct class_device *cdev, char **envp, int num_envp, char ...@@ -91,7 +91,7 @@ static int bt_hotplug(struct class_device *cdev, char **envp, int num_envp, char
if ((size <= 0) || (i >= num_envp)) if ((size <= 0) || (i >= num_envp))
return -ENOMEM; return -ENOMEM;
envp[i] = 0; envp[i] = NULL;
return 0; return 0;
} }
#endif #endif
......
...@@ -1355,7 +1355,7 @@ static int __init init(void) ...@@ -1355,7 +1355,7 @@ static int __init init(void)
pginfos[i].udp_dst_max = 9; pginfos[i].udp_dst_max = 9;
sprintf(pginfos[i].fname, "net/%s/pg%i", PG_PROC_DIR, i); sprintf(pginfos[i].fname, "net/%s/pg%i", PG_PROC_DIR, i);
pginfos[i].proc_ent = create_proc_entry(pginfos[i].fname, 0600, 0); pginfos[i].proc_ent = create_proc_entry(pginfos[i].fname, 0600, NULL);
if (!pginfos[i].proc_ent) { if (!pginfos[i].proc_ent) {
printk("pktgen: Error: cannot create net/%s/pg procfs entry.\n", PG_PROC_DIR); printk("pktgen: Error: cannot create net/%s/pg procfs entry.\n", PG_PROC_DIR);
goto cleanup_mem; goto cleanup_mem;
...@@ -1366,7 +1366,7 @@ static int __init init(void) ...@@ -1366,7 +1366,7 @@ static int __init init(void)
pginfos[i].proc_ent->owner = THIS_MODULE; pginfos[i].proc_ent->owner = THIS_MODULE;
sprintf(pginfos[i].busy_fname, "net/%s/pg_busy%i", PG_PROC_DIR, i); sprintf(pginfos[i].busy_fname, "net/%s/pg_busy%i", PG_PROC_DIR, i);
pginfos[i].busy_proc_ent = create_proc_entry(pginfos[i].busy_fname, 0, 0); pginfos[i].busy_proc_ent = create_proc_entry(pginfos[i].busy_fname, 0, NULL);
if (!pginfos[i].busy_proc_ent) { if (!pginfos[i].busy_proc_ent) {
printk("pktgen: Error: cannot create net/%s/pg_busy procfs entry.\n", PG_PROC_DIR); printk("pktgen: Error: cannot create net/%s/pg_busy procfs entry.\n", PG_PROC_DIR);
goto cleanup_mem; goto cleanup_mem;
......
...@@ -1091,7 +1091,7 @@ static int econet_notifier(struct notifier_block *this, unsigned long msg, void ...@@ -1091,7 +1091,7 @@ static int econet_notifier(struct notifier_block *this, unsigned long msg, void
if (edev) if (edev)
{ {
if (net2dev_map[0] == dev) if (net2dev_map[0] == dev)
net2dev_map[0] = 0; net2dev_map[0] = NULL;
net2dev_map[edev->net] = NULL; net2dev_map[edev->net] = NULL;
kfree(edev); kfree(edev);
dev->ec_ptr = NULL; dev->ec_ptr = NULL;
......
...@@ -593,7 +593,7 @@ ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen) ...@@ -593,7 +593,7 @@ ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen)
/* Receive a packet */ /* Receive a packet */
iov.iov_base = buffer; iov.iov_base = buffer;
iov.iov_len = (size_t)buflen; iov.iov_len = (size_t)buflen;
msg.msg_name = 0; msg.msg_name = NULL;
msg.msg_namelen = 0; msg.msg_namelen = 0;
msg.msg_iov = &iov; msg.msg_iov = &iov;
msg.msg_iovlen = 1; msg.msg_iovlen = 1;
......
...@@ -51,7 +51,7 @@ __ip_vs_dst_check(struct ip_vs_dest *dest, u32 rtos, u32 cookie) ...@@ -51,7 +51,7 @@ __ip_vs_dst_check(struct ip_vs_dest *dest, u32 rtos, u32 cookie)
return NULL; return NULL;
if ((dst->obsolete || rtos != dest->dst_rtos) && if ((dst->obsolete || rtos != dest->dst_rtos) &&
dst->ops->check(dst, cookie) == NULL) { dst->ops->check(dst, cookie) == NULL) {
dest->dst_cache = 0; dest->dst_cache = NULL;
return NULL; return NULL;
} }
dst_hold(dst); dst_hold(dst);
......
...@@ -252,7 +252,7 @@ static unsigned char asn1_header_decode(struct asn1_ctx *ctx, ...@@ -252,7 +252,7 @@ static unsigned char asn1_header_decode(struct asn1_ctx *ctx,
if (def) if (def)
*eoc = ctx->pointer + len; *eoc = ctx->pointer + len;
else else
*eoc = 0; *eoc = NULL;
return 1; return 1;
} }
......
...@@ -696,7 +696,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i ...@@ -696,7 +696,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
ift = !max_addresses || ift = !max_addresses ||
ipv6_count_addresses(idev) < max_addresses ? ipv6_count_addresses(idev) < max_addresses ?
ipv6_add_addr(idev, &addr, tmp_plen, ipv6_add_addr(idev, &addr, tmp_plen,
ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK, IFA_F_TEMPORARY) : 0; ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK, IFA_F_TEMPORARY) : NULL;
if (!ift || IS_ERR(ift)) { if (!ift || IS_ERR(ift)) {
in6_dev_put(idev); in6_dev_put(idev);
in6_ifa_put(ifp); in6_ifa_put(ifp);
......
...@@ -719,13 +719,13 @@ static int __init inet6_init(void) ...@@ -719,13 +719,13 @@ static int __init inet6_init(void)
/* allocate our sock slab caches */ /* allocate our sock slab caches */
tcp6_sk_cachep = kmem_cache_create("tcp6_sock", tcp6_sk_cachep = kmem_cache_create("tcp6_sock",
sizeof(struct tcp6_sock), 0, sizeof(struct tcp6_sock), 0,
SLAB_HWCACHE_ALIGN, 0, 0); SLAB_HWCACHE_ALIGN, NULL, NULL);
udp6_sk_cachep = kmem_cache_create("udp6_sock", udp6_sk_cachep = kmem_cache_create("udp6_sock",
sizeof(struct udp6_sock), 0, sizeof(struct udp6_sock), 0,
SLAB_HWCACHE_ALIGN, 0, 0); SLAB_HWCACHE_ALIGN, NULL, NULL);
raw6_sk_cachep = kmem_cache_create("raw6_sock", raw6_sk_cachep = kmem_cache_create("raw6_sock",
sizeof(struct raw6_sock), 0, sizeof(struct raw6_sock), 0,
SLAB_HWCACHE_ALIGN, 0, 0); SLAB_HWCACHE_ALIGN, NULL, NULL);
if (!tcp6_sk_cachep || !udp6_sk_cachep || !raw6_sk_cachep) if (!tcp6_sk_cachep || !udp6_sk_cachep || !raw6_sk_cachep)
printk(KERN_CRIT "%s: Can't create protocol sock SLAB " printk(KERN_CRIT "%s: Can't create protocol sock SLAB "
"caches!\n", __FUNCTION__); "caches!\n", __FUNCTION__);
......
...@@ -202,7 +202,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, struct in6_addr *addr) ...@@ -202,7 +202,7 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
struct ipv6_ac_socklist *pac, *prev_pac; struct ipv6_ac_socklist *pac, *prev_pac;
write_lock_bh(&ipv6_sk_ac_lock); write_lock_bh(&ipv6_sk_ac_lock);
prev_pac = 0; prev_pac = NULL;
for (pac = np->ipv6_ac_list; pac; pac = pac->acl_next) { for (pac = np->ipv6_ac_list; pac; pac = pac->acl_next) {
if ((ifindex == 0 || pac->acl_ifindex == ifindex) && if ((ifindex == 0 || pac->acl_ifindex == ifindex) &&
ipv6_addr_cmp(&pac->acl_addr, addr) == 0) ipv6_addr_cmp(&pac->acl_addr, addr) == 0)
...@@ -232,13 +232,13 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, struct in6_addr *addr) ...@@ -232,13 +232,13 @@ int ipv6_sock_ac_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
void ipv6_sock_ac_close(struct sock *sk) void ipv6_sock_ac_close(struct sock *sk)
{ {
struct ipv6_pinfo *np = inet6_sk(sk); struct ipv6_pinfo *np = inet6_sk(sk);
struct net_device *dev = 0; struct net_device *dev = NULL;
struct ipv6_ac_socklist *pac; struct ipv6_ac_socklist *pac;
int prev_index; int prev_index;
write_lock_bh(&ipv6_sk_ac_lock); write_lock_bh(&ipv6_sk_ac_lock);
pac = np->ipv6_ac_list; pac = np->ipv6_ac_list;
np->ipv6_ac_list = 0; np->ipv6_ac_list = NULL;
write_unlock_bh(&ipv6_sk_ac_lock); write_unlock_bh(&ipv6_sk_ac_lock);
prev_index = 0; prev_index = 0;
...@@ -373,7 +373,7 @@ int ipv6_dev_ac_dec(struct net_device *dev, struct in6_addr *addr) ...@@ -373,7 +373,7 @@ int ipv6_dev_ac_dec(struct net_device *dev, struct in6_addr *addr)
return -ENODEV; return -ENODEV;
write_lock_bh(&idev->lock); write_lock_bh(&idev->lock);
prev_aca = 0; prev_aca = NULL;
for (aca = idev->ac_list; aca; aca = aca->aca_next) { for (aca = idev->ac_list; aca; aca = aca->aca_next) {
if (ipv6_addr_cmp(&aca->aca_addr, addr) == 0) if (ipv6_addr_cmp(&aca->aca_addr, addr) == 0)
break; break;
......
...@@ -561,7 +561,7 @@ static int ip6_fragment(struct sk_buff **pskb, int (*output)(struct sk_buff**)) ...@@ -561,7 +561,7 @@ static int ip6_fragment(struct sk_buff **pskb, int (*output)(struct sk_buff**))
err = 0; err = 0;
offset = 0; offset = 0;
frag = skb_shinfo(skb)->frag_list; frag = skb_shinfo(skb)->frag_list;
skb_shinfo(skb)->frag_list = 0; skb_shinfo(skb)->frag_list = NULL;
/* BUILD HEADER */ /* BUILD HEADER */
tmp_hdr = kmalloc(hlen, GFP_ATOMIC); tmp_hdr = kmalloc(hlen, GFP_ATOMIC);
......
...@@ -210,7 +210,7 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, struct in6_addr *addr) ...@@ -210,7 +210,7 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, struct in6_addr *addr)
mc_lst->ifindex = dev->ifindex; mc_lst->ifindex = dev->ifindex;
mc_lst->sfmode = MCAST_EXCLUDE; mc_lst->sfmode = MCAST_EXCLUDE;
mc_lst->sflist = 0; mc_lst->sflist = NULL;
/* /*
* now add/increase the group membership on the device * now add/increase the group membership on the device
...@@ -272,8 +272,8 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr) ...@@ -272,8 +272,8 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, struct in6_addr *addr)
struct inet6_dev *ip6_mc_find_dev(struct in6_addr *group, int ifindex) struct inet6_dev *ip6_mc_find_dev(struct in6_addr *group, int ifindex)
{ {
struct net_device *dev = 0; struct net_device *dev = NULL;
struct inet6_dev *idev = 0; struct inet6_dev *idev = NULL;
if (ifindex == 0) { if (ifindex == 0) {
struct rt6_info *rt; struct rt6_info *rt;
...@@ -288,18 +288,18 @@ struct inet6_dev *ip6_mc_find_dev(struct in6_addr *group, int ifindex) ...@@ -288,18 +288,18 @@ struct inet6_dev *ip6_mc_find_dev(struct in6_addr *group, int ifindex)
dev = dev_get_by_index(ifindex); dev = dev_get_by_index(ifindex);
if (!dev) if (!dev)
return 0; return NULL;
idev = in6_dev_get(dev); idev = in6_dev_get(dev);
if (!idev) { if (!idev) {
dev_put(dev); dev_put(dev);
return 0; return NULL;
} }
read_lock_bh(&idev->lock); read_lock_bh(&idev->lock);
if (idev->dead) { if (idev->dead) {
read_unlock_bh(&idev->lock); read_unlock_bh(&idev->lock);
in6_dev_put(idev); in6_dev_put(idev);
dev_put(dev); dev_put(dev);
return 0; return NULL;
} }
return idev; return idev;
} }
...@@ -378,8 +378,8 @@ int ip6_mc_source(int add, int omode, struct sock *sk, ...@@ -378,8 +378,8 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
goto done; goto done;
} else if (pmc->sfmode != omode) { } else if (pmc->sfmode != omode) {
/* allow mode switches for empty-set filters */ /* allow mode switches for empty-set filters */
ip6_mc_add_src(idev, group, omode, 0, 0, 0); ip6_mc_add_src(idev, group, omode, 0, NULL, 0);
ip6_mc_del_src(idev, group, pmc->sfmode, 0, 0, 0); ip6_mc_del_src(idev, group, pmc->sfmode, 0, NULL, 0);
pmc->sfmode = omode; pmc->sfmode = omode;
} }
...@@ -509,14 +509,14 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf) ...@@ -509,14 +509,14 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
goto done; goto done;
} }
} else } else
newpsl = 0; newpsl = NULL;
psl = pmc->sflist; psl = pmc->sflist;
if (psl) { if (psl) {
(void) ip6_mc_del_src(idev, group, pmc->sfmode, (void) ip6_mc_del_src(idev, group, pmc->sfmode,
psl->sl_count, psl->sl_addr, 0); psl->sl_count, psl->sl_addr, 0);
sock_kfree_s(sk, psl, IP6_SFLSIZE(psl->sl_max)); sock_kfree_s(sk, psl, IP6_SFLSIZE(psl->sl_max));
} else } else
(void) ip6_mc_del_src(idev, group, pmc->sfmode, 0, 0, 0); (void) ip6_mc_del_src(idev, group, pmc->sfmode, 0, NULL, 0);
pmc->sflist = newpsl; pmc->sflist = newpsl;
pmc->sfmode = gsf->gf_fmode; pmc->sfmode = gsf->gf_fmode;
done: done:
...@@ -718,7 +718,7 @@ static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im) ...@@ -718,7 +718,7 @@ static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *im)
pmc->mca_tomb = im->mca_tomb; pmc->mca_tomb = im->mca_tomb;
pmc->mca_sources = im->mca_sources; pmc->mca_sources = im->mca_sources;
im->mca_tomb = im->mca_sources = 0; im->mca_tomb = im->mca_sources = NULL;
for (psf=pmc->mca_sources; psf; psf=psf->sf_next) for (psf=pmc->mca_sources; psf; psf=psf->sf_next)
psf->sf_crcount = pmc->mca_crcount; psf->sf_crcount = pmc->mca_crcount;
} }
...@@ -736,7 +736,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca) ...@@ -736,7 +736,7 @@ static void mld_del_delrec(struct inet6_dev *idev, struct in6_addr *pmca)
struct ip6_sf_list *psf, *psf_next; struct ip6_sf_list *psf, *psf_next;
write_lock_bh(&idev->mc_lock); write_lock_bh(&idev->mc_lock);
pmc_prev = 0; pmc_prev = NULL;
for (pmc=idev->mc_tomb; pmc; pmc=pmc->next) { for (pmc=idev->mc_tomb; pmc; pmc=pmc->next) {
if (ipv6_addr_cmp(&pmc->mca_addr, pmca) == 0) if (ipv6_addr_cmp(&pmc->mca_addr, pmca) == 0)
break; break;
...@@ -765,7 +765,7 @@ static void mld_clear_delrec(struct inet6_dev *idev) ...@@ -765,7 +765,7 @@ static void mld_clear_delrec(struct inet6_dev *idev)
write_lock_bh(&idev->mc_lock); write_lock_bh(&idev->mc_lock);
pmc = idev->mc_tomb; pmc = idev->mc_tomb;
idev->mc_tomb = 0; idev->mc_tomb = NULL;
write_unlock_bh(&idev->mc_lock); write_unlock_bh(&idev->mc_lock);
for (; pmc; pmc = nextpmc) { for (; pmc; pmc = nextpmc) {
...@@ -782,7 +782,7 @@ static void mld_clear_delrec(struct inet6_dev *idev) ...@@ -782,7 +782,7 @@ static void mld_clear_delrec(struct inet6_dev *idev)
spin_lock_bh(&pmc->mca_lock); spin_lock_bh(&pmc->mca_lock);
psf = pmc->mca_tomb; psf = pmc->mca_tomb;
pmc->mca_tomb = 0; pmc->mca_tomb = NULL;
spin_unlock_bh(&pmc->mca_lock); spin_unlock_bh(&pmc->mca_lock);
for (; psf; psf=psf_next) { for (; psf; psf=psf_next) {
psf_next = psf->sf_next; psf_next = psf->sf_next;
...@@ -818,7 +818,7 @@ int ipv6_dev_mc_inc(struct net_device *dev, struct in6_addr *addr) ...@@ -818,7 +818,7 @@ int ipv6_dev_mc_inc(struct net_device *dev, struct in6_addr *addr)
mc->mca_users++; mc->mca_users++;
write_unlock_bh(&idev->lock); write_unlock_bh(&idev->lock);
ip6_mc_add_src(idev, &mc->mca_addr, MCAST_EXCLUDE, 0, ip6_mc_add_src(idev, &mc->mca_addr, MCAST_EXCLUDE, 0,
0, 0); NULL, 0);
in6_dev_put(idev); in6_dev_put(idev);
return 0; return 0;
} }
...@@ -1274,7 +1274,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size) ...@@ -1274,7 +1274,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
skb = sock_alloc_send_skb(sk, size + LL_RESERVED_SPACE(dev), 1, &err); skb = sock_alloc_send_skb(sk, size + LL_RESERVED_SPACE(dev), 1, &err);
if (skb == 0) if (skb == 0)
return 0; return NULL;
skb_reserve(skb, LL_RESERVED_SPACE(dev)); skb_reserve(skb, LL_RESERVED_SPACE(dev));
if (dev->hard_header) { if (dev->hard_header) {
...@@ -1283,7 +1283,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size) ...@@ -1283,7 +1283,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
ndisc_mc_map(&mld2_all_mcr, ha, dev, 1); ndisc_mc_map(&mld2_all_mcr, ha, dev, 1);
if (dev->hard_header(skb, dev, ETH_P_IPV6,ha,NULL,size) < 0) { if (dev->hard_header(skb, dev, ETH_P_IPV6,ha,NULL,size) < 0) {
kfree_skb(skb); kfree_skb(skb);
return 0; return NULL;
} }
} }
...@@ -1352,7 +1352,7 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc, ...@@ -1352,7 +1352,7 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc,
if (!skb) if (!skb)
skb = mld_newpack(dev, dev->mtu); skb = mld_newpack(dev, dev->mtu);
if (!skb) if (!skb)
return 0; return NULL;
pgr = (struct mld2_grec *)skb_put(skb, sizeof(struct mld2_grec)); pgr = (struct mld2_grec *)skb_put(skb, sizeof(struct mld2_grec));
pgr->grec_type = type; pgr->grec_type = type;
pgr->grec_auxwords = 0; pgr->grec_auxwords = 0;
...@@ -1372,7 +1372,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, ...@@ -1372,7 +1372,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
{ {
struct net_device *dev = pmc->idev->dev; struct net_device *dev = pmc->idev->dev;
struct mld2_report *pmr; struct mld2_report *pmr;
struct mld2_grec *pgr = 0; struct mld2_grec *pgr = NULL;
struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list; struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list;
int scount, first, isquery, truncate; int scount, first, isquery, truncate;
...@@ -1397,13 +1397,13 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, ...@@ -1397,13 +1397,13 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)+ if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)+
sizeof(struct in6_addr)) { sizeof(struct in6_addr)) {
mld_sendpack(skb); mld_sendpack(skb);
skb = 0; /* add_grhead will get a new one */ skb = NULL; /* add_grhead will get a new one */
} }
skb = add_grhead(skb, pmc, type, &pgr); skb = add_grhead(skb, pmc, type, &pgr);
} }
return skb; return skb;
} }
pmr = skb ? (struct mld2_report *)skb->h.raw : 0; pmr = skb ? (struct mld2_report *)skb->h.raw : NULL;
/* EX and TO_EX get a fresh packet, if needed */ /* EX and TO_EX get a fresh packet, if needed */
if (truncate) { if (truncate) {
...@@ -1416,7 +1416,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, ...@@ -1416,7 +1416,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
} }
first = 1; first = 1;
scount = 0; scount = 0;
psf_prev = 0; psf_prev = NULL;
for (psf=*psf_list; psf; psf=psf_next) { for (psf=*psf_list; psf; psf=psf_next) {
struct in6_addr *psrc; struct in6_addr *psrc;
...@@ -1474,7 +1474,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, ...@@ -1474,7 +1474,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc) static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc)
{ {
struct sk_buff *skb = 0; struct sk_buff *skb = NULL;
int type; int type;
if (!pmc) { if (!pmc) {
...@@ -1511,7 +1511,7 @@ static void mld_clear_zeros(struct ip6_sf_list **ppsf) ...@@ -1511,7 +1511,7 @@ static void mld_clear_zeros(struct ip6_sf_list **ppsf)
{ {
struct ip6_sf_list *psf_prev, *psf_next, *psf; struct ip6_sf_list *psf_prev, *psf_next, *psf;
psf_prev = 0; psf_prev = NULL;
for (psf=*ppsf; psf; psf = psf_next) { for (psf=*ppsf; psf; psf = psf_next) {
psf_next = psf->sf_next; psf_next = psf->sf_next;
if (psf->sf_crcount == 0) { if (psf->sf_crcount == 0) {
...@@ -1528,14 +1528,14 @@ static void mld_clear_zeros(struct ip6_sf_list **ppsf) ...@@ -1528,14 +1528,14 @@ static void mld_clear_zeros(struct ip6_sf_list **ppsf)
static void mld_send_cr(struct inet6_dev *idev) static void mld_send_cr(struct inet6_dev *idev)
{ {
struct ifmcaddr6 *pmc, *pmc_prev, *pmc_next; struct ifmcaddr6 *pmc, *pmc_prev, *pmc_next;
struct sk_buff *skb = 0; struct sk_buff *skb = NULL;
int type, dtype; int type, dtype;
read_lock_bh(&idev->lock); read_lock_bh(&idev->lock);
write_lock_bh(&idev->mc_lock); write_lock_bh(&idev->mc_lock);
/* deleted MCA's */ /* deleted MCA's */
pmc_prev = 0; pmc_prev = NULL;
for (pmc=idev->mc_tomb; pmc; pmc=pmc_next) { for (pmc=idev->mc_tomb; pmc; pmc=pmc_next) {
pmc_next = pmc->next; pmc_next = pmc->next;
if (pmc->mca_sfmode == MCAST_INCLUDE) { if (pmc->mca_sfmode == MCAST_INCLUDE) {
...@@ -1691,7 +1691,7 @@ static int ip6_mc_del1_src(struct ifmcaddr6 *pmc, int sfmode, ...@@ -1691,7 +1691,7 @@ static int ip6_mc_del1_src(struct ifmcaddr6 *pmc, int sfmode,
struct ip6_sf_list *psf, *psf_prev; struct ip6_sf_list *psf, *psf_prev;
int rv = 0; int rv = 0;
psf_prev = 0; psf_prev = NULL;
for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { for (psf=pmc->mca_sources; psf; psf=psf->sf_next) {
if (ipv6_addr_cmp(&psf->sf_addr, psfsrc) == 0) if (ipv6_addr_cmp(&psf->sf_addr, psfsrc) == 0)
break; break;
...@@ -1786,7 +1786,7 @@ static int ip6_mc_add1_src(struct ifmcaddr6 *pmc, int sfmode, ...@@ -1786,7 +1786,7 @@ static int ip6_mc_add1_src(struct ifmcaddr6 *pmc, int sfmode,
{ {
struct ip6_sf_list *psf, *psf_prev; struct ip6_sf_list *psf, *psf_prev;
psf_prev = 0; psf_prev = NULL;
for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { for (psf=pmc->mca_sources; psf; psf=psf->sf_next) {
if (ipv6_addr_cmp(&psf->sf_addr, psfsrc) == 0) if (ipv6_addr_cmp(&psf->sf_addr, psfsrc) == 0)
break; break;
...@@ -1914,12 +1914,12 @@ static void ip6_mc_clear_src(struct ifmcaddr6 *pmc) ...@@ -1914,12 +1914,12 @@ static void ip6_mc_clear_src(struct ifmcaddr6 *pmc)
nextpsf = psf->sf_next; nextpsf = psf->sf_next;
kfree(psf); kfree(psf);
} }
pmc->mca_tomb = 0; pmc->mca_tomb = NULL;
for (psf=pmc->mca_sources; psf; psf=nextpsf) { for (psf=pmc->mca_sources; psf; psf=nextpsf) {
nextpsf = psf->sf_next; nextpsf = psf->sf_next;
kfree(psf); kfree(psf);
} }
pmc->mca_sources = 0; pmc->mca_sources = NULL;
pmc->mca_sfmode = MCAST_EXCLUDE; pmc->mca_sfmode = MCAST_EXCLUDE;
pmc->mca_sfcount[MCAST_EXCLUDE] = 0; pmc->mca_sfcount[MCAST_EXCLUDE] = 0;
pmc->mca_sfcount[MCAST_EXCLUDE] = 1; pmc->mca_sfcount[MCAST_EXCLUDE] = 1;
...@@ -1956,12 +1956,12 @@ int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml, ...@@ -1956,12 +1956,12 @@ int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml,
if (iml->sflist == 0) { if (iml->sflist == 0) {
/* any-source empty exclude case */ /* any-source empty exclude case */
return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, 0, 0); return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, NULL, 0);
} }
err = ip6_mc_del_src(idev, &iml->addr, iml->sfmode, err = ip6_mc_del_src(idev, &iml->addr, iml->sfmode,
iml->sflist->sl_count, iml->sflist->sl_addr, 0); iml->sflist->sl_count, iml->sflist->sl_addr, 0);
sock_kfree_s(sk, iml->sflist, IP6_SFLSIZE(iml->sflist->sl_max)); sock_kfree_s(sk, iml->sflist, IP6_SFLSIZE(iml->sflist->sl_max));
iml->sflist = 0; iml->sflist = NULL;
return err; return err;
} }
...@@ -1982,7 +1982,7 @@ static void mld_gq_timer_expire(unsigned long data) ...@@ -1982,7 +1982,7 @@ static void mld_gq_timer_expire(unsigned long data)
struct inet6_dev *idev = (struct inet6_dev *)data; struct inet6_dev *idev = (struct inet6_dev *)data;
idev->mc_gq_running = 0; idev->mc_gq_running = 0;
mld_send_report(idev, 0); mld_send_report(idev, NULL);
__in6_dev_put(idev); __in6_dev_put(idev);
} }
...@@ -2074,7 +2074,7 @@ void ipv6_mc_init_dev(struct inet6_dev *idev) ...@@ -2074,7 +2074,7 @@ void ipv6_mc_init_dev(struct inet6_dev *idev)
init_timer(&idev->mc_gq_timer); init_timer(&idev->mc_gq_timer);
idev->mc_gq_timer.data = (unsigned long) idev; idev->mc_gq_timer.data = (unsigned long) idev;
idev->mc_gq_timer.function = &mld_gq_timer_expire; idev->mc_gq_timer.function = &mld_gq_timer_expire;
idev->mc_tomb = 0; idev->mc_tomb = NULL;
idev->mc_ifc_count = 0; idev->mc_ifc_count = 0;
init_timer(&idev->mc_ifc_timer); init_timer(&idev->mc_ifc_timer);
idev->mc_ifc_timer.data = (unsigned long) idev; idev->mc_ifc_timer.data = (unsigned long) idev;
......
...@@ -561,7 +561,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -561,7 +561,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
tty->ldisc.flush_buffer(tty); tty->ldisc.flush_buffer(tty);
tty->closing = 0; tty->closing = 0;
self->tty = 0; self->tty = NULL;
if (self->blocked_open) { if (self->blocked_open) {
if (self->close_delay) { if (self->close_delay) {
...@@ -1045,7 +1045,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty) ...@@ -1045,7 +1045,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
/* I guess we need to lock here - Jean II */ /* I guess we need to lock here - Jean II */
spin_lock_irqsave(&self->spinlock, flags); spin_lock_irqsave(&self->spinlock, flags);
self->flags &= ~ASYNC_NORMAL_ACTIVE; self->flags &= ~ASYNC_NORMAL_ACTIVE;
self->tty = 0; self->tty = NULL;
self->open_count = 0; self->open_count = 0;
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
......
...@@ -1491,7 +1491,7 @@ void *irlmp_register_service(__u16 hints) ...@@ -1491,7 +1491,7 @@ void *irlmp_register_service(__u16 hints)
service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC);
if (!service) { if (!service) {
IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__); IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
return 0; return NULL;
} }
service->hints.word = hints; service->hints.word = hints;
hashbin_insert(irlmp->services, (irda_queue_t *) service, hashbin_insert(irlmp->services, (irda_queue_t *) service,
...@@ -1561,13 +1561,13 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb, ...@@ -1561,13 +1561,13 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb,
irlmp_client_t *client; irlmp_client_t *client;
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(irlmp != NULL, return 0;); ASSERT(irlmp != NULL, return NULL;);
/* Make a new registration */ /* Make a new registration */
client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC);
if (!client) { if (!client) {
IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __FUNCTION__); IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
return 0; return NULL;
} }
/* Register the details */ /* Register the details */
......
...@@ -134,7 +134,7 @@ void sctp_proc_exit(void) ...@@ -134,7 +134,7 @@ void sctp_proc_exit(void)
if (proc_net_sctp) { if (proc_net_sctp) {
proc_net_sctp = NULL; proc_net_sctp = NULL;
remove_proc_entry("net/sctp", 0); remove_proc_entry("net/sctp", NULL);
} }
} }
......
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