[PATCH] fix inlining related build failures in mxser.c

From: Jesper Juhl
Date: Thu Dec 23 2004 - 19:51:59 EST



Hi,

An allyesconfig build of 2.6.10-rc3-bk16 revealed the following build
failures (which arefixed by the patch below) :

CC drivers/char/mxser.o
drivers/char/mxser.c: In function `mxser_ioctl':
drivers/char/mxser.c:415: sorry, unimplemented: inlining failed in call to
'mxser_check_modem_status': function body not available
drivers/char/mxser.c:1407: sorry, unimplemented: called from here
make[2]: *** [drivers/char/mxser.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2

CC drivers/char/mxser.o
drivers/char/mxser.c: In function `mxser_interrupt':
drivers/char/mxser.c:413: sorry, unimplemented: inlining failed in call to
'mxser_receive_chars': function body not available
drivers/char/mxser.c:1953: sorry, unimplemented: called from here
drivers/char/mxser.c:413: sorry, unimplemented: inlining failed in call to
'mxser_receive_chars': function body not available
drivers/char/mxser.c:1960: sorry, unimplemented: called from here
drivers/char/mxser.c:414: sorry, unimplemented: inlining failed in call to
'mxser_transmit_chars': function body not available
drivers/char/mxser.c:1969: sorry, unimplemented: called from here
drivers/char/mxser.c:414: sorry, unimplemented: inlining failed in call to
'mxser_transmit_chars': function body not available
drivers/char/mxser.c:1978: sorry, unimplemented: called from here
make[2]: *** [drivers/char/mxser.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2

CC drivers/char/mxser.o
drivers/char/mxser.c: In function `mxser_interrupt':
drivers/char/mxser.c:414: sorry, unimplemented: inlining failed in call to
'mxser_transmit_chars': function body not available
drivers/char/mxser.c:1969: sorry, unimplemented: called from here
drivers/char/mxser.c:414: sorry, unimplemented: inlining failed in call to
'mxser_transmit_chars': function body not available
drivers/char/mxser.c:1978: sorry, unimplemented: called from here
make[2]: *** [drivers/char/mxser.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2


One simple way to fix those is to simply un-inline the functions in
question (and since they are somewhat large that's what I did) - an
alternative would be to rework the ordering of the file so the functions
are defined before their first use.


Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>

diff -up linux-2.6.10-rc3-bk16-orig/drivers/char/mxser.c linux-2.6.10-rc3-bk16/drivers/char/mxser.c
--- linux-2.6.10-rc3-bk16-orig/drivers/char/mxser.c 2004-12-23 23:26:48.000000000 +0100
+++ linux-2.6.10-rc3-bk16/drivers/char/mxser.c 2004-12-24 01:54:15.000000000 +0100
@@ -410,9 +410,9 @@ static void mxser_start(struct tty_struc
static void mxser_hangup(struct tty_struct *);
static void mxser_rs_break(struct tty_struct *, int);
static irqreturn_t mxser_interrupt(int, void *, struct pt_regs *);
-static inline void mxser_receive_chars(struct mxser_struct *, int *);
-static inline void mxser_transmit_chars(struct mxser_struct *);
-static inline void mxser_check_modem_status(struct mxser_struct *, int);
+static void mxser_receive_chars(struct mxser_struct *, int *);
+static void mxser_transmit_chars(struct mxser_struct *);
+static void mxser_check_modem_status(struct mxser_struct *, int);
static int mxser_block_til_ready(struct tty_struct *, struct file *, struct mxser_struct *);
static int mxser_startup(struct mxser_struct *);
static void mxser_shutdown(struct mxser_struct *);
@@ -1989,7 +1989,7 @@ static irqreturn_t mxser_interrupt(int i
return handled;
}

-static inline void mxser_receive_chars(struct mxser_struct *info, int *status)
+static void mxser_receive_chars(struct mxser_struct *info, int *status)
{
struct tty_struct *tty = info->tty;
unsigned char ch, gdl;
@@ -2143,7 +2143,7 @@ intr_old:

}

-static inline void mxser_transmit_chars(struct mxser_struct *info)
+static void mxser_transmit_chars(struct mxser_struct *info)
{
int count, cnt;
unsigned long flags;
@@ -2206,7 +2206,7 @@ static inline void mxser_transmit_chars(
spin_unlock_irqrestore(&info->slock, flags);
}

-static inline void mxser_check_modem_status(struct mxser_struct *info, int status)
+static void mxser_check_modem_status(struct mxser_struct *info, int status)
{
/* update input line counters */
if (status & UART_MSR_TERI)



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/