diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:10 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:10 -0400 |
commit | e8e91f6b4dc1179a70b0d21241b769c0ebfaa129 (patch) | |
tree | 81b957526d8a2af444073a4d76c91c2ee4aeaeae /drivers/infiniband/hw/ehca/ehca_main.c | |
parent | 1a855fbfb65e0b7b5cce00d7c6a61185ed765edf (diff) |
IB/ehca: Make symbols used only in a single source file static
Allow the compiler to optimize better and generate smaller code:
add/remove: 0/6 grow/shrink: 2/0 up/down: 1528/-1864 (-336)
function old new delta
.ehca_set_pagebuf 1344 2172 +828
.ehca_probe 2312 3012 +700
ehca_set_pagebuf_phys 24 - -24
ehca_set_pagebuf_fmr 24 - -24
ehca_init_device 24 - -24
.ehca_set_pagebuf_fmr 480 - -480
.ehca_set_pagebuf_phys 512 - -512
.ehca_init_device 800 - -800
Also this fixes warnings like:
drivers/infiniband/hw/ehca/ehca_mrmw.c:2015:5: warning: symbol 'ehca_set_pagebuf_fmr' was not declared. Should it be static?
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_main.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_main.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index a86ebcc79a95..65b3362cdb9b 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -57,16 +57,17 @@ MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>"); | |||
57 | MODULE_DESCRIPTION("IBM eServer HCA InfiniBand Device Driver"); | 57 | MODULE_DESCRIPTION("IBM eServer HCA InfiniBand Device Driver"); |
58 | MODULE_VERSION(HCAD_VERSION); | 58 | MODULE_VERSION(HCAD_VERSION); |
59 | 59 | ||
60 | int ehca_open_aqp1 = 0; | 60 | static int ehca_open_aqp1 = 0; |
61 | static int ehca_hw_level = 0; | ||
62 | static int ehca_poll_all_eqs = 1; | ||
63 | static int ehca_mr_largepage = 1; | ||
64 | |||
61 | int ehca_debug_level = 0; | 65 | int ehca_debug_level = 0; |
62 | int ehca_hw_level = 0; | ||
63 | int ehca_nr_ports = 2; | 66 | int ehca_nr_ports = 2; |
64 | int ehca_use_hp_mr = 0; | 67 | int ehca_use_hp_mr = 0; |
65 | int ehca_port_act_time = 30; | 68 | int ehca_port_act_time = 30; |
66 | int ehca_poll_all_eqs = 1; | ||
67 | int ehca_static_rate = -1; | 69 | int ehca_static_rate = -1; |
68 | int ehca_scaling_code = 0; | 70 | int ehca_scaling_code = 0; |
69 | int ehca_mr_largepage = 1; | ||
70 | int ehca_lock_hcalls = -1; | 71 | int ehca_lock_hcalls = -1; |
71 | 72 | ||
72 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); | 73 | module_param_named(open_aqp1, ehca_open_aqp1, int, S_IRUGO); |
@@ -396,7 +397,7 @@ init_node_guid1: | |||
396 | return ret; | 397 | return ret; |
397 | } | 398 | } |
398 | 399 | ||
399 | int ehca_init_device(struct ehca_shca *shca) | 400 | static int ehca_init_device(struct ehca_shca *shca) |
400 | { | 401 | { |
401 | int ret; | 402 | int ret; |
402 | 403 | ||
@@ -579,8 +580,8 @@ static ssize_t ehca_store_debug_level(struct device_driver *ddp, | |||
579 | return 1; | 580 | return 1; |
580 | } | 581 | } |
581 | 582 | ||
582 | DRIVER_ATTR(debug_level, S_IRUSR | S_IWUSR, | 583 | static DRIVER_ATTR(debug_level, S_IRUSR | S_IWUSR, |
583 | ehca_show_debug_level, ehca_store_debug_level); | 584 | ehca_show_debug_level, ehca_store_debug_level); |
584 | 585 | ||
585 | static struct attribute *ehca_drv_attrs[] = { | 586 | static struct attribute *ehca_drv_attrs[] = { |
586 | &driver_attr_debug_level.attr, | 587 | &driver_attr_debug_level.attr, |
@@ -941,7 +942,7 @@ void ehca_poll_eqs(unsigned long data) | |||
941 | spin_unlock(&shca_list_lock); | 942 | spin_unlock(&shca_list_lock); |
942 | } | 943 | } |
943 | 944 | ||
944 | int __init ehca_module_init(void) | 945 | static int __init ehca_module_init(void) |
945 | { | 946 | { |
946 | int ret; | 947 | int ret; |
947 | 948 | ||
@@ -988,7 +989,7 @@ module_init1: | |||
988 | return ret; | 989 | return ret; |
989 | }; | 990 | }; |
990 | 991 | ||
991 | void __exit ehca_module_exit(void) | 992 | static void __exit ehca_module_exit(void) |
992 | { | 993 | { |
993 | if (ehca_poll_all_eqs == 1) | 994 | if (ehca_poll_all_eqs == 1) |
994 | del_timer_sync(&poll_eqs_timer); | 995 | del_timer_sync(&poll_eqs_timer); |