Commit 5ff765f3 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[ATM] clip: notifier related cleanups

Cleanup some code around notifier.  Don't need (void) casts to ignore
return values, and use C90 style initializer. Just ignore unused device
events.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dcdb0275
...@@ -443,7 +443,7 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -443,7 +443,7 @@ static int clip_start_xmit(struct sk_buff *skb, struct net_device *dev)
} }
clip_priv->stats.tx_packets++; clip_priv->stats.tx_packets++;
clip_priv->stats.tx_bytes += skb->len; clip_priv->stats.tx_bytes += skb->len;
(void)vcc->send(vcc, skb); vcc->send(vcc, skb);
if (atm_may_send(vcc, 0)) { if (atm_may_send(vcc, 0)) {
entry->vccs->xoff = 0; entry->vccs->xoff = 0;
return 0; return 0;
...@@ -620,26 +620,16 @@ static int clip_device_event(struct notifier_block *this, unsigned long event, ...@@ -620,26 +620,16 @@ static int clip_device_event(struct notifier_block *this, unsigned long event,
switch (event) { switch (event) {
case NETDEV_UP: case NETDEV_UP:
DPRINTK("clip_device_event NETDEV_UP\n"); DPRINTK("clip_device_event NETDEV_UP\n");
(void)to_atmarpd(act_up, PRIV(dev)->number, 0); to_atmarpd(act_up, PRIV(dev)->number, 0);
break; break;
case NETDEV_GOING_DOWN: case NETDEV_GOING_DOWN:
DPRINTK("clip_device_event NETDEV_DOWN\n"); DPRINTK("clip_device_event NETDEV_DOWN\n");
(void)to_atmarpd(act_down, PRIV(dev)->number, 0); to_atmarpd(act_down, PRIV(dev)->number, 0);
break; break;
case NETDEV_CHANGE: case NETDEV_CHANGE:
case NETDEV_CHANGEMTU: case NETDEV_CHANGEMTU:
DPRINTK("clip_device_event NETDEV_CHANGE*\n"); DPRINTK("clip_device_event NETDEV_CHANGE*\n");
(void)to_atmarpd(act_change, PRIV(dev)->number, 0); to_atmarpd(act_change, PRIV(dev)->number, 0);
break;
case NETDEV_REBOOT:
case NETDEV_REGISTER:
case NETDEV_DOWN:
DPRINTK("clip_device_event %ld\n", event);
/* ignore */
break;
default:
printk(KERN_WARNING "clip_device_event: unknown event "
"%ld\n", event);
break; break;
} }
return NOTIFY_DONE; return NOTIFY_DONE;
...@@ -666,17 +656,13 @@ static int clip_inet_event(struct notifier_block *this, unsigned long event, ...@@ -666,17 +656,13 @@ static int clip_inet_event(struct notifier_block *this, unsigned long event,
static struct notifier_block clip_dev_notifier = { static struct notifier_block clip_dev_notifier = {
clip_device_event, .notifier_call = clip_device_event,
NULL,
0
}; };
static struct notifier_block clip_inet_notifier = { static struct notifier_block clip_inet_notifier = {
clip_inet_event, .notifier_call = clip_inet_event,
NULL,
0
}; };
......
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