Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77933d72 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

[PATCH] clean up inline static vs static inline



`gcc -W' likes to complain if the static keyword is not at the beginning of
the declaration.  This patch fixes all remaining occurrences of "inline
static" up with "static inline" in the entire kernel tree (140 occurrences in
47 files).

While making this change I came across a few lines with trailing whitespace
that I also fixed up, I have also added or removed a blank line or two here
and there, but there are no functional changes in the patch.

Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 03e259a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -67,7 +67,7 @@
/*
/*
 * #define byte(x, nr) ((unsigned char)((x) >> (nr*8))) 
 * #define byte(x, nr) ((unsigned char)((x) >> (nr*8))) 
 */
 */
inline static u8
static inline u8
byte(const u32 x, const unsigned n)
byte(const u32 x, const unsigned n)
{
{
	return x >> (n << 3);
	return x >> (n << 3);
+14 −14
Original line number Original line Diff line number Diff line
@@ -245,7 +245,7 @@ module_param(optcd_port, short, 0);




/* Busy wait until FLAG goes low. Return 0 on timeout. */
/* Busy wait until FLAG goes low. Return 0 on timeout. */
inline static int flag_low(int flag, unsigned long timeout)
static inline int flag_low(int flag, unsigned long timeout)
{
{
	int flag_high;
	int flag_high;
	unsigned long count = 0;
	unsigned long count = 0;
@@ -381,7 +381,7 @@ static int send_seek_params(struct cdrom_msf *params)


/* Wait for command execution status. Choice between busy waiting
/* Wait for command execution status. Choice between busy waiting
   and sleeping. Return value <0 indicates timeout. */
   and sleeping. Return value <0 indicates timeout. */
inline static int get_exec_status(int busy_waiting)
static inline int get_exec_status(int busy_waiting)
{
{
	unsigned char exec_status;
	unsigned char exec_status;


@@ -398,7 +398,7 @@ inline static int get_exec_status(int busy_waiting)


/* Wait busy for extra byte of data that a command returns.
/* Wait busy for extra byte of data that a command returns.
   Return value <0 indicates timeout. */
   Return value <0 indicates timeout. */
inline static int get_data(int short_timeout)
static inline int get_data(int short_timeout)
{
{
	unsigned char data;
	unsigned char data;


@@ -441,14 +441,14 @@ static int reset_drive(void)
/* Facilities for asynchronous operation */
/* Facilities for asynchronous operation */


/* Read status/data availability flags FL_STEN and FL_DTEN */
/* Read status/data availability flags FL_STEN and FL_DTEN */
inline static int stdt_flags(void)
static inline int stdt_flags(void)
{
{
	return inb(STATUS_PORT) & FL_STDT;
	return inb(STATUS_PORT) & FL_STDT;
}
}




/* Fetch status that has previously been waited for. <0 means not available */
/* Fetch status that has previously been waited for. <0 means not available */
inline static int fetch_status(void)
static inline int fetch_status(void)
{
{
	unsigned char status;
	unsigned char status;


@@ -462,7 +462,7 @@ inline static int fetch_status(void)




/* Fetch data that has previously been waited for. */
/* Fetch data that has previously been waited for. */
inline static void fetch_data(char *buf, int n)
static inline void fetch_data(char *buf, int n)
{
{
	insb(DATA_PORT, buf, n);
	insb(DATA_PORT, buf, n);
	DEBUG((DEBUG_DRIVE_IF, "fetched 0x%x bytes", n));
	DEBUG((DEBUG_DRIVE_IF, "fetched 0x%x bytes", n));
@@ -470,7 +470,7 @@ inline static void fetch_data(char *buf, int n)




/* Flush status and data fifos */
/* Flush status and data fifos */
inline static void flush_data(void)
static inline void flush_data(void)
{
{
	while ((inb(STATUS_PORT) & FL_STDT) != FL_STDT)
	while ((inb(STATUS_PORT) & FL_STDT) != FL_STDT)
		inb(DATA_PORT);
		inb(DATA_PORT);
@@ -482,7 +482,7 @@ inline static void flush_data(void)


/* Send a simple command and wait for response. Command codes < COMFETCH
/* Send a simple command and wait for response. Command codes < COMFETCH
   are quick response commands */
   are quick response commands */
inline static int exec_cmd(int cmd)
static inline int exec_cmd(int cmd)
{
{
	int ack = send_cmd(cmd);
	int ack = send_cmd(cmd);
	if (ack < 0)
	if (ack < 0)
@@ -493,7 +493,7 @@ inline static int exec_cmd(int cmd)


/* Send a command with parameters. Don't wait for the response,
/* Send a command with parameters. Don't wait for the response,
 * which consists of data blocks read from the CD. */
 * which consists of data blocks read from the CD. */
inline static int exec_read_cmd(int cmd, struct cdrom_msf *params)
static inline int exec_read_cmd(int cmd, struct cdrom_msf *params)
{
{
	int ack = send_cmd(cmd);
	int ack = send_cmd(cmd);
	if (ack < 0)
	if (ack < 0)
@@ -503,7 +503,7 @@ inline static int exec_read_cmd(int cmd, struct cdrom_msf *params)




/* Send a seek command with parameters and wait for response */
/* Send a seek command with parameters and wait for response */
inline static int exec_seek_cmd(int cmd, struct cdrom_msf *params)
static inline int exec_seek_cmd(int cmd, struct cdrom_msf *params)
{
{
	int ack = send_cmd(cmd);
	int ack = send_cmd(cmd);
	if (ack < 0)
	if (ack < 0)
@@ -516,7 +516,7 @@ inline static int exec_seek_cmd(int cmd, struct cdrom_msf *params)




/* Send a command with parameters and wait for response */
/* Send a command with parameters and wait for response */
inline static int exec_long_cmd(int cmd, struct cdrom_msf *params)
static inline int exec_long_cmd(int cmd, struct cdrom_msf *params)
{
{
	int ack = exec_read_cmd(cmd, params);
	int ack = exec_read_cmd(cmd, params);
	if (ack < 0)
	if (ack < 0)
@@ -528,7 +528,7 @@ inline static int exec_long_cmd(int cmd, struct cdrom_msf *params)




/* Binary to BCD (2 digits) */
/* Binary to BCD (2 digits) */
inline static void single_bin2bcd(u_char *p)
static inline void single_bin2bcd(u_char *p)
{
{
	DEBUG((DEBUG_CONV, "bin2bcd %02d", *p));
	DEBUG((DEBUG_CONV, "bin2bcd %02d", *p));
	*p = (*p % 10) | ((*p / 10) << 4);
	*p = (*p % 10) | ((*p / 10) << 4);
@@ -565,7 +565,7 @@ static void lba2msf(int lba, struct cdrom_msf *msf)




/* Two BCD digits to binary */
/* Two BCD digits to binary */
inline static u_char bcd2bin(u_char bcd)
static inline u_char bcd2bin(u_char bcd)
{
{
	DEBUG((DEBUG_CONV, "bcd2bin %x%02x", bcd));
	DEBUG((DEBUG_CONV, "bcd2bin %x%02x", bcd));
	return (bcd >> 4) * 10 + (bcd & 0x0f);
	return (bcd >> 4) * 10 + (bcd & 0x0f);
@@ -988,7 +988,7 @@ static char buf[CD_FRAMESIZE * N_BUFS];
static volatile int buf_bn[N_BUFS], next_bn;
static volatile int buf_bn[N_BUFS], next_bn;
static volatile int buf_in = 0, buf_out = NOBUF;
static volatile int buf_in = 0, buf_out = NOBUF;


inline static void opt_invalidate_buffers(void)
static inline void opt_invalidate_buffers(void)
{
{
	int i;
	int i;


+1 −1
Original line number Original line Diff line number Diff line
@@ -1726,7 +1726,7 @@ static int dmi_table(u32 base, int len, int num)
	return status;
	return status;
}
}


inline static int dmi_checksum(u8 *buf)
static inline int dmi_checksum(u8 *buf)
{
{
	u8   sum=0;
	u8   sum=0;
	int  a;
	int  a;
+1 −1
Original line number Original line Diff line number Diff line
@@ -487,7 +487,7 @@ static void display_clocks (unsigned int index)
 * Pack active and recovery counts into single byte representation
 * Pack active and recovery counts into single byte representation
 * used by controller
 * used by controller
 */
 */
inline static u8 pack_nibbles (u8 upper, u8 lower)
static inline u8 pack_nibbles (u8 upper, u8 lower)
{
{
	return ((upper & 0x0f) << 4) | (lower & 0x0f);
	return ((upper & 0x0f) << 4) | (lower & 0x0f);
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ avm_a1_interrupt(int intno, void *dev_id, struct pt_regs *regs)
	return IRQ_HANDLED;
	return IRQ_HANDLED;
}
}


inline static void
static inline void
release_ioregs(struct IsdnCardState *cs, int mask)
release_ioregs(struct IsdnCardState *cs, int mask)
{
{
	release_region(cs->hw.avm.cfg_reg, 8);
	release_region(cs->hw.avm.cfg_reg, 8);
Loading