Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] kill _INLINE_

This patch removes all occurances of _INLINE_ in the kernel.

With the exception of tty_flip.h, I've simply removed the inline's since
gcc should know best which functions to be inlined.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Adrian Bunk and committed by
Linus Torvalds
41c28ff1 772a0dc5

+56 -112
+1 -6
arch/ia64/hp/sim/simserial.c
··· 46 46 #define KEYBOARD_INTR 3 /* must match with simulator! */ 47 47 48 48 #define NR_PORTS 1 /* only one port for now */ 49 - #define SERIAL_INLINE 1 50 - 51 - #ifdef SERIAL_INLINE 52 - #define _INLINE_ inline 53 - #endif 54 49 55 50 #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) 56 51 ··· 232 237 local_irq_restore(flags); 233 238 } 234 239 235 - static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done) 240 + static void transmit_chars(struct async_struct *info, int *intr_done) 236 241 { 237 242 int count; 238 243 unsigned long flags;
-4
arch/xtensa/platform-iss/console.c
··· 31 31 #include <linux/tty.h> 32 32 #include <linux/tty_flip.h> 33 33 34 - #ifdef SERIAL_INLINE 35 - #define _INLINE_ inline 36 - #endif 37 - 38 34 #define SERIAL_MAX_NUM_LINES 1 39 35 #define SERIAL_TIMER_VALUE (20 * HZ) 40 36
+6 -12
drivers/char/amiserial.c
··· 46 46 47 47 /* Sanity checks */ 48 48 49 - #define SERIAL_INLINE 50 - 51 49 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT) 52 50 #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \ 53 51 tty->name, (info->flags), serial_driver->refcount,info->count,tty->count,s) ··· 92 94 93 95 #include <asm/amigahw.h> 94 96 #include <asm/amigaints.h> 95 - 96 - #ifdef SERIAL_INLINE 97 - #define _INLINE_ inline 98 - #endif 99 97 100 98 #define custom amiga_custom 101 99 static char *serial_name = "Amiga-builtin serial driver"; ··· 247 253 * This routine is used by the interrupt handler to schedule 248 254 * processing in the software interrupt portion of the driver. 249 255 */ 250 - static _INLINE_ void rs_sched_event(struct async_struct *info, 251 - int event) 256 + static void rs_sched_event(struct async_struct *info, 257 + int event) 252 258 { 253 259 info->event |= 1 << event; 254 260 tasklet_schedule(&info->tlet); 255 261 } 256 262 257 - static _INLINE_ void receive_chars(struct async_struct *info) 263 + static void receive_chars(struct async_struct *info) 258 264 { 259 265 int status; 260 266 int serdatr; ··· 343 349 return; 344 350 } 345 351 346 - static _INLINE_ void transmit_chars(struct async_struct *info) 352 + static void transmit_chars(struct async_struct *info) 347 353 { 348 354 custom.intreq = IF_TBE; 349 355 mb(); ··· 383 389 } 384 390 } 385 391 386 - static _INLINE_ void check_modem_status(struct async_struct *info) 392 + static void check_modem_status(struct async_struct *info) 387 393 { 388 394 unsigned char status = ciab.pra & (SER_DCD | SER_CTS | SER_DSR); 389 395 unsigned char dstatus; ··· 1953 1959 * number, and identifies which options were configured into this 1954 1960 * driver. 1955 1961 */ 1956 - static _INLINE_ void show_serial_version(void) 1962 + static void show_serial_version(void) 1957 1963 { 1958 1964 printk(KERN_INFO "%s version %s\n", serial_name, serial_version); 1959 1965 }
-1
drivers/isdn/hisax/config.c
··· 25 25 #include <linux/workqueue.h> 26 26 #include <linux/interrupt.h> 27 27 #define HISAX_STATUS_BUFSIZE 4096 28 - #define INCLUDE_INLINE_FUNCS 29 28 30 29 /* 31 30 * This structure array contains one entry per card. An entry looks
-1
drivers/isdn/hisax/elsa.c
··· 108 108 #define ELSA_ASSIGN 4 109 109 110 110 #define RS_ISR_PASS_LIMIT 256 111 - #define _INLINE_ inline 112 111 #define FLG_MODEM_ACTIVE 1 113 112 /* IPAC AUX */ 114 113 #define ELSA_IPAC_LINE_LED 0x40 /* Bit 6 Gelbe LED */
+4 -5
drivers/serial/68328serial.c
··· 101 101 102 102 #define RS_ISR_PASS_LIMIT 256 103 103 104 - #define _INLINE_ inline 105 - 106 104 static void change_speed(struct m68k_serial *info); 107 105 108 106 /* ··· 260 262 /* Drop into the debugger */ 261 263 } 262 264 263 - static _INLINE_ void status_handle(struct m68k_serial *info, unsigned short status) 265 + static void status_handle(struct m68k_serial *info, unsigned short status) 264 266 { 265 267 #if 0 266 268 if(status & DCD) { ··· 287 289 return; 288 290 } 289 291 290 - static _INLINE_ void receive_chars(struct m68k_serial *info, struct pt_regs *regs, unsigned short rx) 292 + static void receive_chars(struct m68k_serial *info, struct pt_regs *regs, 293 + unsigned short rx) 291 294 { 292 295 struct tty_struct *tty = info->tty; 293 296 m68328_uart *uart = &uart_addr[info->line]; ··· 358 359 return; 359 360 } 360 361 361 - static _INLINE_ void transmit_chars(struct m68k_serial *info) 362 + static void transmit_chars(struct m68k_serial *info) 362 363 { 363 364 m68328_uart *uart = &uart_addr[info->line]; 364 365
+5 -6
drivers/serial/au1x00_uart.c
··· 133 133 { "AU1X00_UART",16, UART_CLEAR_FIFO | UART_USE_FIFO }, 134 134 }; 135 135 136 - static _INLINE_ unsigned int serial_in(struct uart_8250_port *up, int offset) 136 + static unsigned int serial_in(struct uart_8250_port *up, int offset) 137 137 { 138 138 return au_readl((unsigned long)up->port.membase + offset); 139 139 } 140 140 141 - static _INLINE_ void 142 - serial_out(struct uart_8250_port *up, int offset, int value) 141 + static void serial_out(struct uart_8250_port *up, int offset, int value) 143 142 { 144 143 au_writel(value, (unsigned long)up->port.membase + offset); 145 144 } ··· 236 237 serial_out(up, UART_IER, up->ier); 237 238 } 238 239 239 - static _INLINE_ void 240 + static void 240 241 receive_chars(struct uart_8250_port *up, int *status, struct pt_regs *regs) 241 242 { 242 243 struct tty_struct *tty = up->port.info->tty; ··· 311 312 spin_lock(&up->port.lock); 312 313 } 313 314 314 - static _INLINE_ void transmit_chars(struct uart_8250_port *up) 315 + static void transmit_chars(struct uart_8250_port *up) 315 316 { 316 317 struct circ_buf *xmit = &up->port.info->xmit; 317 318 int count; ··· 345 346 serial8250_stop_tx(&up->port); 346 347 } 347 348 348 - static _INLINE_ void check_modem_status(struct uart_8250_port *up) 349 + static void check_modem_status(struct uart_8250_port *up) 349 350 { 350 351 int status; 351 352
+22 -46
drivers/serial/crisv10.c
··· 481 481 #include "serial_compat.h" 482 482 #endif 483 483 484 - #define _INLINE_ inline 485 - 486 484 struct tty_driver *serial_driver; 487 485 488 486 /* serial subtype definitions */ ··· 589 591 static void rs_wait_until_sent(struct tty_struct *tty, int timeout); 590 592 static int rs_write(struct tty_struct * tty, int from_user, 591 593 const unsigned char *buf, int count); 592 - extern _INLINE_ int rs_raw_write(struct tty_struct * tty, int from_user, 593 - const unsigned char *buf, int count); 594 594 #ifdef CONFIG_ETRAX_RS485 595 595 static int e100_write_rs485(struct tty_struct * tty, int from_user, 596 596 const unsigned char *buf, int count); ··· 1534 1538 1535 1539 /* the tx DMA uses only dma_descr interrupt */ 1536 1540 1537 - static _INLINE_ void 1538 - e100_disable_txdma_irq(struct e100_serial *info) 1541 + static void e100_disable_txdma_irq(struct e100_serial *info) 1539 1542 { 1540 1543 #ifdef SERIAL_DEBUG_INTR 1541 1544 printk("txdma_irq(%d): 0\n",info->line); ··· 1543 1548 *R_IRQ_MASK2_CLR = info->irq; 1544 1549 } 1545 1550 1546 - static _INLINE_ void 1547 - e100_enable_txdma_irq(struct e100_serial *info) 1551 + static void e100_enable_txdma_irq(struct e100_serial *info) 1548 1552 { 1549 1553 #ifdef SERIAL_DEBUG_INTR 1550 1554 printk("txdma_irq(%d): 1\n",info->line); ··· 1552 1558 *R_IRQ_MASK2_SET = info->irq; 1553 1559 } 1554 1560 1555 - static _INLINE_ void 1556 - e100_disable_txdma_channel(struct e100_serial *info) 1561 + static void e100_disable_txdma_channel(struct e100_serial *info) 1557 1562 { 1558 1563 unsigned long flags; 1559 1564 ··· 1592 1599 } 1593 1600 1594 1601 1595 - static _INLINE_ void 1596 - e100_enable_txdma_channel(struct e100_serial *info) 1602 + static void e100_enable_txdma_channel(struct e100_serial *info) 1597 1603 { 1598 1604 unsigned long flags; 1599 1605 ··· 1617 1625 restore_flags(flags); 1618 1626 } 1619 1627 1620 - static _INLINE_ void 1621 - e100_disable_rxdma_channel(struct e100_serial *info) 1628 + static void e100_disable_rxdma_channel(struct e100_serial *info) 1622 1629 { 1623 1630 unsigned long flags; 1624 1631 ··· 1656 1665 } 1657 1666 1658 1667 1659 - static _INLINE_ void 1660 - e100_enable_rxdma_channel(struct e100_serial *info) 1668 + static void e100_enable_rxdma_channel(struct e100_serial *info) 1661 1669 { 1662 1670 unsigned long flags; 1663 1671 ··· 1903 1913 * This routine is used by the interrupt handler to schedule 1904 1914 * processing in the software interrupt portion of the driver. 1905 1915 */ 1906 - static _INLINE_ void 1907 - rs_sched_event(struct e100_serial *info, 1908 - int event) 1916 + static void rs_sched_event(struct e100_serial *info, int event) 1909 1917 { 1910 1918 if (info->event & (1 << event)) 1911 1919 return; ··· 2143 2155 return 1; 2144 2156 } 2145 2157 2146 - extern _INLINE_ unsigned int 2147 - handle_descr_data(struct e100_serial *info, struct etrax_dma_descr *descr, unsigned int recvl) 2158 + static unsigned int handle_descr_data(struct e100_serial *info, 2159 + struct etrax_dma_descr *descr, 2160 + unsigned int recvl) 2148 2161 { 2149 2162 struct etrax_recv_buffer *buffer = phys_to_virt(descr->buf) - sizeof *buffer; 2150 2163 ··· 2171 2182 return recvl; 2172 2183 } 2173 2184 2174 - static _INLINE_ unsigned int 2175 - handle_all_descr_data(struct e100_serial *info) 2185 + static unsigned int handle_all_descr_data(struct e100_serial *info) 2176 2186 { 2177 2187 struct etrax_dma_descr *descr; 2178 2188 unsigned int recvl; ··· 2218 2230 return ret; 2219 2231 } 2220 2232 2221 - static _INLINE_ void 2222 - receive_chars_dma(struct e100_serial *info) 2233 + static void receive_chars_dma(struct e100_serial *info) 2223 2234 { 2224 2235 struct tty_struct *tty; 2225 2236 unsigned char rstat; ··· 2279 2292 *info->icmdadr = IO_STATE(R_DMA_CH6_CMD, cmd, restart); 2280 2293 } 2281 2294 2282 - static _INLINE_ int 2283 - start_recv_dma(struct e100_serial *info) 2295 + static int start_recv_dma(struct e100_serial *info) 2284 2296 { 2285 2297 struct etrax_dma_descr *descr = info->rec_descr; 2286 2298 struct etrax_recv_buffer *buffer; ··· 2333 2347 } 2334 2348 } 2335 2349 2336 - 2337 - static _INLINE_ void 2338 - status_handle(struct e100_serial *info, unsigned short status) 2339 - { 2340 - } 2341 2350 2342 2351 /* the bits in the MASK2 register are laid out like this: 2343 2352 DMAI_EOP DMAI_DESCR DMAO_EOP DMAO_DESCR ··· 2435 2454 return IRQ_RETVAL(handled); 2436 2455 } /* rec_interrupt */ 2437 2456 2438 - static _INLINE_ int 2439 - force_eop_if_needed(struct e100_serial *info) 2457 + static int force_eop_if_needed(struct e100_serial *info) 2440 2458 { 2441 2459 /* We check data_avail bit to determine if data has 2442 2460 * arrived since last time ··· 2479 2499 return 1; 2480 2500 } 2481 2501 2482 - extern _INLINE_ void 2483 - flush_to_flip_buffer(struct e100_serial *info) 2502 + static void flush_to_flip_buffer(struct e100_serial *info) 2484 2503 { 2485 2504 struct tty_struct *tty; 2486 2505 struct etrax_recv_buffer *buffer; ··· 2590 2611 tty_flip_buffer_push(tty); 2591 2612 } 2592 2613 2593 - static _INLINE_ void 2594 - check_flush_timeout(struct e100_serial *info) 2614 + static void check_flush_timeout(struct e100_serial *info) 2595 2615 { 2596 2616 /* Flip what we've got (if we can) */ 2597 2617 flush_to_flip_buffer(info); ··· 2719 2741 2720 2742 */ 2721 2743 2722 - extern _INLINE_ 2744 + static 2723 2745 struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info) 2724 2746 { 2725 2747 unsigned long data_read; ··· 2853 2875 return info; 2854 2876 } 2855 2877 2856 - extern _INLINE_ 2857 - struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) 2878 + static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) 2858 2879 { 2859 2880 unsigned char rstat; 2860 2881 ··· 2972 2995 return info; 2973 2996 } /* handle_ser_rx_interrupt */ 2974 2997 2975 - extern _INLINE_ void handle_ser_tx_interrupt(struct e100_serial *info) 2998 + static void handle_ser_tx_interrupt(struct e100_serial *info) 2976 2999 { 2977 3000 unsigned long flags; 2978 3001 ··· 3598 3621 restore_flags(flags); 3599 3622 } 3600 3623 3601 - extern _INLINE_ int 3602 - rs_raw_write(struct tty_struct * tty, int from_user, 3603 - const unsigned char *buf, int count) 3624 + static int rs_raw_write(struct tty_struct * tty, int from_user, 3625 + const unsigned char *buf, int count) 3604 3626 { 3605 3627 int c, ret = 0; 3606 3628 struct e100_serial *info = (struct e100_serial *)tty->driver_data; ··· 4686 4710 * /proc fs routines.... 4687 4711 */ 4688 4712 4689 - extern _INLINE_ int line_info(char *buf, struct e100_serial *info) 4713 + static int line_info(char *buf, struct e100_serial *info) 4690 4714 { 4691 4715 char stat_buf[30]; 4692 4716 int ret;
+7 -8
drivers/serial/m32r_sio.c
··· 248 248 249 249 #endif /* CONFIG_SERIAL_M32R_PLDSIO */ 250 250 251 - static _INLINE_ unsigned int sio_in(struct uart_sio_port *up, int offset) 251 + static unsigned int sio_in(struct uart_sio_port *up, int offset) 252 252 { 253 253 return __sio_in(up->port.iobase + offset); 254 254 } 255 255 256 - static _INLINE_ void sio_out(struct uart_sio_port *up, int offset, int value) 256 + static void sio_out(struct uart_sio_port *up, int offset, int value) 257 257 { 258 258 __sio_out(value, up->port.iobase + offset); 259 259 } 260 260 261 - static _INLINE_ unsigned int serial_in(struct uart_sio_port *up, int offset) 261 + static unsigned int serial_in(struct uart_sio_port *up, int offset) 262 262 { 263 263 if (!offset) 264 264 return 0; ··· 266 266 return __sio_in(offset); 267 267 } 268 268 269 - static _INLINE_ void 270 - serial_out(struct uart_sio_port *up, int offset, int value) 269 + static void serial_out(struct uart_sio_port *up, int offset, int value) 271 270 { 272 271 if (!offset) 273 272 return; ··· 325 326 serial_out(up, UART_IER, up->ier); 326 327 } 327 328 328 - static _INLINE_ void receive_chars(struct uart_sio_port *up, int *status, 329 - struct pt_regs *regs) 329 + static void receive_chars(struct uart_sio_port *up, int *status, 330 + struct pt_regs *regs) 330 331 { 331 332 struct tty_struct *tty = up->port.info->tty; 332 333 unsigned char ch; ··· 399 400 tty_flip_buffer_push(tty); 400 401 } 401 402 402 - static _INLINE_ void transmit_chars(struct uart_sio_port *up) 403 + static void transmit_chars(struct uart_sio_port *up) 403 404 { 404 405 struct circ_buf *xmit = &up->port.info->xmit; 405 406 int count;
+5 -8
drivers/serial/sunsu.c
··· 102 102 #endif 103 103 }; 104 104 105 - #define _INLINE_ 106 - 107 - static _INLINE_ unsigned int serial_in(struct uart_sunsu_port *up, int offset) 105 + static unsigned int serial_in(struct uart_sunsu_port *up, int offset) 108 106 { 109 107 offset <<= up->port.regshift; 110 108 ··· 119 121 } 120 122 } 121 123 122 - static _INLINE_ void 123 - serial_out(struct uart_sunsu_port *up, int offset, int value) 124 + static void serial_out(struct uart_sunsu_port *up, int offset, int value) 124 125 { 125 126 #ifndef CONFIG_SPARC64 126 127 /* ··· 313 316 spin_unlock_irqrestore(&up->port.lock, flags); 314 317 } 315 318 316 - static _INLINE_ struct tty_struct * 319 + static struct tty_struct * 317 320 receive_chars(struct uart_sunsu_port *up, unsigned char *status, struct pt_regs *regs) 318 321 { 319 322 struct tty_struct *tty = up->port.info->tty; ··· 392 395 return tty; 393 396 } 394 397 395 - static _INLINE_ void transmit_chars(struct uart_sunsu_port *up) 398 + static void transmit_chars(struct uart_sunsu_port *up) 396 399 { 397 400 struct circ_buf *xmit = &up->port.info->xmit; 398 401 int count; ··· 428 431 __stop_tx(up); 429 432 } 430 433 431 - static _INLINE_ void check_modem_status(struct uart_sunsu_port *up) 434 + static void check_modem_status(struct uart_sunsu_port *up) 432 435 { 433 436 int status; 434 437
+3 -6
drivers/tc/zs.c
··· 186 186 #define RS_STROBE_TIME 10 187 187 #define RS_ISR_PASS_LIMIT 256 188 188 189 - #define _INLINE_ inline 190 - 191 189 static void probe_sccs(void); 192 190 static void change_speed(struct dec_serial *info); 193 191 static void rs_wait_until_sent(struct tty_struct *tty, int timeout); ··· 342 344 * This routine is used by the interrupt handler to schedule 343 345 * processing in the software interrupt portion of the driver. 344 346 */ 345 - static _INLINE_ void rs_sched_event(struct dec_serial *info, int event) 347 + static void rs_sched_event(struct dec_serial *info, int event) 346 348 { 347 349 info->event |= 1 << event; 348 350 tasklet_schedule(&info->tlet); 349 351 } 350 352 351 - static _INLINE_ void receive_chars(struct dec_serial *info, 352 - struct pt_regs *regs) 353 + static void receive_chars(struct dec_serial *info, struct pt_regs *regs) 353 354 { 354 355 struct tty_struct *tty = info->tty; 355 356 unsigned char ch, stat, flag; ··· 438 441 rs_sched_event(info, RS_EVENT_WRITE_WAKEUP); 439 442 } 440 443 441 - static _INLINE_ void status_handle(struct dec_serial *info) 444 + static void status_handle(struct dec_serial *info) 442 445 { 443 446 unsigned char stat; 444 447
+3 -9
include/linux/tty_flip.h
··· 7 7 extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); 8 8 extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); 9 9 10 - #ifdef INCLUDE_INLINE_FUNCS 11 - #define _INLINE_ extern 12 - #else 13 - #define _INLINE_ static __inline__ 14 - #endif 15 - 16 - _INLINE_ int tty_insert_flip_char(struct tty_struct *tty, 17 - unsigned char ch, char flag) 10 + static inline int tty_insert_flip_char(struct tty_struct *tty, 11 + unsigned char ch, char flag) 18 12 { 19 13 struct tty_buffer *tb = tty->buf.tail; 20 14 if (tb && tb->active && tb->used < tb->size) { ··· 19 25 return tty_insert_flip_string_flags(tty, &ch, &flag, 1); 20 26 } 21 27 22 - _INLINE_ void tty_schedule_flip(struct tty_struct *tty) 28 + static inline void tty_schedule_flip(struct tty_struct *tty) 23 29 { 24 30 unsigned long flags; 25 31 spin_lock_irqsave(&tty->buf.lock, flags);