LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: linuxppc-embedded@ozlabs.org
Subject: [PATCH] MPC5200 - Fix compile problems
Date: Mon, 10 Oct 2005 21:46:29 +0200	[thread overview]
Message-ID: <20051010194629.D87E1353CD8@atlas.denx.de> (raw)

Hello,

the following patch  is  against  the  current  2.6  kernel.org  tree
(commit  f96c3bbe91117402f13119ce9e609db9087ed58f) **after** applying
following two patches:


http://patchwork.ozlabs.org/linuxppc/patch?id=2018
http://patchwork.ozlabs.org/linuxppc/patch?id=2017

Without the patch, I get this:

  CC      net/sysctl_net.o
In file included from drivers/net/fec_mpc52xx/fec.c:33:
arch/ppc/syslib/bestcomm/bestcomm.h: In function 'sdma_enable_task':
arch/ppc/syslib/bestcomm/bestcomm.h:130: warning: ISO C90 forbids mixed declarations and code
  LD      fs/built-in.o
drivers/net/fec_mpc52xx/fec.c: In function 'fec_reinit':
drivers/net/fec_mpc52xx/fec.c:525: error: invalid storage class for function 'fec_update_stat'
make[3]: *** [drivers/net/fec_mpc52xx/fec.o] Error 1
make[2]: *** [drivers/net/fec_mpc52xx] Error 2
make[1]: *** [drivers/net] Error 2
drivers/serial/mpc52xx_uart.c:703: error: static declaration of 'mpc52xx_uart_driver' follows non-static declaration
drivers/serial/mpc52xx_uart.c:671: error: previous declaration of 'mpc52xx_uart_driver' was here
make[2]: *** [drivers/serial/mpc52xx_uart.o] Error 1
make[1]: *** [drivers/serial] Error 2

\f
!-------------------------------------------------------------flip-

MPC5200: Fix compiler warnings with GCC 4.x

Signed-off by Wolfgang Denk <wd@denx.de>

---
commit c55cdf8cbaf7b9f18f9357a9b9e2582ae3326541
tree e46f7ed10df8d84e3f85439cb3c81bc8a1630487
parent cdd7fdf10b3cbb7eb82cacc7ba5dba3553020f49
author Wolfgang Denk <wd@pollux.denx.de> Mon, 10 Oct 2005 21:16:49 +0200
committer Wolfgang Denk <wd@pollux.denx.de> Mon, 10 Oct 2005 21:16:49 +0200

 arch/ppc/syslib/bestcomm/bestcomm.h |    4 +++-
 drivers/net/fec_mpc52xx/fec.c       |    2 +-
 drivers/serial/mpc52xx_uart.c       |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/syslib/bestcomm/bestcomm.h b/arch/ppc/syslib/bestcomm/bestcomm.h
--- a/arch/ppc/syslib/bestcomm/bestcomm.h
+++ b/arch/ppc/syslib/bestcomm/bestcomm.h
@@ -116,6 +116,8 @@ struct sdma_tdt {
 
 static inline void sdma_enable_task(int task)
 {
+	u16 reg;
+
 	DPRINTK("***DMA enable task (%d): tdt = %08x\n",task, sdma.tdt);
 	DPRINTK("***tdt->start   = %08x\n",sdma.tdt[task].start);
 	DPRINTK("***tdt->stop    = %08x\n",sdma.tdt[task].stop);
@@ -127,7 +129,7 @@ static inline void sdma_enable_task(int 
 	DPRINTK("***tdt->litbase = %08x\n",sdma.tdt[task].litbase);
 	DPRINTK("***--------------\n");
 
-	u16 reg = in_be16(&sdma.io->tcr[task]);
+	reg = in_be16(&sdma.io->tcr[task]);
 	DPRINTK("***enable task: &sdma.io->tcr=%08x, reg = %04x\n", &sdma.io->tcr, reg);
 	out_be16(&sdma.io->tcr[task],  reg | TASK_ENABLE);
 }
diff --git a/drivers/net/fec_mpc52xx/fec.c b/drivers/net/fec_mpc52xx/fec.c
--- a/drivers/net/fec_mpc52xx/fec.c
+++ b/drivers/net/fec_mpc52xx/fec.c
@@ -522,7 +522,7 @@ static void fec_reinit(struct net_device
 {
 	struct fec_priv *priv = (struct fec_priv *)dev->priv;
 	struct mpc52xx_fec *fec = priv->fec;
-	static void fec_update_stat(struct net_device *);
+	void fec_update_stat(struct net_device *);
 
 	netif_stop_queue(dev);
 	out_be32(&fec->imask, 0x0);
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -668,7 +668,7 @@ mpc52xx_console_setup(struct console *co
 }
 
 
-extern struct uart_driver mpc52xx_uart_driver;
+static struct uart_driver mpc52xx_uart_driver;
 
 static struct console mpc52xx_console = {
 	.name	= "ttyS",


\f
!-------------------------------------------------------------flip-



Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
...when fits of creativity run strong, more than  one  programmer  or
writer  has  been  known to abandon the desktop for the more spacious
floor.                                             - Fred Brooks, Jr.

                 reply	other threads:[~2005-10-10 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20051010194629.D87E1353CD8@atlas.denx.de \
    --to=wd@denx.de \
    --cc=linuxppc-embedded@ozlabs.org \
    /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