diff options
author | Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> | 2012-01-13 03:06:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-17 10:04:43 -0500 |
commit | 1886e5d2c694e7fb59434c717e704e7fd8475d2e (patch) | |
tree | 1b2bde28f644bc2178b0eb0d842cc3d40e812a3a /drivers/net/ethernet/ibm/ehea | |
parent | be94db9ddac0d6ea76f479b04fb3a43314654c9f (diff) |
ehea: make some functions and variables static
Some functions and variables in ehea are only used in their own file, so
they should be static. One particular function had a very generic name,
print_error_data.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/ehea')
-rw-r--r-- | drivers/net/ethernet/ibm/ehea/ehea_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/ibm/ehea/ehea_main.c | 32 | ||||
-rw-r--r-- | drivers/net/ethernet/ibm/ehea/ehea_qmr.c | 14 |
3 files changed, 23 insertions, 25 deletions
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c b/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c index 05b7359bde8d..6bdd8e36e564 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c | |||
@@ -263,7 +263,7 @@ static void ehea_get_ethtool_stats(struct net_device *dev, | |||
263 | data[i++] = atomic_read(&port->port_res[k].swqe_avail); | 263 | data[i++] = atomic_read(&port->port_res[k].swqe_avail); |
264 | } | 264 | } |
265 | 265 | ||
266 | const struct ethtool_ops ehea_ethtool_ops = { | 266 | static const struct ethtool_ops ehea_ethtool_ops = { |
267 | .get_settings = ehea_get_settings, | 267 | .get_settings = ehea_get_settings, |
268 | .get_drvinfo = ehea_get_drvinfo, | 268 | .get_drvinfo = ehea_get_drvinfo, |
269 | .get_msglevel = ehea_get_msglevel, | 269 | .get_msglevel = ehea_get_msglevel, |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 3554414eb5e2..5d5fb2627184 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c | |||
@@ -94,8 +94,8 @@ static int port_name_cnt; | |||
94 | static LIST_HEAD(adapter_list); | 94 | static LIST_HEAD(adapter_list); |
95 | static unsigned long ehea_driver_flags; | 95 | static unsigned long ehea_driver_flags; |
96 | static DEFINE_MUTEX(dlpar_mem_lock); | 96 | static DEFINE_MUTEX(dlpar_mem_lock); |
97 | struct ehea_fw_handle_array ehea_fw_handles; | 97 | static struct ehea_fw_handle_array ehea_fw_handles; |
98 | struct ehea_bcmc_reg_array ehea_bcmc_regs; | 98 | static struct ehea_bcmc_reg_array ehea_bcmc_regs; |
99 | 99 | ||
100 | 100 | ||
101 | static int __devinit ehea_probe_adapter(struct platform_device *dev, | 101 | static int __devinit ehea_probe_adapter(struct platform_device *dev, |
@@ -133,7 +133,7 @@ void ehea_dump(void *adr, int len, char *msg) | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | void ehea_schedule_port_reset(struct ehea_port *port) | 136 | static void ehea_schedule_port_reset(struct ehea_port *port) |
137 | { | 137 | { |
138 | if (!test_bit(__EHEA_DISABLE_PORT_RESET, &port->flags)) | 138 | if (!test_bit(__EHEA_DISABLE_PORT_RESET, &port->flags)) |
139 | schedule_work(&port->reset_task); | 139 | schedule_work(&port->reset_task); |
@@ -1404,7 +1404,7 @@ out: | |||
1404 | return ret; | 1404 | return ret; |
1405 | } | 1405 | } |
1406 | 1406 | ||
1407 | int ehea_gen_smrs(struct ehea_port_res *pr) | 1407 | static int ehea_gen_smrs(struct ehea_port_res *pr) |
1408 | { | 1408 | { |
1409 | int ret; | 1409 | int ret; |
1410 | struct ehea_adapter *adapter = pr->port->adapter; | 1410 | struct ehea_adapter *adapter = pr->port->adapter; |
@@ -1426,7 +1426,7 @@ out: | |||
1426 | return -EIO; | 1426 | return -EIO; |
1427 | } | 1427 | } |
1428 | 1428 | ||
1429 | int ehea_rem_smrs(struct ehea_port_res *pr) | 1429 | static int ehea_rem_smrs(struct ehea_port_res *pr) |
1430 | { | 1430 | { |
1431 | if ((ehea_rem_mr(&pr->send_mr)) || | 1431 | if ((ehea_rem_mr(&pr->send_mr)) || |
1432 | (ehea_rem_mr(&pr->recv_mr))) | 1432 | (ehea_rem_mr(&pr->recv_mr))) |
@@ -2190,7 +2190,7 @@ out: | |||
2190 | return err; | 2190 | return err; |
2191 | } | 2191 | } |
2192 | 2192 | ||
2193 | int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) | 2193 | static int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) |
2194 | { | 2194 | { |
2195 | int ret = -EIO; | 2195 | int ret = -EIO; |
2196 | u64 hret; | 2196 | u64 hret; |
@@ -2531,7 +2531,7 @@ static void ehea_flush_sq(struct ehea_port *port) | |||
2531 | } | 2531 | } |
2532 | } | 2532 | } |
2533 | 2533 | ||
2534 | int ehea_stop_qps(struct net_device *dev) | 2534 | static int ehea_stop_qps(struct net_device *dev) |
2535 | { | 2535 | { |
2536 | struct ehea_port *port = netdev_priv(dev); | 2536 | struct ehea_port *port = netdev_priv(dev); |
2537 | struct ehea_adapter *adapter = port->adapter; | 2537 | struct ehea_adapter *adapter = port->adapter; |
@@ -2600,7 +2600,7 @@ out: | |||
2600 | return ret; | 2600 | return ret; |
2601 | } | 2601 | } |
2602 | 2602 | ||
2603 | void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr) | 2603 | static void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr) |
2604 | { | 2604 | { |
2605 | struct ehea_qp qp = *orig_qp; | 2605 | struct ehea_qp qp = *orig_qp; |
2606 | struct ehea_qp_init_attr *init_attr = &qp.init_attr; | 2606 | struct ehea_qp_init_attr *init_attr = &qp.init_attr; |
@@ -2633,7 +2633,7 @@ void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr) | |||
2633 | } | 2633 | } |
2634 | } | 2634 | } |
2635 | 2635 | ||
2636 | int ehea_restart_qps(struct net_device *dev) | 2636 | static int ehea_restart_qps(struct net_device *dev) |
2637 | { | 2637 | { |
2638 | struct ehea_port *port = netdev_priv(dev); | 2638 | struct ehea_port *port = netdev_priv(dev); |
2639 | struct ehea_adapter *adapter = port->adapter; | 2639 | struct ehea_adapter *adapter = port->adapter; |
@@ -2824,7 +2824,7 @@ static void ehea_tx_watchdog(struct net_device *dev) | |||
2824 | ehea_schedule_port_reset(port); | 2824 | ehea_schedule_port_reset(port); |
2825 | } | 2825 | } |
2826 | 2826 | ||
2827 | int ehea_sense_adapter_attr(struct ehea_adapter *adapter) | 2827 | static int ehea_sense_adapter_attr(struct ehea_adapter *adapter) |
2828 | { | 2828 | { |
2829 | struct hcp_query_ehea *cb; | 2829 | struct hcp_query_ehea *cb; |
2830 | u64 hret; | 2830 | u64 hret; |
@@ -2852,7 +2852,7 @@ out: | |||
2852 | return ret; | 2852 | return ret; |
2853 | } | 2853 | } |
2854 | 2854 | ||
2855 | int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo) | 2855 | static int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo) |
2856 | { | 2856 | { |
2857 | struct hcp_ehea_port_cb4 *cb4; | 2857 | struct hcp_ehea_port_cb4 *cb4; |
2858 | u64 hret; | 2858 | u64 hret; |
@@ -2966,7 +2966,7 @@ static const struct net_device_ops ehea_netdev_ops = { | |||
2966 | .ndo_tx_timeout = ehea_tx_watchdog, | 2966 | .ndo_tx_timeout = ehea_tx_watchdog, |
2967 | }; | 2967 | }; |
2968 | 2968 | ||
2969 | struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, | 2969 | static struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, |
2970 | u32 logical_port_id, | 2970 | u32 logical_port_id, |
2971 | struct device_node *dn) | 2971 | struct device_node *dn) |
2972 | { | 2972 | { |
@@ -3237,7 +3237,7 @@ static ssize_t ehea_remove_port(struct device *dev, | |||
3237 | static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); | 3237 | static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); |
3238 | static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); | 3238 | static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); |
3239 | 3239 | ||
3240 | int ehea_create_device_sysfs(struct platform_device *dev) | 3240 | static int ehea_create_device_sysfs(struct platform_device *dev) |
3241 | { | 3241 | { |
3242 | int ret = device_create_file(&dev->dev, &dev_attr_probe_port); | 3242 | int ret = device_create_file(&dev->dev, &dev_attr_probe_port); |
3243 | if (ret) | 3243 | if (ret) |
@@ -3248,7 +3248,7 @@ out: | |||
3248 | return ret; | 3248 | return ret; |
3249 | } | 3249 | } |
3250 | 3250 | ||
3251 | void ehea_remove_device_sysfs(struct platform_device *dev) | 3251 | static void ehea_remove_device_sysfs(struct platform_device *dev) |
3252 | { | 3252 | { |
3253 | device_remove_file(&dev->dev, &dev_attr_probe_port); | 3253 | device_remove_file(&dev->dev, &dev_attr_probe_port); |
3254 | device_remove_file(&dev->dev, &dev_attr_remove_port); | 3254 | device_remove_file(&dev->dev, &dev_attr_remove_port); |
@@ -3379,7 +3379,7 @@ static int __devexit ehea_remove(struct platform_device *dev) | |||
3379 | return 0; | 3379 | return 0; |
3380 | } | 3380 | } |
3381 | 3381 | ||
3382 | void ehea_crash_handler(void) | 3382 | static void ehea_crash_handler(void) |
3383 | { | 3383 | { |
3384 | int i; | 3384 | int i; |
3385 | 3385 | ||
@@ -3491,7 +3491,7 @@ static ssize_t ehea_show_capabilities(struct device_driver *drv, | |||
3491 | static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH, | 3491 | static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH, |
3492 | ehea_show_capabilities, NULL); | 3492 | ehea_show_capabilities, NULL); |
3493 | 3493 | ||
3494 | int __init ehea_module_init(void) | 3494 | static int __init ehea_module_init(void) |
3495 | { | 3495 | { |
3496 | int ret; | 3496 | int ret; |
3497 | 3497 | ||
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c index 95b9f4fa811e..c25b05b94daa 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_qmr.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_qmr.c | |||
@@ -34,9 +34,7 @@ | |||
34 | #include "ehea_phyp.h" | 34 | #include "ehea_phyp.h" |
35 | #include "ehea_qmr.h" | 35 | #include "ehea_qmr.h" |
36 | 36 | ||
37 | struct ehea_bmap *ehea_bmap = NULL; | 37 | static struct ehea_bmap *ehea_bmap; |
38 | |||
39 | |||
40 | 38 | ||
41 | static void *hw_qpageit_get_inc(struct hw_queue *queue) | 39 | static void *hw_qpageit_get_inc(struct hw_queue *queue) |
42 | { | 40 | { |
@@ -212,7 +210,7 @@ out_nomem: | |||
212 | return NULL; | 210 | return NULL; |
213 | } | 211 | } |
214 | 212 | ||
215 | u64 ehea_destroy_cq_res(struct ehea_cq *cq, u64 force) | 213 | static u64 ehea_destroy_cq_res(struct ehea_cq *cq, u64 force) |
216 | { | 214 | { |
217 | u64 hret; | 215 | u64 hret; |
218 | u64 adapter_handle = cq->adapter->handle; | 216 | u64 adapter_handle = cq->adapter->handle; |
@@ -337,7 +335,7 @@ struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq) | |||
337 | return eqe; | 335 | return eqe; |
338 | } | 336 | } |
339 | 337 | ||
340 | u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force) | 338 | static u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force) |
341 | { | 339 | { |
342 | u64 hret; | 340 | u64 hret; |
343 | unsigned long flags; | 341 | unsigned long flags; |
@@ -381,7 +379,7 @@ int ehea_destroy_eq(struct ehea_eq *eq) | |||
381 | /** | 379 | /** |
382 | * allocates memory for a queue and registers pages in phyp | 380 | * allocates memory for a queue and registers pages in phyp |
383 | */ | 381 | */ |
384 | int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue, | 382 | static int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue, |
385 | int nr_pages, int wqe_size, int act_nr_sges, | 383 | int nr_pages, int wqe_size, int act_nr_sges, |
386 | struct ehea_adapter *adapter, int h_call_q_selector) | 384 | struct ehea_adapter *adapter, int h_call_q_selector) |
387 | { | 385 | { |
@@ -516,7 +514,7 @@ out_freemem: | |||
516 | return NULL; | 514 | return NULL; |
517 | } | 515 | } |
518 | 516 | ||
519 | u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force) | 517 | static u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force) |
520 | { | 518 | { |
521 | u64 hret; | 519 | u64 hret; |
522 | struct ehea_qp_init_attr *qp_attr = &qp->init_attr; | 520 | struct ehea_qp_init_attr *qp_attr = &qp->init_attr; |
@@ -976,7 +974,7 @@ int ehea_gen_smr(struct ehea_adapter *adapter, struct ehea_mr *old_mr, | |||
976 | return 0; | 974 | return 0; |
977 | } | 975 | } |
978 | 976 | ||
979 | void print_error_data(u64 *data) | 977 | static void print_error_data(u64 *data) |
980 | { | 978 | { |
981 | int length; | 979 | int length; |
982 | u64 type = EHEA_BMASK_GET(ERROR_DATA_TYPE, data[2]); | 980 | u64 type = EHEA_BMASK_GET(ERROR_DATA_TYPE, data[2]); |