diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2009-02-01 03:54:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-01 03:54:16 -0500 |
commit | b2f66d183966114fcc91591191ec9af14a252ac5 (patch) | |
tree | e47ff4df2eec80073c4cf7f6e3495fd258bbf70a /drivers/net/gianfar_mii.c | |
parent | 3d1e4db2b0698785f4e4dd139d88257e855e53b8 (diff) |
gianfar: Fix sparse warnings
This patch fixes following sparse warnings:
CHECK gianfar_ethtool.c
gianfar_ethtool.c:610:26: warning: symbol 'gfar_ethtool_ops' was not declared. Should it be static?
CHECK gianfar_mii.c
gianfar_mii.c:108:35: warning: cast adds address space to expression (<asn:2>)
gianfar_mii.c:119:35: warning: cast adds address space to expression (<asn:2>)
gianfar_mii.c:128:35: warning: cast adds address space to expression (<asn:2>)
gianfar_mii.c:272:5: warning: cast removes address space of expression
gianfar_mii.c:271:15: warning: cast adds address space to expression (<asn:2>)
gianfar_mii.c:340:11: warning: cast adds address space to expression (<asn:2>)
CHECK gianfar_sysfs.c
gianfar_sysfs.c:84:1: warning: symbol 'dev_attr_bd_stash' was not declared. Should it be static?
gianfar_sysfs.c:133:1: warning: symbol 'dev_attr_rx_stash_size' was not declared. Should it be static?
gianfar_sysfs.c:175:1: warning: symbol 'dev_attr_rx_stash_index' was not declared. Should it be static?
gianfar_sysfs.c:213:1: warning: symbol 'dev_attr_fifo_threshold' was not declared. Should it be static?
gianfar_sysfs.c:250:1: warning: symbol 'dev_attr_fifo_starve' was not declared. Should it be static?
gianfar_sysfs.c:287:1: warning: symbol 'dev_attr_fifo_starve_off' was not declared. Should it be static?
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar_mii.c')
-rw-r--r-- | drivers/net/gianfar_mii.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index f49a426ad681..64e4679b3279 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -105,7 +105,7 @@ int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum) | |||
105 | * All PHY configuration is done through the TSEC1 MIIM regs */ | 105 | * All PHY configuration is done through the TSEC1 MIIM regs */ |
106 | int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) | 106 | int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) |
107 | { | 107 | { |
108 | struct gfar_mii __iomem *regs = (void __iomem *)bus->priv; | 108 | struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv; |
109 | 109 | ||
110 | /* Write to the local MII regs */ | 110 | /* Write to the local MII regs */ |
111 | return(gfar_local_mdio_write(regs, mii_id, regnum, value)); | 111 | return(gfar_local_mdio_write(regs, mii_id, regnum, value)); |
@@ -116,7 +116,7 @@ int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) | |||
116 | * configuration has to be done through the TSEC1 MIIM regs */ | 116 | * configuration has to be done through the TSEC1 MIIM regs */ |
117 | int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum) | 117 | int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum) |
118 | { | 118 | { |
119 | struct gfar_mii __iomem *regs = (void __iomem *)bus->priv; | 119 | struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv; |
120 | 120 | ||
121 | /* Read the local MII regs */ | 121 | /* Read the local MII regs */ |
122 | return(gfar_local_mdio_read(regs, mii_id, regnum)); | 122 | return(gfar_local_mdio_read(regs, mii_id, regnum)); |
@@ -125,7 +125,7 @@ int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum) | |||
125 | /* Reset the MIIM registers, and wait for the bus to free */ | 125 | /* Reset the MIIM registers, and wait for the bus to free */ |
126 | static int gfar_mdio_reset(struct mii_bus *bus) | 126 | static int gfar_mdio_reset(struct mii_bus *bus) |
127 | { | 127 | { |
128 | struct gfar_mii __iomem *regs = (void __iomem *)bus->priv; | 128 | struct gfar_mii __iomem *regs = (void __force __iomem *)bus->priv; |
129 | unsigned int timeout = PHY_INIT_TIMEOUT; | 129 | unsigned int timeout = PHY_INIT_TIMEOUT; |
130 | 130 | ||
131 | mutex_lock(&bus->mdio_lock); | 131 | mutex_lock(&bus->mdio_lock); |
@@ -268,8 +268,8 @@ static int gfar_mdio_probe(struct of_device *ofdev, | |||
268 | * Also, we have to cast back to struct gfar_mii because of | 268 | * Also, we have to cast back to struct gfar_mii because of |
269 | * definition weirdness done in gianfar.h. | 269 | * definition weirdness done in gianfar.h. |
270 | */ | 270 | */ |
271 | enet_regs = (struct gfar __iomem *) | 271 | enet_regs = (struct gfar __force __iomem *) |
272 | ((char *)regs - offsetof(struct gfar, gfar_mii_regs)); | 272 | ((char __force *)regs - offsetof(struct gfar, gfar_mii_regs)); |
273 | 273 | ||
274 | for_each_child_of_node(np, tbi) { | 274 | for_each_child_of_node(np, tbi) { |
275 | if (!strncmp(tbi->type, "tbi-phy", 8)) | 275 | if (!strncmp(tbi->type, "tbi-phy", 8)) |
@@ -337,7 +337,7 @@ static int gfar_mdio_remove(struct of_device *ofdev) | |||
337 | 337 | ||
338 | dev_set_drvdata(&ofdev->dev, NULL); | 338 | dev_set_drvdata(&ofdev->dev, NULL); |
339 | 339 | ||
340 | iounmap((void __iomem *)bus->priv); | 340 | iounmap((void __force __iomem *)bus->priv); |
341 | bus->priv = NULL; | 341 | bus->priv = NULL; |
342 | kfree(bus->irq); | 342 | kfree(bus->irq); |
343 | mdiobus_free(bus); | 343 | mdiobus_free(bus); |