[PATCH] wavelan_cs: stop inlining largish static functions

Previous thread: Re: + hotplug-memory-adding-non-section-aligned-memory-is-bad.patch added to -mm tree by KAMEZAWA Hiroyuki on Monday, March 31, 2008 - 5:48 pm. (1 message)

Next thread: Clarifying platform_device_unregister by Jaya Kumar on Monday, March 31, 2008 - 6:14 pm. (7 messages)
From: Denys Vlasenko
Date: Monday, March 31, 2008 - 5:56 pm

Hi John,

Can you please take a look at this patch?

drivers/net/wireless/wavelan_cs.c has unusually large number
of static inline functions - 27.

I looked through them and 20 of them do not seem to warrant inlining.
Some are really big; others call mdelay(1) or busy-wait for a bit
to be set in a hardware register - it's pointless
to optimize such functions for speed.

This patch removes "inline" from these static function
(regardless of number of callsites - gcc nowadays auto-inlines
statics with one callsite).

Size difference for 32bit x86:

   text    data     bss     dec     hex filename
  17020     372       8   17400    43f8 linux-2.6-ALLYES/drivers/net/wireless/wavelan_cs.o
  14032     356       8   14396    383c linux-2.6.inline-ALLYES/drivers/net/wireless/wavelan_cs.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
Previous thread: Re: + hotplug-memory-adding-non-section-aligned-memory-is-bad.patch added to -mm tree by KAMEZAWA Hiroyuki on Monday, March 31, 2008 - 5:48 pm. (1 message)

Next thread: Clarifying platform_device_unregister by Jaya Kumar on Monday, March 31, 2008 - 6:14 pm. (7 messages)