Commit ea110733 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

net: Remove casts of void *



Unnecessary casts of void * clutter the code.

These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.

Done via coccinelle script:

$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@

- pt = (T *)pv;
+ pt = pv;

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarPaul Moore <paul.moore@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@conan.davemloft.net>
parent 3c8def97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ static void *vlan_seq_next(struct seq_file *seq, void *v, loff_t *pos)

	++*pos;

	dev = (struct net_device *)v;
	dev = v;
	if (v == SEQ_START_TOKEN)
		dev = net_device_entry(&net->dev_base_head);

+1 −1
Original line number Diff line number Diff line
@@ -1005,7 +1005,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
	struct mpoa_client *mpc;
	struct lec_priv *priv;

	dev = (struct net_device *)dev_ptr;
	dev = dev_ptr;

	if (!net_eq(dev_net(dev), &init_net))
		return NOTIFY_DONE;
+1 −1
Original line number Diff line number Diff line
@@ -1313,7 +1313,7 @@ static void *dn_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)

	++*pos;

	dev = (struct net_device *)v;
	dev = v;
	if (v == SEQ_START_TOKEN)
		dev = net_device_entry(&init_net.dev_base_head);

+2 −2
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
{
	struct irda_sock *self;

	self = (struct irda_sock *) priv;
	self = priv;
	if (!self) {
		IRDA_WARNING("%s: lost myself!\n", __func__);
		return;
@@ -418,7 +418,7 @@ static void irda_selective_discovery_indication(discinfo_t *discovery,

	IRDA_DEBUG(2, "%s()\n", __func__);

	self = (struct irda_sock *) priv;
	self = priv;
	if (!self) {
		IRDA_WARNING("%s: lost myself!\n", __func__);
		return;
+1 −1
Original line number Diff line number Diff line
@@ -382,7 +382,7 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery,
	info.daddr = discovery->daddr;
	info.saddr = discovery->saddr;

	self = (struct ircomm_tty_cb *) priv;
	self = priv;
	ircomm_tty_do_event(self, IRCOMM_TTY_DISCOVERY_INDICATION,
			    NULL, &info);
}
Loading