| To: | Jeff Garzik <jgarzik@xxxxxxxxx> |
|---|---|
| Subject: | [PATCH] replace sppp_of macro with inline |
| From: | Stephen Hemminger <shemminger@xxxxxxxx> |
| Date: | Tue, 16 Sep 2003 16:55:37 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| Organization: | Open Source Development Lab |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Replace macro with inline and get some type checking.
diff -Nru a/include/net/syncppp.h b/include/net/syncppp.h
--- a/include/net/syncppp.h Tue Sep 16 16:54:39 2003
+++ b/include/net/syncppp.h Tue Sep 16 16:54:39 2003
@@ -57,8 +57,11 @@
struct sppp sppp; /* Synchronous PPP */
};
-#define sppp_of(dev) \
- (&((struct ppp_device *)(*(unsigned long *)((dev)->priv)))->sppp)
+static inline struct sppp *sppp_of(struct net_device *dev)
+{
+ struct ppp_device *ppp = dev->priv;
+ return &ppp->sppp;
+}
#define PP_KEEPALIVE 0x01 /* use keepalive protocol */
#define PP_CISCO 0x02 /* use Cisco protocol instead of PPP */
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] fix up hostess driver, Stephen Hemminger |
|---|---|
| Next by Date: | Re: ipt_physdev.c alignment problems on parisc64, David S. Miller |
| Previous by Thread: | [PATCH] fix up hostess driver, Stephen Hemminger |
| Next by Thread: | Re: [PATCH] replace sppp_of macro with inline, Jeff Garzik |
| Indexes: | [Date] [Thread] [Top] [All Lists] |