]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/commitdiff
drivers/net/: sparse fixes
authorKim Phillips <kim.phillips@freescale.com>
Mon, 29 Oct 2012 13:34:34 +0000 (13:34 +0000)
committerTom Rini <trini@ti.com>
Sun, 4 Nov 2012 18:00:36 +0000 (11:00 -0700)
phy.c:46:5: warning: symbol 'genphy_config_advert' was not declared. Should it be static?
phy.c:121:5: warning: symbol 'genphy_setup_forced' was not declared. Should it be static?
phy.c:468:5: warning: symbol 'phy_probe' was not declared. Should it be static?
phy.c:491:19: warning: symbol 'get_phy_driver' was not declared. Should it be static?
phy.c:508:19: warning: symbol 'phy_device_create' was not declared. Should it be static?
phy.c:552:5: warning: symbol 'get_phy_id' was not declared. Should it be static?
phy.c:584:19: warning: symbol 'get_phy_device' was not declared. Should it be sta
vitesse.c:126:5: warning: symbol 'vsc8601_config' was not declared. Should it be static?
vsc7385.c:33:5: warning: symbol 'vsc7385_upload_firmware' was not declared. Should it be static?
tgec_phy.c:33:5: warning: symbol 'tgec_mdio_write' was not declared. Should it be static?
tgec_phy.c:75:5: warning: symbol 'tgec_mdio_read' was not declared. Should it be static?
tgec_phy.c:117:5: warning: symbol 'tgec_mdio_reset' was not declared. Should it be static?
eth.c:48:6: warning: symbol 'dtsec_configure_serdes' was not declared. Should it be static?
p4080.c:26:5: warning: symbol 'port_to_devdisr' was not declared. Should it be static?

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
drivers/net/fm/eth.c
drivers/net/fm/p1023.c
drivers/net/fm/p4080.c
drivers/net/fm/p5020.c
drivers/net/fm/tgec_phy.c
drivers/net/phy/phy.c
drivers/net/phy/vitesse.c
drivers/net/vsc7385.c

index 82c787bf3834267f43f5a138592472f28e3f723d..54b142f47d3a276e7b78384254ad1af4ffcdb5fe 100644 (file)
@@ -46,7 +46,7 @@ static int num_controllers;
                        TBICR_FULL_DUPLEX | TBICR_SPEED1_SET)
 
 /* Configure the TBI for SGMII operation */
-void dtsec_configure_serdes(struct fm_eth *priv)
+static void dtsec_configure_serdes(struct fm_eth *priv)
 {
 #ifdef CONFIG_SYS_FMAN_V3
        u32 value;
index 9765da5b2354af0e196e9f40f7b93015619c346d..387d2a382dad629cbc897b89418632c0c90d34e3 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
 
-u32 port_to_devdisr[] = {
+static u32 port_to_devdisr[] = {
        [FM1_DTSEC1] = MPC85xx_DEVDISR_TSEC1,
        [FM1_DTSEC2] = MPC85xx_DEVDISR_TSEC2,
 };
index 9dc6049c360cc1bc267ccbca5f8a04fda8bc1848..b04fd0f6562569cea9a5799a88f6922258042da7 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
 
-u32 port_to_devdisr[] = {
+static u32 port_to_devdisr[] = {
        [FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
        [FM1_DTSEC2] = FSL_CORENET_DEVDISR2_DTSEC1_2,
        [FM1_DTSEC3] = FSL_CORENET_DEVDISR2_DTSEC1_3,
index a7a6e43fe2c038293878f1ae6b59a8e3a8f760e0..5391044833cb6d1c24f2d78c885e7b4085e0fe46 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
 
-u32 port_to_devdisr[] = {
+static u32 port_to_devdisr[] = {
        [FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
        [FM1_DTSEC2] = FSL_CORENET_DEVDISR2_DTSEC1_2,
        [FM1_DTSEC3] = FSL_CORENET_DEVDISR2_DTSEC1_3,
index 2d349ad037086284d2c18dd8e490d5567e562def..2be69d71621a9ee70887198108bf86aadd5426f8 100644 (file)
@@ -30,8 +30,8 @@
  * until the write is done before it returns.  All PHY configuration has to be
  * done through the TSEC1 MIIM regs
  */
-int tgec_mdio_write(struct mii_dev *bus, int port_addr, int dev_addr,
-                       int regnum, u16 value)
+static int tgec_mdio_write(struct mii_dev *bus, int port_addr, int dev_addr,
+                          int regnum, u16 value)
 {
        u32 mdio_ctl;
        u32 stat_val;
@@ -72,8 +72,8 @@ int tgec_mdio_write(struct mii_dev *bus, int port_addr, int dev_addr,
  * Clears miimcom first.  All PHY configuration has to be done through the
  * TSEC1 MIIM regs
  */
-int tgec_mdio_read(struct mii_dev *bus, int port_addr, int dev_addr,
-                       int regnum)
+static int tgec_mdio_read(struct mii_dev *bus, int port_addr, int dev_addr,
+                         int regnum)
 {
        u32 mdio_ctl;
        u32 stat_val;
@@ -114,7 +114,7 @@ int tgec_mdio_read(struct mii_dev *bus, int port_addr, int dev_addr,
        return in_be32(&regs->mdio_data) & 0xffff;
 }
 
-int tgec_mdio_reset(struct mii_dev *bus)
+static int tgec_mdio_reset(struct mii_dev *bus)
 {
        return 0;
 }
index baef60f827466c8bf2d1227da0c850907774768c..1ffa791dceb357d2e813880732fe3350a3cbc021 100644 (file)
@@ -43,7 +43,7 @@
  *   what is supported.  Returns < 0 on error, 0 if the PHY's advertisement
  *   hasn't changed, and > 0 if it has changed.
  */
-int genphy_config_advert(struct phy_device *phydev)
+static int genphy_config_advert(struct phy_device *phydev)
 {
        u32 advertise;
        int oldadv, adv;
@@ -118,7 +118,7 @@ int genphy_config_advert(struct phy_device *phydev)
  * Description: Configures MII_BMCR to force speed/duplex
  *   to the values in phydev. Assumes that the values are valid.
  */
-int genphy_setup_forced(struct phy_device *phydev)
+static int genphy_setup_forced(struct phy_device *phydev)
 {
        int err;
        int ctl = 0;
@@ -465,7 +465,7 @@ int phy_register(struct phy_driver *drv)
        return 0;
 }
 
-int phy_probe(struct phy_device *phydev)
+static int phy_probe(struct phy_device *phydev)
 {
        int err = 0;
 
@@ -488,7 +488,7 @@ static struct phy_driver *generic_for_interface(phy_interface_t interface)
        return &genphy_driver;
 }
 
-struct phy_driver *get_phy_driver(struct phy_device *phydev,
+static struct phy_driver *get_phy_driver(struct phy_device *phydev,
                                phy_interface_t interface)
 {
        struct list_head *entry;
@@ -505,8 +505,9 @@ struct phy_driver *get_phy_driver(struct phy_device *phydev,
        return generic_for_interface(interface);
 }
 
-struct phy_device *phy_device_create(struct mii_dev *bus, int addr, int phy_id,
-                                       phy_interface_t interface)
+static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
+                                           int phy_id,
+                                           phy_interface_t interface)
 {
        struct phy_device *dev;
 
@@ -549,7 +550,7 @@ struct phy_device *phy_device_create(struct mii_dev *bus, int addr, int phy_id,
  * Description: Reads the ID registers of the PHY at @addr on the
  *   @bus, stores it in @phy_id and returns zero on success.
  */
-int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
+static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
 {
        int phy_reg;
 
@@ -581,8 +582,8 @@ int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
  * Description: Reads the ID registers of the PHY at @addr on the
  *   @bus, then allocates and returns the phy_device to represent it.
  */
-struct phy_device *get_phy_device(struct mii_dev *bus, int addr,
-                               phy_interface_t interface)
+static struct phy_device *get_phy_device(struct mii_dev *bus, int addr,
+                                        phy_interface_t interface)
 {
        u32 phy_id = 0x1fffffff;
        int i;
index 0a0f40dbde042558a8a9d1a5b4da48b96a3bb7ba..6c5cb99774d8afde8224d190d2f647e70db3d828 100644 (file)
@@ -123,7 +123,7 @@ static int cis8204_config(struct phy_device *phydev)
 }
 
 /* Vitesse VSC8601 */
-int vsc8601_config(struct phy_device *phydev)
+static int vsc8601_config(struct phy_device *phydev)
 {
        /* Configure some basic stuff */
 #ifdef CONFIG_SYS_VSC8601_SKEWFIX
index ada42c41f8bfea21aa51abba163e507ed5f6262e..a5110e516dbeb47d52382ec6b91cdad91f4b71dd 100644 (file)
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/errno.h>
+#include "vsc7385.h"
 
 /*
  * Upload a Vitesse VSC7385 firmware image to the hardware