diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-03-08 15:17:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-08 15:17:04 -0500 |
commit | f5c445ed4148434f142be0263a8ad7cb58503e8a (patch) | |
tree | 7e3b87503eb416261dcb5424cc269b2de77e4616 /net/core | |
parent | 81160e66cca3d3a16b7d88e0e2dccfc5c76f36f9 (diff) |
ethtool: Use noinline_for_stack
Use self documenting noinline_for_stack instead of duplicated comments.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/ethtool.c | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 33d2ded50f84..f4cb6b6299d9 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -200,10 +200,7 @@ static int ethtool_set_settings(struct net_device *dev, void __user *useraddr) | |||
200 | return dev->ethtool_ops->set_settings(dev, &cmd); | 200 | return dev->ethtool_ops->set_settings(dev, &cmd); |
201 | } | 201 | } |
202 | 202 | ||
203 | /* | 203 | static noinline_for_stack int ethtool_get_drvinfo(struct net_device *dev, void __user *useraddr) |
204 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
205 | */ | ||
206 | static noinline int ethtool_get_drvinfo(struct net_device *dev, void __user *useraddr) | ||
207 | { | 204 | { |
208 | struct ethtool_drvinfo info; | 205 | struct ethtool_drvinfo info; |
209 | const struct ethtool_ops *ops = dev->ethtool_ops; | 206 | const struct ethtool_ops *ops = dev->ethtool_ops; |
@@ -242,10 +239,7 @@ static noinline int ethtool_get_drvinfo(struct net_device *dev, void __user *use | |||
242 | return 0; | 239 | return 0; |
243 | } | 240 | } |
244 | 241 | ||
245 | /* | 242 | static noinline_for_stack int ethtool_get_sset_info(struct net_device *dev, |
246 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
247 | */ | ||
248 | static noinline int ethtool_get_sset_info(struct net_device *dev, | ||
249 | void __user *useraddr) | 243 | void __user *useraddr) |
250 | { | 244 | { |
251 | struct ethtool_sset_info info; | 245 | struct ethtool_sset_info info; |
@@ -305,10 +299,7 @@ out: | |||
305 | return ret; | 299 | return ret; |
306 | } | 300 | } |
307 | 301 | ||
308 | /* | 302 | static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev, void __user *useraddr) |
309 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
310 | */ | ||
311 | static noinline int ethtool_set_rxnfc(struct net_device *dev, void __user *useraddr) | ||
312 | { | 303 | { |
313 | struct ethtool_rxnfc cmd; | 304 | struct ethtool_rxnfc cmd; |
314 | 305 | ||
@@ -321,10 +312,7 @@ static noinline int ethtool_set_rxnfc(struct net_device *dev, void __user *usera | |||
321 | return dev->ethtool_ops->set_rxnfc(dev, &cmd); | 312 | return dev->ethtool_ops->set_rxnfc(dev, &cmd); |
322 | } | 313 | } |
323 | 314 | ||
324 | /* | 315 | static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev, void __user *useraddr) |
325 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
326 | */ | ||
327 | static noinline int ethtool_get_rxnfc(struct net_device *dev, void __user *useraddr) | ||
328 | { | 316 | { |
329 | struct ethtool_rxnfc info; | 317 | struct ethtool_rxnfc info; |
330 | const struct ethtool_ops *ops = dev->ethtool_ops; | 318 | const struct ethtool_ops *ops = dev->ethtool_ops; |
@@ -396,10 +384,7 @@ static void __rx_ntuple_filter_add(struct ethtool_rx_ntuple_list *list, | |||
396 | list->count++; | 384 | list->count++; |
397 | } | 385 | } |
398 | 386 | ||
399 | /* | 387 | static noinline_for_stack int ethtool_set_rx_ntuple(struct net_device *dev, void __user *useraddr) |
400 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
401 | */ | ||
402 | static noinline int ethtool_set_rx_ntuple(struct net_device *dev, void __user *useraddr) | ||
403 | { | 388 | { |
404 | struct ethtool_rx_ntuple cmd; | 389 | struct ethtool_rx_ntuple cmd; |
405 | const struct ethtool_ops *ops = dev->ethtool_ops; | 390 | const struct ethtool_ops *ops = dev->ethtool_ops; |
@@ -867,10 +852,7 @@ static int ethtool_set_eeprom(struct net_device *dev, void __user *useraddr) | |||
867 | return ret; | 852 | return ret; |
868 | } | 853 | } |
869 | 854 | ||
870 | /* | 855 | static noinline_for_stack int ethtool_get_coalesce(struct net_device *dev, void __user *useraddr) |
871 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
872 | */ | ||
873 | static noinline int ethtool_get_coalesce(struct net_device *dev, void __user *useraddr) | ||
874 | { | 856 | { |
875 | struct ethtool_coalesce coalesce = { .cmd = ETHTOOL_GCOALESCE }; | 857 | struct ethtool_coalesce coalesce = { .cmd = ETHTOOL_GCOALESCE }; |
876 | 858 | ||
@@ -884,10 +866,7 @@ static noinline int ethtool_get_coalesce(struct net_device *dev, void __user *us | |||
884 | return 0; | 866 | return 0; |
885 | } | 867 | } |
886 | 868 | ||
887 | /* | 869 | static noinline_for_stack int ethtool_set_coalesce(struct net_device *dev, void __user *useraddr) |
888 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
889 | */ | ||
890 | static noinline int ethtool_set_coalesce(struct net_device *dev, void __user *useraddr) | ||
891 | { | 870 | { |
892 | struct ethtool_coalesce coalesce; | 871 | struct ethtool_coalesce coalesce; |
893 | 872 | ||
@@ -1297,10 +1276,7 @@ static int ethtool_set_value(struct net_device *dev, char __user *useraddr, | |||
1297 | return actor(dev, edata.data); | 1276 | return actor(dev, edata.data); |
1298 | } | 1277 | } |
1299 | 1278 | ||
1300 | /* | 1279 | static noinline_for_stack int ethtool_flash_device(struct net_device *dev, char __user *useraddr) |
1301 | * noinline attribute so that gcc doesnt use too much stack in dev_ethtool() | ||
1302 | */ | ||
1303 | static noinline int ethtool_flash_device(struct net_device *dev, char __user *useraddr) | ||
1304 | { | 1280 | { |
1305 | struct ethtool_flash efl; | 1281 | struct ethtool_flash efl; |
1306 | 1282 | ||