Commit d9d78ee46d9a396d0a81d00c2b003a9bd32c2e61

Authored by Ben Warren
1 parent d5d28fe4aa

QE UEC: Fix compiler warnings

Moved static functions earlier in file so forward declarations are not needed.

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>

Showing 1 changed file with 33 additions and 36 deletions Side-by-side Diff

... ... @@ -130,10 +130,6 @@
130 130  
131 131 static struct eth_device *devlist[MAXCONTROLLERS];
132 132  
133   -static int uec_miiphy_read(char *devname, unsigned char addr,
134   - unsigned char reg, unsigned short *value);
135   -static int uec_miiphy_write(char *devname, unsigned char addr,
136   - unsigned char reg, unsigned short value);
137 133 u16 phy_read (struct uec_mii_info *mii_info, u16 regnum);
138 134 void phy_write (struct uec_mii_info *mii_info, u16 regnum, u16 val);
139 135  
... ... @@ -641,6 +637,39 @@
641 637 adjust_link(dev);
642 638 }
643 639  
  640 +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
  641 + && !defined(BITBANGMII)
  642 +
  643 +/*
  644 + * Read a MII PHY register.
  645 + *
  646 + * Returns:
  647 + * 0 on success
  648 + */
  649 +static int uec_miiphy_read(char *devname, unsigned char addr,
  650 + unsigned char reg, unsigned short *value)
  651 +{
  652 + *value = uec_read_phy_reg(devlist[0], addr, reg);
  653 +
  654 + return 0;
  655 +}
  656 +
  657 +/*
  658 + * Write a MII PHY register.
  659 + *
  660 + * Returns:
  661 + * 0 on success
  662 + */
  663 +static int uec_miiphy_write(char *devname, unsigned char addr,
  664 + unsigned char reg, unsigned short value)
  665 +{
  666 + uec_write_phy_reg(devlist[0], addr, reg, value);
  667 +
  668 + return 0;
  669 +}
  670 +
  671 +#endif
  672 +
644 673 static int uec_set_mac_address(uec_private_t *uec, u8 *mac_addr)
645 674 {
646 675 uec_t *uec_regs;
... ... @@ -1378,38 +1407,6 @@
1378 1407 return 1;
1379 1408 }
1380 1409  
1381   -#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
1382   - && !defined(BITBANGMII)
1383   -
1384   -/*
1385   - * Read a MII PHY register.
1386   - *
1387   - * Returns:
1388   - * 0 on success
1389   - */
1390   -static int uec_miiphy_read(char *devname, unsigned char addr,
1391   - unsigned char reg, unsigned short *value)
1392   -{
1393   - *value = uec_read_phy_reg(devlist[0], addr, reg);
1394   -
1395   - return 0;
1396   -}
1397   -
1398   -/*
1399   - * Write a MII PHY register.
1400   - *
1401   - * Returns:
1402   - * 0 on success
1403   - */
1404   -static int uec_miiphy_write(char *devname, unsigned char addr,
1405   - unsigned char reg, unsigned short value)
1406   -{
1407   - uec_write_phy_reg(devlist[0], addr, reg, value);
1408   -
1409   - return 0;
1410   -}
1411   -
1412   -#endif
1413 1410  
1414 1411 #endif /* CONFIG_QE */