aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sb1000.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2008-03-30 19:02:43 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:41:43 -0400
commita8d06342baab56901bfd70c4f66be382d4b9967d (patch)
tree379229d047769a28f31e425d84bd69fd56024d21 /drivers/net/sb1000.c
parentaa39432326a91a7b819ec3f8d78b05e04b708ce5 (diff)
sb1000.c: stop inlining largish static functions
drivers/net/sb1000.c has lots of inlined static functions. Mst of them are used at initialization, wait for some hardware register to change (wait using yield, sleep etc), or do slow port-based I/O. Inlining thse "for speed" makes no sense. This patch removes "inline" from biggest 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 6299 129 0 6428 191c linux-2.6-ALLYES/drivers/net/sb1000.o 5418 129 0 5547 15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sb1000.c')
-rw-r--r--drivers/net/sb1000.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
index 487f9d2ac5b4..829d0ea2709d 100644
--- a/drivers/net/sb1000.c
+++ b/drivers/net/sb1000.c
@@ -88,31 +88,31 @@ static int sb1000_close(struct net_device *dev);
88 88
89 89
90/* SB1000 hardware routines to be used during open/configuration phases */ 90/* SB1000 hardware routines to be used during open/configuration phases */
91static inline int card_wait_for_busy_clear(const int ioaddr[], 91static int card_wait_for_busy_clear(const int ioaddr[],
92 const char* name); 92 const char* name);
93static inline int card_wait_for_ready(const int ioaddr[], const char* name, 93static int card_wait_for_ready(const int ioaddr[], const char* name,
94 unsigned char in[]); 94 unsigned char in[]);
95static int card_send_command(const int ioaddr[], const char* name, 95static int card_send_command(const int ioaddr[], const char* name,
96 const unsigned char out[], unsigned char in[]); 96 const unsigned char out[], unsigned char in[]);
97 97
98/* SB1000 hardware routines to be used during frame rx interrupt */ 98/* SB1000 hardware routines to be used during frame rx interrupt */
99static inline int sb1000_wait_for_ready(const int ioaddr[], const char* name); 99static int sb1000_wait_for_ready(const int ioaddr[], const char* name);
100static inline int sb1000_wait_for_ready_clear(const int ioaddr[], 100static int sb1000_wait_for_ready_clear(const int ioaddr[],
101 const char* name); 101 const char* name);
102static inline void sb1000_send_command(const int ioaddr[], const char* name, 102static void sb1000_send_command(const int ioaddr[], const char* name,
103 const unsigned char out[]); 103 const unsigned char out[]);
104static inline void sb1000_read_status(const int ioaddr[], unsigned char in[]); 104static void sb1000_read_status(const int ioaddr[], unsigned char in[]);
105static inline void sb1000_issue_read_command(const int ioaddr[], 105static void sb1000_issue_read_command(const int ioaddr[],
106 const char* name); 106 const char* name);
107 107
108/* SB1000 commands for open/configuration */ 108/* SB1000 commands for open/configuration */
109static inline int sb1000_reset(const int ioaddr[], const char* name); 109static int sb1000_reset(const int ioaddr[], const char* name);
110static inline int sb1000_check_CRC(const int ioaddr[], const char* name); 110static int sb1000_check_CRC(const int ioaddr[], const char* name);
111static inline int sb1000_start_get_set_command(const int ioaddr[], 111static inline int sb1000_start_get_set_command(const int ioaddr[],
112 const char* name); 112 const char* name);
113static inline int sb1000_end_get_set_command(const int ioaddr[], 113static int sb1000_end_get_set_command(const int ioaddr[],
114 const char* name); 114 const char* name);
115static inline int sb1000_activate(const int ioaddr[], const char* name); 115static int sb1000_activate(const int ioaddr[], const char* name);
116static int sb1000_get_firmware_version(const int ioaddr[], 116static int sb1000_get_firmware_version(const int ioaddr[],
117 const char* name, unsigned char version[], int do_end); 117 const char* name, unsigned char version[], int do_end);
118static int sb1000_get_frequency(const int ioaddr[], const char* name, 118static int sb1000_get_frequency(const int ioaddr[], const char* name,
@@ -125,8 +125,8 @@ static int sb1000_set_PIDs(const int ioaddr[], const char* name,
125 const short PID[]); 125 const short PID[]);
126 126
127/* SB1000 commands for frame rx interrupt */ 127/* SB1000 commands for frame rx interrupt */
128static inline int sb1000_rx(struct net_device *dev); 128static int sb1000_rx(struct net_device *dev);
129static inline void sb1000_error_dpc(struct net_device *dev); 129static void sb1000_error_dpc(struct net_device *dev);
130 130
131static const struct pnp_device_id sb1000_pnp_ids[] = { 131static const struct pnp_device_id sb1000_pnp_ids[] = {
132 { "GIC1000", 0 }, 132 { "GIC1000", 0 },
@@ -250,7 +250,7 @@ static struct pnp_driver sb1000_driver = {
250static const int TimeOutJiffies = (875 * HZ) / 100; 250static const int TimeOutJiffies = (875 * HZ) / 100;
251 251
252/* Card Wait For Busy Clear (cannot be used during an interrupt) */ 252/* Card Wait For Busy Clear (cannot be used during an interrupt) */
253static inline int 253static int
254card_wait_for_busy_clear(const int ioaddr[], const char* name) 254card_wait_for_busy_clear(const int ioaddr[], const char* name)
255{ 255{
256 unsigned char a; 256 unsigned char a;
@@ -274,7 +274,7 @@ card_wait_for_busy_clear(const int ioaddr[], const char* name)
274} 274}
275 275
276/* Card Wait For Ready (cannot be used during an interrupt) */ 276/* Card Wait For Ready (cannot be used during an interrupt) */
277static inline int 277static int
278card_wait_for_ready(const int ioaddr[], const char* name, unsigned char in[]) 278card_wait_for_ready(const int ioaddr[], const char* name, unsigned char in[])
279{ 279{
280 unsigned char a; 280 unsigned char a;
@@ -354,7 +354,7 @@ card_send_command(const int ioaddr[], const char* name,
354static const int Sb1000TimeOutJiffies = 7 * HZ; 354static const int Sb1000TimeOutJiffies = 7 * HZ;
355 355
356/* Card Wait For Ready (to be used during frame rx) */ 356/* Card Wait For Ready (to be used during frame rx) */
357static inline int 357static int
358sb1000_wait_for_ready(const int ioaddr[], const char* name) 358sb1000_wait_for_ready(const int ioaddr[], const char* name)
359{ 359{
360 unsigned long timeout; 360 unsigned long timeout;
@@ -380,7 +380,7 @@ sb1000_wait_for_ready(const int ioaddr[], const char* name)
380} 380}
381 381
382/* Card Wait For Ready Clear (to be used during frame rx) */ 382/* Card Wait For Ready Clear (to be used during frame rx) */
383static inline int 383static int
384sb1000_wait_for_ready_clear(const int ioaddr[], const char* name) 384sb1000_wait_for_ready_clear(const int ioaddr[], const char* name)
385{ 385{
386 unsigned long timeout; 386 unsigned long timeout;
@@ -405,7 +405,7 @@ sb1000_wait_for_ready_clear(const int ioaddr[], const char* name)
405} 405}
406 406
407/* Card Send Command (to be used during frame rx) */ 407/* Card Send Command (to be used during frame rx) */
408static inline void 408static void
409sb1000_send_command(const int ioaddr[], const char* name, 409sb1000_send_command(const int ioaddr[], const char* name,
410 const unsigned char out[]) 410 const unsigned char out[])
411{ 411{
@@ -422,7 +422,7 @@ sb1000_send_command(const int ioaddr[], const char* name,
422} 422}
423 423
424/* Card Read Status (to be used during frame rx) */ 424/* Card Read Status (to be used during frame rx) */
425static inline void 425static void
426sb1000_read_status(const int ioaddr[], unsigned char in[]) 426sb1000_read_status(const int ioaddr[], unsigned char in[])
427{ 427{
428 in[1] = inb(ioaddr[0] + 1); 428 in[1] = inb(ioaddr[0] + 1);
@@ -434,7 +434,7 @@ sb1000_read_status(const int ioaddr[], unsigned char in[])
434} 434}
435 435
436/* Issue Read Command (to be used during frame rx) */ 436/* Issue Read Command (to be used during frame rx) */
437static inline void 437static void
438sb1000_issue_read_command(const int ioaddr[], const char* name) 438sb1000_issue_read_command(const int ioaddr[], const char* name)
439{ 439{
440 const unsigned char Command0[6] = {0x20, 0x00, 0x00, 0x01, 0x00, 0x00}; 440 const unsigned char Command0[6] = {0x20, 0x00, 0x00, 0x01, 0x00, 0x00};
@@ -450,7 +450,7 @@ sb1000_issue_read_command(const int ioaddr[], const char* name)
450 * SB1000 commands for open/configuration 450 * SB1000 commands for open/configuration
451 */ 451 */
452/* reset SB1000 card */ 452/* reset SB1000 card */
453static inline int 453static int
454sb1000_reset(const int ioaddr[], const char* name) 454sb1000_reset(const int ioaddr[], const char* name)
455{ 455{
456 unsigned char st[7]; 456 unsigned char st[7];
@@ -479,7 +479,7 @@ sb1000_reset(const int ioaddr[], const char* name)
479} 479}
480 480
481/* check SB1000 firmware CRC */ 481/* check SB1000 firmware CRC */
482static inline int 482static int
483sb1000_check_CRC(const int ioaddr[], const char* name) 483sb1000_check_CRC(const int ioaddr[], const char* name)
484{ 484{
485 unsigned char st[7]; 485 unsigned char st[7];
@@ -504,7 +504,7 @@ sb1000_start_get_set_command(const int ioaddr[], const char* name)
504 return card_send_command(ioaddr, name, Command0, st); 504 return card_send_command(ioaddr, name, Command0, st);
505} 505}
506 506
507static inline int 507static int
508sb1000_end_get_set_command(const int ioaddr[], const char* name) 508sb1000_end_get_set_command(const int ioaddr[], const char* name)
509{ 509{
510 unsigned char st[7]; 510 unsigned char st[7];
@@ -517,7 +517,7 @@ sb1000_end_get_set_command(const int ioaddr[], const char* name)
517 return card_send_command(ioaddr, name, Command1, st); 517 return card_send_command(ioaddr, name, Command1, st);
518} 518}
519 519
520static inline int 520static int
521sb1000_activate(const int ioaddr[], const char* name) 521sb1000_activate(const int ioaddr[], const char* name)
522{ 522{
523 unsigned char st[7]; 523 unsigned char st[7];
@@ -694,7 +694,7 @@ sb1000_set_PIDs(const int ioaddr[], const char* name, const short PID[])
694} 694}
695 695
696 696
697static inline void 697static void
698sb1000_print_status_buffer(const char* name, unsigned char st[], 698sb1000_print_status_buffer(const char* name, unsigned char st[],
699 unsigned char buffer[], int size) 699 unsigned char buffer[], int size)
700{ 700{
@@ -725,7 +725,7 @@ sb1000_print_status_buffer(const char* name, unsigned char st[],
725/* receive a single frame and assemble datagram 725/* receive a single frame and assemble datagram
726 * (this is the heart of the interrupt routine) 726 * (this is the heart of the interrupt routine)
727 */ 727 */
728static inline int 728static int
729sb1000_rx(struct net_device *dev) 729sb1000_rx(struct net_device *dev)
730{ 730{
731 731
@@ -888,7 +888,7 @@ dropped_frame:
888 return -1; 888 return -1;
889} 889}
890 890
891static inline void 891static void
892sb1000_error_dpc(struct net_device *dev) 892sb1000_error_dpc(struct net_device *dev)
893{ 893{
894 char *name; 894 char *name;