* [PATCH] replace sppp_of macro with inline
@ 2003-09-16 23:55 Stephen Hemminger
2003-09-20 17:57 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2003-09-16 23:55 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] replace sppp_of macro with inline
2003-09-16 23:55 [PATCH] replace sppp_of macro with inline Stephen Hemminger
@ 2003-09-20 17:57 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2003-09-20 17:57 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-20 17:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-16 23:55 [PATCH] replace sppp_of macro with inline Stephen Hemminger
2003-09-20 17:57 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).