From: Jeff Garzik <jgarzik@pobox.com>
To: Adrian Bunk <bunk@fs.tum.de>
Cc: linux-net@vger.kernel.org, Netdev <netdev@oss.sgi.com>
Subject: Re: [2.6 patch] net/hamradio/dmascc: remove inlines
Date: Sat, 10 Jul 2004 13:00:55 -0400 [thread overview]
Message-ID: <40F020C7.5010608@pobox.com> (raw)
In-Reply-To: <20040710010414.GX28324@fs.tum.de>
Adrian Bunk wrote:
> Trying to compile drivers/scsi/ips.c with gcc 3.4 and
> # define inline __inline__ __attribute__((always_inline))
> results in compile errors starting with the following:
>
> <-- snip -->
>
> ...
> CC drivers/net/hamradio/dmascc.o
> drivers/net/hamradio/dmascc.c: In function `scc_isr':
> drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining failed
> in call to 'z8530_isr': function body not available
> drivers/net/hamradio/dmascc.c:969: sorry, unimplemented: called from here
> drivers/net/hamradio/dmascc.c:250: sorry, unimplemented: inlining failed
> in call to 'z8530_isr': function body not available
> drivers/net/hamradio/dmascc.c:978: sorry, unimplemented: called from here
> make[3]: *** [drivers/net/hamradio/dmascc.o] Error 1
>
> <-- snip -->
>
>
> The patch below removes all inlines from dmascc.c .
>
>
> diffstat output:
> drivers/net/hamradio/dmascc.c | 20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
>
> Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
>
> --- linux-2.6.7-mm7-full-gcc3.4/drivers/net/hamradio/dmascc.c.old 2004-07-10 02:51:07.000000000 +0200
> +++ linux-2.6.7-mm7-full-gcc3.4/drivers/net/hamradio/dmascc.c 2004-07-10 03:00:43.000000000 +0200
> @@ -247,7 +247,7 @@
> static int scc_set_mac_address(struct net_device *dev, void *sa);
>
> static irqreturn_t scc_isr(int irq, void *dev_id, struct pt_regs * regs);
> -static inline void z8530_isr(struct scc_info *info);
> +static void z8530_isr(struct scc_info *info);
> static void rx_isr(struct scc_priv *priv);
> static void special_condition(struct scc_priv *priv, int rc);
> static void rx_bh(void *arg);
> @@ -255,11 +255,11 @@
> static void es_isr(struct scc_priv *priv);
> static void tm_isr(struct scc_priv *priv);
>
> -static inline void tx_on(struct scc_priv *priv);
> -static inline void rx_on(struct scc_priv *priv);
> -static inline void rx_off(struct scc_priv *priv);
> +static void tx_on(struct scc_priv *priv);
> +static void rx_on(struct scc_priv *priv);
> +static void rx_off(struct scc_priv *priv);
> static void start_timer(struct scc_priv *priv, int t, int r15);
> -static inline unsigned char random(void);
> +static unsigned char random(void);
>
>
> /* Initialization variables */
> @@ -981,7 +981,7 @@
> }
>
>
> -static inline void z8530_isr(struct scc_info *info) {
> +static void z8530_isr(struct scc_info *info) {
> int is, i = 100;
>
> while ((is = read_scc(&info->priv[0], R3)) && i--) {
> @@ -1294,7 +1294,7 @@
> }
>
>
> -static inline void tx_on(struct scc_priv *priv) {
> +static void tx_on(struct scc_priv *priv) {
> int i, n;
> unsigned long flags;
>
> @@ -1330,7 +1330,7 @@
> }
>
>
> -static inline void rx_on(struct scc_priv *priv) {
> +static void rx_on(struct scc_priv *priv) {
> unsigned long flags;
>
> /* Clear RX FIFO */
> @@ -1364,7 +1364,7 @@
> }
>
>
> -static inline void rx_off(struct scc_priv *priv) {
> +static void rx_off(struct scc_priv *priv) {
> /* Disable receiver */
> write_scc(priv, R3, Rx8);
> /* Disable DREQ / RX interrupt */
> @@ -1397,7 +1397,7 @@
> }
>
>
> -static inline unsigned char random(void) {
> +static unsigned char random(void) {
> /* See "Numerical Recipes in C", second edition, p. 284 */
> rand = rand * 1664525L + 1013904223L;
> return (unsigned char) (rand >> 24);
It seems like you are going directly against the intent of the author,
with this patch.
Jeff
next parent reply other threads:[~2004-07-10 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040710010414.GX28324@fs.tum.de>
2004-07-10 17:00 ` Jeff Garzik [this message]
2004-07-10 17:16 ` [2.6 patch] net/hamradio/dmascc: remove inlines Adrian Bunk
2004-07-12 23:04 ` Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40F020C7.5010608@pobox.com \
--to=jgarzik@pobox.com \
--cc=bunk@fs.tum.de \
--cc=linux-net@vger.kernel.org \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).