From: Stephen Hemminger <shemminger@osdl.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: chas@cmf.nrl.navy.mil, linux-atm-general@lists.sourceforge.net,
netdev@vger.kernel.org, stable@kernel.org
Subject: [PATCH 3/4] clip: notifier related cleanups
Date: Thu, 13 Apr 2006 15:23:01 -0700 [thread overview]
Message-ID: <20060413152301.6c17f573@localhost.localdomain> (raw)
In-Reply-To: <20060413151945.0f181d04@localhost.localdomain>
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: Stephen Hemminger <shemminger@osdl.org>
--- clip.orig/net/atm/clip.c 2006-04-13 15:20:26.000000000 -0700
+++ clip/net/atm/clip.c 2006-04-13 15:20:38.000000000 -0700
@@ -443,7 +443,7 @@
}
clip_priv->stats.tx_packets++;
clip_priv->stats.tx_bytes += skb->len;
- (void)vcc->send(vcc, skb);
+ vcc->send(vcc, skb);
if (atm_may_send(vcc, 0)) {
entry->vccs->xoff = 0;
return 0;
@@ -620,26 +620,16 @@
switch (event) {
case NETDEV_UP:
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;
case NETDEV_GOING_DOWN:
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;
case NETDEV_CHANGE:
case NETDEV_CHANGEMTU:
DPRINTK("clip_device_event NETDEV_CHANGE*\n");
- (void)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);
+ to_atmarpd(act_change, PRIV(dev)->number, 0);
break;
}
return NOTIFY_DONE;
@@ -666,17 +656,13 @@
static struct notifier_block clip_dev_notifier = {
- clip_device_event,
- NULL,
- 0
+ .notifier_call = clip_device_event,
};
static struct notifier_block clip_inet_notifier = {
- clip_inet_event,
- NULL,
- 0
+ .notifier_call = clip_inet_event,
};
next prev parent reply other threads:[~2006-04-13 22:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 17:55 [PATCH] atm: clip causes unregister hang Stephen Hemminger
2006-04-12 18:08 ` Herbert Xu
2006-04-12 19:45 ` Stephen Hemminger
2006-04-12 20:00 ` Herbert Xu
2006-04-12 20:15 ` Stephen Hemminger
2006-04-12 20:25 ` Herbert Xu
2006-04-12 21:52 ` Stephen Hemminger
2006-04-12 22:42 ` [PATCH] atm: clip timer race Stephen Hemminger
2006-04-13 12:45 ` Herbert Xu
2006-04-13 17:26 ` Stephen Hemminger
2006-04-13 17:31 ` Herbert Xu
2006-04-13 21:08 ` Roland Dreier
2006-04-13 22:11 ` Herbert Xu
2006-04-14 22:56 ` David S. Miller
2006-04-13 12:28 ` [PATCH] atm: clip causes unregister hang Herbert Xu
2006-04-14 22:07 ` David S. Miller
2006-04-13 22:22 ` [PATCH 1/4] clip: run through Lindent Stephen Hemminger
2006-04-13 22:24 ` [PATCH 4/4] clip: add module info Stephen Hemminger
2006-04-13 22:45 ` [stable] [PATCH 1/4] clip: run through Lindent Greg KH
2006-04-14 9:01 ` David S. Miller
2006-04-14 22:58 ` David S. Miller
2006-04-14 22:59 ` David S. Miller
[not found] ` <20060413151945.0f181d04@localhost.localdomain>
2006-04-13 22:23 ` Stephen Hemminger [this message]
2006-04-13 22:23 ` [PATCH 2/4] clip: get rid of PROC_FS ifdef Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060413152301.6c17f573@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=chas@cmf.nrl.navy.mil \
--cc=davem@davemloft.net \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.