From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] QE UEC: Fix compiler warnings
Date: Thu, 7 Aug 2008 23:35:31 -0700 [thread overview]
Message-ID: <1218177331-22637-1-git-send-email-biggerbadderben@gmail.com> (raw)
In-Reply-To: <>
Moved static functions earlier in file so forward declarations are not needed.
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
---
This requires the patch "QE UEC: Add MII Commands"
Added directly to net tree
drivers/qe/uec.c | 69 +++++++++++++++++++++++++----------------------------
1 files changed, 33 insertions(+), 36 deletions(-)
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c
index 049a74d..ba89247 100644
--- a/drivers/qe/uec.c
+++ b/drivers/qe/uec.c
@@ -130,10 +130,6 @@ static uec_info_t eth4_uec_info = {
static struct eth_device *devlist[MAXCONTROLLERS];
-static int uec_miiphy_read(char *devname, unsigned char addr,
- unsigned char reg, unsigned short *value);
-static int uec_miiphy_write(char *devname, unsigned char addr,
- unsigned char reg, unsigned short value);
u16 phy_read (struct uec_mii_info *mii_info, u16 regnum);
void phy_write (struct uec_mii_info *mii_info, u16 regnum, u16 val);
@@ -641,6 +637,39 @@ static void phy_change(struct eth_device *dev)
adjust_link(dev);
}
+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
+ && !defined(BITBANGMII)
+
+/*
+ * Read a MII PHY register.
+ *
+ * Returns:
+ * 0 on success
+ */
+static int uec_miiphy_read(char *devname, unsigned char addr,
+ unsigned char reg, unsigned short *value)
+{
+ *value = uec_read_phy_reg(devlist[0], addr, reg);
+
+ return 0;
+}
+
+/*
+ * Write a MII PHY register.
+ *
+ * Returns:
+ * 0 on success
+ */
+static int uec_miiphy_write(char *devname, unsigned char addr,
+ unsigned char reg, unsigned short value)
+{
+ uec_write_phy_reg(devlist[0], addr, reg, value);
+
+ return 0;
+}
+
+#endif
+
static int uec_set_mac_address(uec_private_t *uec, u8 *mac_addr)
{
uec_t *uec_regs;
@@ -1378,37 +1407,5 @@ int uec_initialize(int index)
return 1;
}
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
- && !defined(BITBANGMII)
-
-/*
- * Read a MII PHY register.
- *
- * Returns:
- * 0 on success
- */
-static int uec_miiphy_read(char *devname, unsigned char addr,
- unsigned char reg, unsigned short *value)
-{
- *value = uec_read_phy_reg(devlist[0], addr, reg);
-
- return 0;
-}
-
-/*
- * Write a MII PHY register.
- *
- * Returns:
- * 0 on success
- */
-static int uec_miiphy_write(char *devname, unsigned char addr,
- unsigned char reg, unsigned short value)
-{
- uec_write_phy_reg(devlist[0], addr, reg, value);
-
- return 0;
-}
-
-#endif
#endif /* CONFIG_QE */
--
1.5.4.3
reply other threads:[~2008-08-08 6:35 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=1218177331-22637-1-git-send-email-biggerbadderben@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/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