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_sysfs.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_sysfs.c')
-rw-r--r-- | drivers/net/gianfar_sysfs.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c index 782c20170082..74e0b4d42587 100644 --- a/drivers/net/gianfar_sysfs.c +++ b/drivers/net/gianfar_sysfs.c | |||
@@ -81,7 +81,7 @@ static ssize_t gfar_set_bd_stash(struct device *dev, | |||
81 | return count; | 81 | return count; |
82 | } | 82 | } |
83 | 83 | ||
84 | DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash); | 84 | static DEVICE_ATTR(bd_stash, 0644, gfar_show_bd_stash, gfar_set_bd_stash); |
85 | 85 | ||
86 | static ssize_t gfar_show_rx_stash_size(struct device *dev, | 86 | static ssize_t gfar_show_rx_stash_size(struct device *dev, |
87 | struct device_attribute *attr, char *buf) | 87 | struct device_attribute *attr, char *buf) |
@@ -130,8 +130,8 @@ out: | |||
130 | return count; | 130 | return count; |
131 | } | 131 | } |
132 | 132 | ||
133 | DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size, | 133 | static DEVICE_ATTR(rx_stash_size, 0644, gfar_show_rx_stash_size, |
134 | gfar_set_rx_stash_size); | 134 | gfar_set_rx_stash_size); |
135 | 135 | ||
136 | /* Stashing will only be enabled when rx_stash_size != 0 */ | 136 | /* Stashing will only be enabled when rx_stash_size != 0 */ |
137 | static ssize_t gfar_show_rx_stash_index(struct device *dev, | 137 | static ssize_t gfar_show_rx_stash_index(struct device *dev, |
@@ -172,8 +172,8 @@ out: | |||
172 | return count; | 172 | return count; |
173 | } | 173 | } |
174 | 174 | ||
175 | DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index, | 175 | static DEVICE_ATTR(rx_stash_index, 0644, gfar_show_rx_stash_index, |
176 | gfar_set_rx_stash_index); | 176 | gfar_set_rx_stash_index); |
177 | 177 | ||
178 | static ssize_t gfar_show_fifo_threshold(struct device *dev, | 178 | static ssize_t gfar_show_fifo_threshold(struct device *dev, |
179 | struct device_attribute *attr, | 179 | struct device_attribute *attr, |
@@ -210,8 +210,8 @@ static ssize_t gfar_set_fifo_threshold(struct device *dev, | |||
210 | return count; | 210 | return count; |
211 | } | 211 | } |
212 | 212 | ||
213 | DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold, | 213 | static DEVICE_ATTR(fifo_threshold, 0644, gfar_show_fifo_threshold, |
214 | gfar_set_fifo_threshold); | 214 | gfar_set_fifo_threshold); |
215 | 215 | ||
216 | static ssize_t gfar_show_fifo_starve(struct device *dev, | 216 | static ssize_t gfar_show_fifo_starve(struct device *dev, |
217 | struct device_attribute *attr, char *buf) | 217 | struct device_attribute *attr, char *buf) |
@@ -247,7 +247,8 @@ static ssize_t gfar_set_fifo_starve(struct device *dev, | |||
247 | return count; | 247 | return count; |
248 | } | 248 | } |
249 | 249 | ||
250 | DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve, gfar_set_fifo_starve); | 250 | static DEVICE_ATTR(fifo_starve, 0644, gfar_show_fifo_starve, |
251 | gfar_set_fifo_starve); | ||
251 | 252 | ||
252 | static ssize_t gfar_show_fifo_starve_off(struct device *dev, | 253 | static ssize_t gfar_show_fifo_starve_off(struct device *dev, |
253 | struct device_attribute *attr, | 254 | struct device_attribute *attr, |
@@ -284,8 +285,8 @@ static ssize_t gfar_set_fifo_starve_off(struct device *dev, | |||
284 | return count; | 285 | return count; |
285 | } | 286 | } |
286 | 287 | ||
287 | DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off, | 288 | static DEVICE_ATTR(fifo_starve_off, 0644, gfar_show_fifo_starve_off, |
288 | gfar_set_fifo_starve_off); | 289 | gfar_set_fifo_starve_off); |
289 | 290 | ||
290 | void gfar_init_sysfs(struct net_device *dev) | 291 | void gfar_init_sysfs(struct net_device *dev) |
291 | { | 292 | { |