Skip to content

Commit

Permalink
[PATCH] kill _INLINE_
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Mar 23, 2006
1 parent 772a0dc commit 41c28ff
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 112 deletions.
7 changes: 1 addition & 6 deletions arch/ia64/hp/sim/simserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@
#define KEYBOARD_INTR 3 /* must match with simulator! */

#define NR_PORTS 1 /* only one port for now */
#define SERIAL_INLINE 1

#ifdef SERIAL_INLINE
#define _INLINE_ inline
#endif

#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)

Expand Down Expand Up @@ -237,7 +232,7 @@ static void rs_put_char(struct tty_struct *tty, unsigned char ch)
local_irq_restore(flags);
}

static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done)
static void transmit_chars(struct async_struct *info, int *intr_done)
{
int count;
unsigned long flags;
Expand Down
4 changes: 0 additions & 4 deletions arch/xtensa/platform-iss/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
#include <linux/tty.h>
#include <linux/tty_flip.h>

#ifdef SERIAL_INLINE
#define _INLINE_ inline
#endif

#define SERIAL_MAX_NUM_LINES 1
#define SERIAL_TIMER_VALUE (20 * HZ)

Expand Down
18 changes: 6 additions & 12 deletions drivers/char/amiserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@

/* Sanity checks */

#define SERIAL_INLINE

#if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
#define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \
tty->name, (info->flags), serial_driver->refcount,info->count,tty->count,s)
Expand Down Expand Up @@ -95,10 +93,6 @@ static char *serial_version = "4.30";
#include <asm/amigahw.h>
#include <asm/amigaints.h>

#ifdef SERIAL_INLINE
#define _INLINE_ inline
#endif

#define custom amiga_custom
static char *serial_name = "Amiga-builtin serial driver";

Expand Down Expand Up @@ -253,14 +247,14 @@ static void rs_start(struct tty_struct *tty)
* This routine is used by the interrupt handler to schedule
* processing in the software interrupt portion of the driver.
*/
static _INLINE_ void rs_sched_event(struct async_struct *info,
int event)
static void rs_sched_event(struct async_struct *info,
int event)
{
info->event |= 1 << event;
tasklet_schedule(&info->tlet);
}

static _INLINE_ void receive_chars(struct async_struct *info)
static void receive_chars(struct async_struct *info)
{
int status;
int serdatr;
Expand Down Expand Up @@ -349,7 +343,7 @@ static _INLINE_ void receive_chars(struct async_struct *info)
return;
}

static _INLINE_ void transmit_chars(struct async_struct *info)
static void transmit_chars(struct async_struct *info)
{
custom.intreq = IF_TBE;
mb();
Expand Down Expand Up @@ -389,7 +383,7 @@ static _INLINE_ void transmit_chars(struct async_struct *info)
}
}

static _INLINE_ void check_modem_status(struct async_struct *info)
static void check_modem_status(struct async_struct *info)
{
unsigned char status = ciab.pra & (SER_DCD | SER_CTS | SER_DSR);
unsigned char dstatus;
Expand Down Expand Up @@ -1959,7 +1953,7 @@ static int rs_read_proc(char *page, char **start, off_t off, int count,
* number, and identifies which options were configured into this
* driver.
*/
static _INLINE_ void show_serial_version(void)
static void show_serial_version(void)
{
printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
}
Expand Down
1 change: 0 additions & 1 deletion drivers/isdn/hisax/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#define HISAX_STATUS_BUFSIZE 4096
#define INCLUDE_INLINE_FUNCS

/*
* This structure array contains one entry per card. An entry looks
Expand Down
1 change: 0 additions & 1 deletion drivers/isdn/hisax/elsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ static const char *ITACVer[] =
#define ELSA_ASSIGN 4

#define RS_ISR_PASS_LIMIT 256
#define _INLINE_ inline
#define FLG_MODEM_ACTIVE 1
/* IPAC AUX */
#define ELSA_IPAC_LINE_LED 0x40 /* Bit 6 Gelbe LED */
Expand Down
9 changes: 4 additions & 5 deletions drivers/serial/68328serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ struct tty_driver *serial_driver;

#define RS_ISR_PASS_LIMIT 256

#define _INLINE_ inline

static void change_speed(struct m68k_serial *info);

/*
Expand Down Expand Up @@ -262,7 +260,7 @@ static void batten_down_hatches(void)
/* Drop into the debugger */
}

static _INLINE_ void status_handle(struct m68k_serial *info, unsigned short status)
static void status_handle(struct m68k_serial *info, unsigned short status)
{
#if 0
if(status & DCD) {
Expand All @@ -289,7 +287,8 @@ static _INLINE_ void status_handle(struct m68k_serial *info, unsigned short stat
return;
}

static _INLINE_ void receive_chars(struct m68k_serial *info, struct pt_regs *regs, unsigned short rx)
static void receive_chars(struct m68k_serial *info, struct pt_regs *regs,
unsigned short rx)
{
struct tty_struct *tty = info->tty;
m68328_uart *uart = &uart_addr[info->line];
Expand Down Expand Up @@ -359,7 +358,7 @@ static _INLINE_ void receive_chars(struct m68k_serial *info, struct pt_regs *reg
return;
}

static _INLINE_ void transmit_chars(struct m68k_serial *info)
static void transmit_chars(struct m68k_serial *info)
{
m68328_uart *uart = &uart_addr[info->line];

Expand Down
11 changes: 5 additions & 6 deletions drivers/serial/au1x00_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,12 @@ static const struct serial_uart_config uart_config[PORT_MAX_8250+1] = {
{ "AU1X00_UART",16, UART_CLEAR_FIFO | UART_USE_FIFO },
};

static _INLINE_ unsigned int serial_in(struct uart_8250_port *up, int offset)
static unsigned int serial_in(struct uart_8250_port *up, int offset)
{
return au_readl((unsigned long)up->port.membase + offset);
}

static _INLINE_ void
serial_out(struct uart_8250_port *up, int offset, int value)
static void serial_out(struct uart_8250_port *up, int offset, int value)
{
au_writel(value, (unsigned long)up->port.membase + offset);
}
Expand Down Expand Up @@ -237,7 +236,7 @@ static void serial8250_enable_ms(struct uart_port *port)
serial_out(up, UART_IER, up->ier);
}

static _INLINE_ void
static void
receive_chars(struct uart_8250_port *up, int *status, struct pt_regs *regs)
{
struct tty_struct *tty = up->port.info->tty;
Expand Down Expand Up @@ -312,7 +311,7 @@ receive_chars(struct uart_8250_port *up, int *status, struct pt_regs *regs)
spin_lock(&up->port.lock);
}

static _INLINE_ void transmit_chars(struct uart_8250_port *up)
static void transmit_chars(struct uart_8250_port *up)
{
struct circ_buf *xmit = &up->port.info->xmit;
int count;
Expand Down Expand Up @@ -346,7 +345,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
serial8250_stop_tx(&up->port);
}

static _INLINE_ void check_modem_status(struct uart_8250_port *up)
static void check_modem_status(struct uart_8250_port *up)
{
int status;

Expand Down
Loading

0 comments on commit 41c28ff

Please sign in to comment.