netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, jt@hpl.hp.com
Subject: [PATCH 7/9] wext: reduce inline abuse
Date: Tue, 24 Apr 2007 20:07:39 +0200	[thread overview]
Message-ID: <20070424180849.651555000@sipsolutions.net> (raw)
In-Reply-To: 20070424180732.371620000@sipsolutions.net

[-- Attachment #1: wext-uninline.patch --]
[-- Type: text/plain, Size: 3737 bytes --]

This patch removes a bunch of inline abuse from wext. Most functions
that were marked inline are only used once so the compiler will inline
them anyway, others are used multiple times but there's no requirement
for them to be inline since they aren't in any fast paths.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

---
 net/wireless/wext.c |   29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

--- net-2.6.22.orig/net/wireless/wext.c	2007-04-24 19:13:50.288804911 +0200
+++ net-2.6.22/net/wireless/wext.c	2007-04-24 19:18:49.198804911 +0200
@@ -440,10 +440,8 @@ static const int event_type_pk_size[] = 
 /* ---------------------------------------------------------------- */
 /*
  * Return the driver handler associated with a specific Wireless Extension.
- * Called from various place, so make sure it remains efficient.
  */
-static inline iw_handler get_handler(struct net_device *dev,
-				     unsigned int cmd)
+static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
 {
 	/* Don't "optimise" the following variable, it will crash */
 	unsigned int	index;		/* *MUST* be unsigned */
@@ -470,7 +468,7 @@ static inline iw_handler get_handler(str
 /*
  * Get statistics out of the driver
  */
-static inline struct iw_statistics *get_wireless_stats(struct net_device *dev)
+static struct iw_statistics *get_wireless_stats(struct net_device *dev)
 {
 	/* New location */
 	if ((dev->wireless_handlers != NULL) &&
@@ -500,7 +498,7 @@ static inline struct iw_statistics *get_
  * netif_running(dev) test. I'm open on that one...
  * Hopefully, the driver will remember to do a commit in "open()" ;-)
  */
-static inline int call_commit_handler(struct net_device *	dev)
+static int call_commit_handler(struct net_device *dev)
 {
 	if ((netif_running(dev)) &&
 	   (dev->wireless_handlers->standard[0] != NULL)) {
@@ -622,8 +620,8 @@ static int iw_handler_get_private(struct
 /*
  * Print one entry (line) of /proc/net/wireless
  */
-static __inline__ void wireless_seq_printf_stats(struct seq_file *seq,
-						 struct net_device *dev)
+static void wireless_seq_printf_stats(struct seq_file *seq,
+				      struct net_device *dev)
 {
 	/* Get stats from the driver */
 	struct iw_statistics *stats = get_wireless_stats(dev);
@@ -892,10 +890,8 @@ static int ioctl_standard_call(struct ne
  * a iw_handler but process it in your ioctl handler (i.e. use the
  * old driver API).
  */
-static inline int ioctl_private_call(struct net_device *	dev,
-				     struct ifreq *		ifr,
-				     unsigned int		cmd,
-				     iw_handler		handler)
+static int ioctl_private_call(struct net_device *dev, struct ifreq *ifr,
+			      unsigned int cmd, iw_handler handler)
 {
 	struct iwreq *			iwr = (struct iwreq *) ifr;
 	const struct iw_priv_args *	descr = NULL;
@@ -1134,11 +1130,8 @@ static DECLARE_TASKLET(wireless_nlevent_
  * current wireless config. Dumping the wireless config is far too
  * expensive (for each parameter, the driver need to query the hardware).
  */
-static inline int rtnetlink_fill_iwinfo(struct sk_buff *	skb,
-					struct net_device *	dev,
-					int			type,
-					char *			event,
-					int			event_len)
+static int rtnetlink_fill_iwinfo(struct sk_buff *skb, struct net_device *dev,
+				 int type, char *event, int event_len)
 {
 	struct ifinfomsg *r;
 	struct nlmsghdr  *nlh;
@@ -1172,9 +1165,7 @@ rtattr_failure:
  * Andrzej Krzysztofowicz mandated that I used a IFLA_XXX field
  * within a RTM_NEWLINK event.
  */
-static inline void rtmsg_iwinfo(struct net_device *	dev,
-				char *			event,
-				int			event_len)
+static void rtmsg_iwinfo(struct net_device *dev, char *event, int event_len)
 {
 	struct sk_buff *skb;
 	int size = NLMSG_GOODSIZE;

--


  parent reply	other threads:[~2007-04-26  9:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 18:07 [PATCH 0/9] various wext cleanups Johannes Berg
2007-04-24 18:07 ` [PATCH 1/9] wext: move to net/wireless Johannes Berg
2007-04-24 18:07 ` [PATCH 2/9] wext: clean up how wext is called Johannes Berg
2007-04-24 18:07 ` [PATCH 3/9] wext: remove dead debug code Johannes Berg
     [not found]   ` <20070424180847.982382000-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2007-04-26 16:46     ` Jean Tourrilhes
     [not found]       ` <20070426164632.GA22576-yAE0UhLNZJawPNPzzlOzwdBPR1lH4CV8@public.gmane.org>
2007-04-27  0:55         ` John W. Linville
2007-04-24 18:07 ` [PATCH 4/9] wext: remove options Johannes Berg
2007-04-24 18:07 ` [PATCH 5/9] wext: cleanup early ioctl call path Johannes Berg
2007-04-24 18:07 ` [PATCH 6/9] wext: move EXPORT_SYMBOL statements where they belong Johannes Berg
2007-04-24 18:07 ` Johannes Berg [this message]
2007-04-26 16:50   ` [PATCH 7/9] wext: reduce inline abuse Jean Tourrilhes
2007-04-26 17:03     ` Michael Buesch
     [not found]       ` <200704261903.27932.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2007-04-26 17:15         ` Jean Tourrilhes
2007-04-26 21:37           ` David Miller
     [not found]     ` <20070426165032.GB22576-yAE0UhLNZJawPNPzzlOzwdBPR1lH4CV8@public.gmane.org>
2007-04-26 17:14       ` Johannes Berg
2007-04-24 18:07 ` [PATCH 8/9] wext: misc code cleanups Johannes Berg
2007-04-24 18:07 ` [PATCH 9/9] net_device: dont include wext bits if not required Johannes Berg
     [not found]   ` <20070424180850.595757000-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2007-04-26 16:53     ` Jean Tourrilhes
2007-04-26 17:08       ` Johannes Berg
     [not found]       ` <20070426165304.GC22576-yAE0UhLNZJawPNPzzlOzwdBPR1lH4CV8@public.gmane.org>
2007-04-27  0:50         ` John W. Linville
     [not found] ` <20070424180732.371620000-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2007-04-26 10:15   ` [PATCH 0/9] various wext cleanups Johannes Berg
2007-04-26 10:18     ` David Miller
     [not found]       ` <20070426.031842.17863787.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-04-26 11:05         ` Johannes Berg
2007-04-26 10:19   ` David Miller
     [not found]     ` <20070426.031921.133286083.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-04-27  1:12       ` John W. Linville
2007-04-27  2:36         ` David Miller
2007-04-27  3:48 ` David Miller

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=20070424180849.651555000@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=jt@hpl.hp.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.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 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).