aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2008-04-03 17:59:55 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-03 17:59:55 -0400
commita5b2db67139e991d9e9e19260989d0e66a03a2b2 (patch)
tree8abd21f55e4a8d67449319b99c65bca0dd681d87 /drivers/atm
parent3bb5da3837cc1aa17736b05139c9a22c3794851a (diff)
[ATM] drivers/atm/ambassador.c: stop inlining largish static functions
drivers/atm/ambassador.c has unusually large number of static inline functions - 22. I looked through them and half of them seem to be too big to warrant inlining. This patch removes "inline" from these static functions (regardless of number of callsites - gcc nowadays auto-inlines statics with one callsite). Size difference for 32bit x86: text data bss dec hex filename 10209 8488 4 18701 490d linux-2.6-ALLYES/drivers/atm/ambassador.o 9462 8488 4 17954 4622 linux-2.6.inline-ALLYES/drivers/atm/ambassador.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
-rw-r--r--drivers/atm/ambassador.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 7b44a5965155..5aa12b011a9a 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -437,7 +437,7 @@ static inline void dump_skb (char * prefix, unsigned int vc, struct sk_buff * sk
437 437
438/* see limitations under Hardware Features */ 438/* see limitations under Hardware Features */
439 439
440static inline int check_area (void * start, size_t length) { 440static int check_area (void * start, size_t length) {
441 // assumes length > 0 441 // assumes length > 0
442 const u32 fourmegmask = -1 << 22; 442 const u32 fourmegmask = -1 << 22;
443 const u32 twofivesixmask = -1 << 8; 443 const u32 twofivesixmask = -1 << 8;
@@ -456,7 +456,7 @@ static inline int check_area (void * start, size_t length) {
456 456
457/********** free an skb (as per ATM device driver documentation) **********/ 457/********** free an skb (as per ATM device driver documentation) **********/
458 458
459static inline void amb_kfree_skb (struct sk_buff * skb) { 459static void amb_kfree_skb (struct sk_buff * skb) {
460 if (ATM_SKB(skb)->vcc->pop) { 460 if (ATM_SKB(skb)->vcc->pop) {
461 ATM_SKB(skb)->vcc->pop (ATM_SKB(skb)->vcc, skb); 461 ATM_SKB(skb)->vcc->pop (ATM_SKB(skb)->vcc, skb);
462 } else { 462 } else {
@@ -466,7 +466,7 @@ static inline void amb_kfree_skb (struct sk_buff * skb) {
466 466
467/********** TX completion **********/ 467/********** TX completion **********/
468 468
469static inline void tx_complete (amb_dev * dev, tx_out * tx) { 469static void tx_complete (amb_dev * dev, tx_out * tx) {
470 tx_simple * tx_descr = bus_to_virt (tx->handle); 470 tx_simple * tx_descr = bus_to_virt (tx->handle);
471 struct sk_buff * skb = tx_descr->skb; 471 struct sk_buff * skb = tx_descr->skb;
472 472
@@ -643,7 +643,7 @@ static int command_do (amb_dev * dev, command * cmd) {
643 643
644/********** TX queue pair **********/ 644/********** TX queue pair **********/
645 645
646static inline int tx_give (amb_dev * dev, tx_in * tx) { 646static int tx_give (amb_dev * dev, tx_in * tx) {
647 amb_txq * txq = &dev->txq; 647 amb_txq * txq = &dev->txq;
648 unsigned long flags; 648 unsigned long flags;
649 649
@@ -675,7 +675,7 @@ static inline int tx_give (amb_dev * dev, tx_in * tx) {
675 } 675 }
676} 676}
677 677
678static inline int tx_take (amb_dev * dev) { 678static int tx_take (amb_dev * dev) {
679 amb_txq * txq = &dev->txq; 679 amb_txq * txq = &dev->txq;
680 unsigned long flags; 680 unsigned long flags;
681 681
@@ -703,7 +703,7 @@ static inline int tx_take (amb_dev * dev) {
703 703
704/********** RX queue pairs **********/ 704/********** RX queue pairs **********/
705 705
706static inline int rx_give (amb_dev * dev, rx_in * rx, unsigned char pool) { 706static int rx_give (amb_dev * dev, rx_in * rx, unsigned char pool) {
707 amb_rxq * rxq = &dev->rxq[pool]; 707 amb_rxq * rxq = &dev->rxq[pool];
708 unsigned long flags; 708 unsigned long flags;
709 709
@@ -728,7 +728,7 @@ static inline int rx_give (amb_dev * dev, rx_in * rx, unsigned char pool) {
728 } 728 }
729} 729}
730 730
731static inline int rx_take (amb_dev * dev, unsigned char pool) { 731static int rx_take (amb_dev * dev, unsigned char pool) {
732 amb_rxq * rxq = &dev->rxq[pool]; 732 amb_rxq * rxq = &dev->rxq[pool];
733 unsigned long flags; 733 unsigned long flags;
734 734
@@ -761,7 +761,7 @@ static inline int rx_take (amb_dev * dev, unsigned char pool) {
761/********** RX Pool handling **********/ 761/********** RX Pool handling **********/
762 762
763/* pre: buffers_wanted = 0, post: pending = 0 */ 763/* pre: buffers_wanted = 0, post: pending = 0 */
764static inline void drain_rx_pool (amb_dev * dev, unsigned char pool) { 764static void drain_rx_pool (amb_dev * dev, unsigned char pool) {
765 amb_rxq * rxq = &dev->rxq[pool]; 765 amb_rxq * rxq = &dev->rxq[pool];
766 766
767 PRINTD (DBG_FLOW|DBG_POOL, "drain_rx_pool %p %hu", dev, pool); 767 PRINTD (DBG_FLOW|DBG_POOL, "drain_rx_pool %p %hu", dev, pool);
@@ -796,7 +796,7 @@ static void drain_rx_pools (amb_dev * dev) {
796 drain_rx_pool (dev, pool); 796 drain_rx_pool (dev, pool);
797} 797}
798 798
799static inline void fill_rx_pool (amb_dev * dev, unsigned char pool, 799static void fill_rx_pool (amb_dev * dev, unsigned char pool,
800 gfp_t priority) 800 gfp_t priority)
801{ 801{
802 rx_in rx; 802 rx_in rx;
@@ -846,7 +846,7 @@ static void fill_rx_pools (amb_dev * dev) {
846 846
847/********** enable host interrupts **********/ 847/********** enable host interrupts **********/
848 848
849static inline void interrupts_on (amb_dev * dev) { 849static void interrupts_on (amb_dev * dev) {
850 wr_plain (dev, offsetof(amb_mem, interrupt_control), 850 wr_plain (dev, offsetof(amb_mem, interrupt_control),
851 rd_plain (dev, offsetof(amb_mem, interrupt_control)) 851 rd_plain (dev, offsetof(amb_mem, interrupt_control))
852 | AMB_INTERRUPT_BITS); 852 | AMB_INTERRUPT_BITS);
@@ -854,7 +854,7 @@ static inline void interrupts_on (amb_dev * dev) {
854 854
855/********** disable host interrupts **********/ 855/********** disable host interrupts **********/
856 856
857static inline void interrupts_off (amb_dev * dev) { 857static void interrupts_off (amb_dev * dev) {
858 wr_plain (dev, offsetof(amb_mem, interrupt_control), 858 wr_plain (dev, offsetof(amb_mem, interrupt_control),
859 rd_plain (dev, offsetof(amb_mem, interrupt_control)) 859 rd_plain (dev, offsetof(amb_mem, interrupt_control))
860 &~ AMB_INTERRUPT_BITS); 860 &~ AMB_INTERRUPT_BITS);