Commit 54a88e4c authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: dsa: mv88e6xxx: Make SMI c22/c45 read/write functions static

The SMI clause 22 & 45 read/write operations are local to the global2.c file,
so make them static. This eliminates the following warning:

drivers/net/dsa/mv88e6xxx/global2.c:571:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_read_c45' [-Wmissing-prototypes]
 int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip, int addr,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/global2.c:602:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_read_c22' [-Wmissing-prototypes]
 int mv88e6xxx_g2_smi_phy_read_c22(struct mv88e6xxx_chip *chip, int addr,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/global2.c:635:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_write_c45' [-Wmissing-prototypes]
 int mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip, int addr,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/global2.c:664:5: warning: no previous prototype for 'mv88e6xxx_g2_smi_phy_write_c22' [-Wmissing-prototypes]
 int mv88e6xxx_g2_smi_phy_write_c22(struct mv88e6xxx_chip *chip, int addr,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suggested-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 261a0a54
...@@ -568,8 +568,9 @@ static int mv88e6xxx_g2_smi_phy_write_addr(struct mv88e6xxx_chip *chip, ...@@ -568,8 +568,9 @@ static int mv88e6xxx_g2_smi_phy_write_addr(struct mv88e6xxx_chip *chip,
return mv88e6xxx_g2_smi_phy_cmd(chip, cmd); return mv88e6xxx_g2_smi_phy_cmd(chip, cmd);
} }
int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip, int addr, static int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip,
int reg_c45, u16 *val, bool external) int addr, int reg_c45, u16 *val,
bool external)
{ {
int device = (reg_c45 >> 16) & 0x1f; int device = (reg_c45 >> 16) & 0x1f;
int reg = reg_c45 & 0xffff; int reg = reg_c45 & 0xffff;
...@@ -599,8 +600,9 @@ int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip, int addr, ...@@ -599,8 +600,9 @@ int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip, int addr,
return 0; return 0;
} }
int mv88e6xxx_g2_smi_phy_read_c22(struct mv88e6xxx_chip *chip, int addr, static int mv88e6xxx_g2_smi_phy_read_c22(struct mv88e6xxx_chip *chip,
int reg, u16 *val, bool external) int addr, int reg, u16 *val,
bool external)
{ {
u16 cmd = GLOBAL2_SMI_PHY_CMD_OP_22_READ_DATA | (addr << 5) | reg; u16 cmd = GLOBAL2_SMI_PHY_CMD_OP_22_READ_DATA | (addr << 5) | reg;
int err; int err;
...@@ -632,8 +634,9 @@ int mv88e6xxx_g2_smi_phy_read(struct mv88e6xxx_chip *chip, ...@@ -632,8 +634,9 @@ int mv88e6xxx_g2_smi_phy_read(struct mv88e6xxx_chip *chip,
return mv88e6xxx_g2_smi_phy_read_c22(chip, addr, reg, val, external); return mv88e6xxx_g2_smi_phy_read_c22(chip, addr, reg, val, external);
} }
int mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip, int addr, static int mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip,
int reg_c45, u16 val, bool external) int addr, int reg_c45, u16 val,
bool external)
{ {
int device = (reg_c45 >> 16) & 0x1f; int device = (reg_c45 >> 16) & 0x1f;
int reg = reg_c45 & 0xffff; int reg = reg_c45 & 0xffff;
...@@ -661,8 +664,9 @@ int mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip, int addr, ...@@ -661,8 +664,9 @@ int mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip, int addr,
return 0; return 0;
} }
int mv88e6xxx_g2_smi_phy_write_c22(struct mv88e6xxx_chip *chip, int addr, static int mv88e6xxx_g2_smi_phy_write_c22(struct mv88e6xxx_chip *chip,
int reg, u16 val, bool external) int addr, int reg, u16 val,
bool external)
{ {
u16 cmd = GLOBAL2_SMI_PHY_CMD_OP_22_WRITE_DATA | (addr << 5) | reg; u16 cmd = GLOBAL2_SMI_PHY_CMD_OP_22_WRITE_DATA | (addr << 5) | reg;
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment