aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/ehea
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>2012-01-13 03:06:32 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-17 10:04:43 -0500
commit1886e5d2c694e7fb59434c717e704e7fd8475d2e (patch)
tree1b2bde28f644bc2178b0eb0d842cc3d40e812a3a /drivers/net/ethernet/ibm/ehea
parentbe94db9ddac0d6ea76f479b04fb3a43314654c9f (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.c2
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_main.c32
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_qmr.c14
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
266const struct ethtool_ops ehea_ethtool_ops = { 266static 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;
94static LIST_HEAD(adapter_list); 94static LIST_HEAD(adapter_list);
95static unsigned long ehea_driver_flags; 95static unsigned long ehea_driver_flags;
96static DEFINE_MUTEX(dlpar_mem_lock); 96static DEFINE_MUTEX(dlpar_mem_lock);
97struct ehea_fw_handle_array ehea_fw_handles; 97static struct ehea_fw_handle_array ehea_fw_handles;
98struct ehea_bcmc_reg_array ehea_bcmc_regs; 98static struct ehea_bcmc_reg_array ehea_bcmc_regs;
99 99
100 100
101static int __devinit ehea_probe_adapter(struct platform_device *dev, 101static 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
136void ehea_schedule_port_reset(struct ehea_port *port) 136static 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
1407int ehea_gen_smrs(struct ehea_port_res *pr) 1407static 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
1429int ehea_rem_smrs(struct ehea_port_res *pr) 1429static 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
2193int ehea_activate_qp(struct ehea_adapter *adapter, struct ehea_qp *qp) 2193static 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
2534int ehea_stop_qps(struct net_device *dev) 2534static 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
2603void ehea_update_rqs(struct ehea_qp *orig_qp, struct ehea_port_res *pr) 2603static 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
2636int ehea_restart_qps(struct net_device *dev) 2636static 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
2827int ehea_sense_adapter_attr(struct ehea_adapter *adapter) 2827static 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
2855int ehea_get_jumboframe_status(struct ehea_port *port, int *jumbo) 2855static 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
2969struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter, 2969static 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,
3237static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); 3237static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port);
3238static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); 3238static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port);
3239 3239
3240int ehea_create_device_sysfs(struct platform_device *dev) 3240static 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
3251void ehea_remove_device_sysfs(struct platform_device *dev) 3251static 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
3382void ehea_crash_handler(void) 3382static 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,
3491static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH, 3491static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH,
3492 ehea_show_capabilities, NULL); 3492 ehea_show_capabilities, NULL);
3493 3493
3494int __init ehea_module_init(void) 3494static 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
37struct ehea_bmap *ehea_bmap = NULL; 37static struct ehea_bmap *ehea_bmap;
38
39
40 38
41static void *hw_qpageit_get_inc(struct hw_queue *queue) 39static 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
215u64 ehea_destroy_cq_res(struct ehea_cq *cq, u64 force) 213static 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
340u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force) 338static 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 */
384int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue, 382static 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
519u64 ehea_destroy_qp_res(struct ehea_qp *qp, u64 force) 517static 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
979void print_error_data(u64 *data) 977static 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]);