diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-04-26 03:35:16 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-06 10:33:16 -0400 |
commit | 4797547778fd51e6ee929c5dd67ab3807898eb82 (patch) | |
tree | d24af8ee2d5b4b7a819a31d443b7c02ba9b4d92b /drivers/scsi | |
parent | 15061f23a134e1e92f430a1aeb37a73e4af2a2a9 (diff) |
[SCSI] qla4xxx: possible cleanups
- make needlessly global code static
- #if 0 unused functions
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_dbg.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_glbl.h | 9 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_init.c | 18 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_iocb.c | 18 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_mbx.c | 19 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 9 |
6 files changed, 40 insertions, 37 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_dbg.c b/drivers/scsi/qla4xxx/ql4_dbg.c index 7b4e077a39c1..6437d024b0dd 100644 --- a/drivers/scsi/qla4xxx/ql4_dbg.c +++ b/drivers/scsi/qla4xxx/ql4_dbg.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include "ql4_def.h" | 8 | #include "ql4_def.h" |
9 | #include <scsi/scsi_dbg.h> | 9 | #include <scsi/scsi_dbg.h> |
10 | 10 | ||
11 | #if 0 | ||
12 | |||
11 | static void qla4xxx_print_srb_info(struct srb * srb) | 13 | static void qla4xxx_print_srb_info(struct srb * srb) |
12 | { | 14 | { |
13 | printk("%s: srb = 0x%p, flags=0x%02x\n", __func__, srb, srb->flags); | 15 | printk("%s: srb = 0x%p, flags=0x%02x\n", __func__, srb, srb->flags); |
@@ -195,3 +197,5 @@ void qla4xxx_dump_buffer(void *b, uint32_t size) | |||
195 | if (cnt % 16) | 197 | if (cnt % 16) |
196 | printk(KERN_DEBUG "\n"); | 198 | printk(KERN_DEBUG "\n"); |
197 | } | 199 | } |
200 | |||
201 | #endif /* 0 */ | ||
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h index e021eb5db2b2..5b00cb04e7c0 100644 --- a/drivers/scsi/qla4xxx/ql4_glbl.h +++ b/drivers/scsi/qla4xxx/ql4_glbl.h | |||
@@ -43,8 +43,6 @@ int qla4xxx_get_fwddb_entry(struct scsi_qla_host *ha, | |||
43 | uint16_t *tcp_source_port_num, | 43 | uint16_t *tcp_source_port_num, |
44 | uint16_t *connection_id); | 44 | uint16_t *connection_id); |
45 | 45 | ||
46 | struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host * ha, | ||
47 | uint32_t fw_ddb_index); | ||
48 | int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, | 46 | int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, |
49 | dma_addr_t fw_ddb_entry_dma); | 47 | dma_addr_t fw_ddb_entry_dma); |
50 | 48 | ||
@@ -55,18 +53,11 @@ void qla4xxx_get_crash_record(struct scsi_qla_host * ha); | |||
55 | struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha); | 53 | struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha); |
56 | int qla4xxx_add_sess(struct ddb_entry *); | 54 | int qla4xxx_add_sess(struct ddb_entry *); |
57 | void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry); | 55 | void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry); |
58 | int qla4xxx_conn_close_sess_logout(struct scsi_qla_host * ha, | ||
59 | uint16_t fw_ddb_index, | ||
60 | uint16_t connection_id, | ||
61 | uint16_t option); | ||
62 | int qla4xxx_clear_database_entry(struct scsi_qla_host * ha, | ||
63 | uint16_t fw_ddb_index); | ||
64 | int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha); | 56 | int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha); |
65 | int qla4xxx_get_fw_version(struct scsi_qla_host * ha); | 57 | int qla4xxx_get_fw_version(struct scsi_qla_host * ha); |
66 | void qla4xxx_interrupt_service_routine(struct scsi_qla_host * ha, | 58 | void qla4xxx_interrupt_service_routine(struct scsi_qla_host * ha, |
67 | uint32_t intr_status); | 59 | uint32_t intr_status); |
68 | int qla4xxx_init_rings(struct scsi_qla_host * ha); | 60 | int qla4xxx_init_rings(struct scsi_qla_host * ha); |
69 | void qla4xxx_dump_buffer(void *b, uint32_t size); | ||
70 | struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, uint32_t index); | 61 | struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, uint32_t index); |
71 | void qla4xxx_srb_compl(struct scsi_qla_host *ha, struct srb *srb); | 62 | void qla4xxx_srb_compl(struct scsi_qla_host *ha, struct srb *srb); |
72 | int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha); | 63 | int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha); |
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index b907b06d72ab..6365df268612 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c | |||
@@ -7,9 +7,8 @@ | |||
7 | 7 | ||
8 | #include "ql4_def.h" | 8 | #include "ql4_def.h" |
9 | 9 | ||
10 | /* | 10 | static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha, |
11 | * QLogic ISP4xxx Hardware Support Function Prototypes. | 11 | uint32_t fw_ddb_index); |
12 | */ | ||
13 | 12 | ||
14 | static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) | 13 | static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) |
15 | { | 14 | { |
@@ -48,7 +47,8 @@ static void ql4xxx_set_mac_number(struct scsi_qla_host *ha) | |||
48 | * This routine deallocates and unlinks the specified ddb_entry from the | 47 | * This routine deallocates and unlinks the specified ddb_entry from the |
49 | * adapter's | 48 | * adapter's |
50 | **/ | 49 | **/ |
51 | void qla4xxx_free_ddb(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry) | 50 | static void qla4xxx_free_ddb(struct scsi_qla_host *ha, |
51 | struct ddb_entry *ddb_entry) | ||
52 | { | 52 | { |
53 | /* Remove device entry from list */ | 53 | /* Remove device entry from list */ |
54 | list_del_init(&ddb_entry->list); | 54 | list_del_init(&ddb_entry->list); |
@@ -370,9 +370,9 @@ static struct ddb_entry* qla4xxx_get_ddb_entry(struct scsi_qla_host *ha, | |||
370 | * must be initialized prior to calling this routine | 370 | * must be initialized prior to calling this routine |
371 | * | 371 | * |
372 | **/ | 372 | **/ |
373 | int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha, | 373 | static int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha, |
374 | struct ddb_entry *ddb_entry, | 374 | struct ddb_entry *ddb_entry, |
375 | uint32_t fw_ddb_index) | 375 | uint32_t fw_ddb_index) |
376 | { | 376 | { |
377 | struct dev_db_entry *fw_ddb_entry = NULL; | 377 | struct dev_db_entry *fw_ddb_entry = NULL; |
378 | dma_addr_t fw_ddb_entry_dma; | 378 | dma_addr_t fw_ddb_entry_dma; |
@@ -450,8 +450,8 @@ int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha, | |||
450 | * This routine allocates a ddb_entry, ititializes some values, and | 450 | * This routine allocates a ddb_entry, ititializes some values, and |
451 | * inserts it into the ddb list. | 451 | * inserts it into the ddb list. |
452 | **/ | 452 | **/ |
453 | struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha, | 453 | static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha, |
454 | uint32_t fw_ddb_index) | 454 | uint32_t fw_ddb_index) |
455 | { | 455 | { |
456 | struct ddb_entry *ddb_entry; | 456 | struct ddb_entry *ddb_entry; |
457 | 457 | ||
diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c index d41ce380eedc..a216a1781afb 100644 --- a/drivers/scsi/qla4xxx/ql4_iocb.c +++ b/drivers/scsi/qla4xxx/ql4_iocb.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * - advances the request_in pointer | 19 | * - advances the request_in pointer |
20 | * - checks for queue full | 20 | * - checks for queue full |
21 | **/ | 21 | **/ |
22 | int qla4xxx_get_req_pkt(struct scsi_qla_host *ha, | 22 | static int qla4xxx_get_req_pkt(struct scsi_qla_host *ha, |
23 | struct queue_entry **queue_entry) | 23 | struct queue_entry **queue_entry) |
24 | { | 24 | { |
25 | uint16_t request_in; | 25 | uint16_t request_in; |
26 | uint8_t status = QLA_SUCCESS; | 26 | uint8_t status = QLA_SUCCESS; |
@@ -62,8 +62,8 @@ int qla4xxx_get_req_pkt(struct scsi_qla_host *ha, | |||
62 | * | 62 | * |
63 | * This routine issues a marker IOCB. | 63 | * This routine issues a marker IOCB. |
64 | **/ | 64 | **/ |
65 | int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, | 65 | static int qla4xxx_send_marker_iocb(struct scsi_qla_host *ha, |
66 | struct ddb_entry *ddb_entry, int lun) | 66 | struct ddb_entry *ddb_entry, int lun) |
67 | { | 67 | { |
68 | struct marker_entry *marker_entry; | 68 | struct marker_entry *marker_entry; |
69 | unsigned long flags = 0; | 69 | unsigned long flags = 0; |
@@ -96,7 +96,7 @@ exit_send_marker: | |||
96 | return status; | 96 | return status; |
97 | } | 97 | } |
98 | 98 | ||
99 | struct continuation_t1_entry* qla4xxx_alloc_cont_entry( | 99 | static struct continuation_t1_entry* qla4xxx_alloc_cont_entry( |
100 | struct scsi_qla_host *ha) | 100 | struct scsi_qla_host *ha) |
101 | { | 101 | { |
102 | struct continuation_t1_entry *cont_entry; | 102 | struct continuation_t1_entry *cont_entry; |
@@ -120,7 +120,7 @@ struct continuation_t1_entry* qla4xxx_alloc_cont_entry( | |||
120 | return cont_entry; | 120 | return cont_entry; |
121 | } | 121 | } |
122 | 122 | ||
123 | uint16_t qla4xxx_calc_request_entries(uint16_t dsds) | 123 | static uint16_t qla4xxx_calc_request_entries(uint16_t dsds) |
124 | { | 124 | { |
125 | uint16_t iocbs; | 125 | uint16_t iocbs; |
126 | 126 | ||
@@ -133,9 +133,9 @@ uint16_t qla4xxx_calc_request_entries(uint16_t dsds) | |||
133 | return iocbs; | 133 | return iocbs; |
134 | } | 134 | } |
135 | 135 | ||
136 | void qla4xxx_build_scsi_iocbs(struct srb *srb, | 136 | static void qla4xxx_build_scsi_iocbs(struct srb *srb, |
137 | struct command_t3_entry *cmd_entry, | 137 | struct command_t3_entry *cmd_entry, |
138 | uint16_t tot_dsds) | 138 | uint16_t tot_dsds) |
139 | { | 139 | { |
140 | struct scsi_qla_host *ha; | 140 | struct scsi_qla_host *ha; |
141 | uint16_t avail_dsds; | 141 | uint16_t avail_dsds; |
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index 7f28657eef3f..f116ff917237 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c | |||
@@ -20,9 +20,9 @@ | |||
20 | * If outCount is 0, this routine completes successfully WITHOUT waiting | 20 | * If outCount is 0, this routine completes successfully WITHOUT waiting |
21 | * for the mailbox command to complete. | 21 | * for the mailbox command to complete. |
22 | **/ | 22 | **/ |
23 | int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount, | 23 | static int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount, |
24 | uint8_t outCount, uint32_t *mbx_cmd, | 24 | uint8_t outCount, uint32_t *mbx_cmd, |
25 | uint32_t *mbx_sts) | 25 | uint32_t *mbx_sts) |
26 | { | 26 | { |
27 | int status = QLA_ERROR; | 27 | int status = QLA_ERROR; |
28 | uint8_t i; | 28 | uint8_t i; |
@@ -170,6 +170,8 @@ mbox_exit: | |||
170 | } | 170 | } |
171 | 171 | ||
172 | 172 | ||
173 | #if 0 | ||
174 | |||
173 | /** | 175 | /** |
174 | * qla4xxx_issue_iocb - issue mailbox iocb command | 176 | * qla4xxx_issue_iocb - issue mailbox iocb command |
175 | * @ha: adapter state pointer. | 177 | * @ha: adapter state pointer. |
@@ -243,6 +245,8 @@ int qla4xxx_clear_database_entry(struct scsi_qla_host * ha, | |||
243 | return QLA_SUCCESS; | 245 | return QLA_SUCCESS; |
244 | } | 246 | } |
245 | 247 | ||
248 | #endif /* 0 */ | ||
249 | |||
246 | /** | 250 | /** |
247 | * qla4xxx_initialize_fw_cb - initializes firmware control block. | 251 | * qla4xxx_initialize_fw_cb - initializes firmware control block. |
248 | * @ha: Pointer to host adapter structure. | 252 | * @ha: Pointer to host adapter structure. |
@@ -570,6 +574,7 @@ int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index, | |||
570 | return qla4xxx_mailbox_command(ha, 4, 1, &mbox_cmd[0], &mbox_sts[0]); | 574 | return qla4xxx_mailbox_command(ha, 4, 1, &mbox_cmd[0], &mbox_sts[0]); |
571 | } | 575 | } |
572 | 576 | ||
577 | #if 0 | ||
573 | int qla4xxx_conn_open_session_login(struct scsi_qla_host * ha, | 578 | int qla4xxx_conn_open_session_login(struct scsi_qla_host * ha, |
574 | uint16_t fw_ddb_index) | 579 | uint16_t fw_ddb_index) |
575 | { | 580 | { |
@@ -594,6 +599,7 @@ int qla4xxx_conn_open_session_login(struct scsi_qla_host * ha, | |||
594 | 599 | ||
595 | return status; | 600 | return status; |
596 | } | 601 | } |
602 | #endif /* 0 */ | ||
597 | 603 | ||
598 | /** | 604 | /** |
599 | * qla4xxx_get_crash_record - retrieves crash record. | 605 | * qla4xxx_get_crash_record - retrieves crash record. |
@@ -649,6 +655,7 @@ exit_get_crash_record: | |||
649 | crash_record, crash_record_dma); | 655 | crash_record, crash_record_dma); |
650 | } | 656 | } |
651 | 657 | ||
658 | #if 0 | ||
652 | /** | 659 | /** |
653 | * qla4xxx_get_conn_event_log - retrieves connection event log | 660 | * qla4xxx_get_conn_event_log - retrieves connection event log |
654 | * @ha: Pointer to host adapter structure. | 661 | * @ha: Pointer to host adapter structure. |
@@ -738,6 +745,7 @@ exit_get_event_log: | |||
738 | dma_free_coherent(&ha->pdev->dev, event_log_size, event_log, | 745 | dma_free_coherent(&ha->pdev->dev, event_log_size, event_log, |
739 | event_log_dma); | 746 | event_log_dma); |
740 | } | 747 | } |
748 | #endif /* 0 */ | ||
741 | 749 | ||
742 | /** | 750 | /** |
743 | * qla4xxx_reset_lun - issues LUN Reset | 751 | * qla4xxx_reset_lun - issues LUN Reset |
@@ -834,7 +842,8 @@ int qla4xxx_get_fw_version(struct scsi_qla_host * ha) | |||
834 | return QLA_SUCCESS; | 842 | return QLA_SUCCESS; |
835 | } | 843 | } |
836 | 844 | ||
837 | int qla4xxx_get_default_ddb(struct scsi_qla_host *ha, dma_addr_t dma_addr) | 845 | static int qla4xxx_get_default_ddb(struct scsi_qla_host *ha, |
846 | dma_addr_t dma_addr) | ||
838 | { | 847 | { |
839 | uint32_t mbox_cmd[MBOX_REG_COUNT]; | 848 | uint32_t mbox_cmd[MBOX_REG_COUNT]; |
840 | uint32_t mbox_sts[MBOX_REG_COUNT]; | 849 | uint32_t mbox_sts[MBOX_REG_COUNT]; |
@@ -855,7 +864,7 @@ int qla4xxx_get_default_ddb(struct scsi_qla_host *ha, dma_addr_t dma_addr) | |||
855 | return QLA_SUCCESS; | 864 | return QLA_SUCCESS; |
856 | } | 865 | } |
857 | 866 | ||
858 | int qla4xxx_req_ddb_entry(struct scsi_qla_host *ha, uint32_t *ddb_index) | 867 | static int qla4xxx_req_ddb_entry(struct scsi_qla_host *ha, uint32_t *ddb_index) |
859 | { | 868 | { |
860 | uint32_t mbox_cmd[MBOX_REG_COUNT]; | 869 | uint32_t mbox_cmd[MBOX_REG_COUNT]; |
861 | uint32_t mbox_sts[MBOX_REG_COUNT]; | 870 | uint32_t mbox_sts[MBOX_REG_COUNT]; |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 0bfddf893ed0..da21f5fbbf87 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -14,7 +14,7 @@ | |||
14 | /* | 14 | /* |
15 | * Driver version | 15 | * Driver version |
16 | */ | 16 | */ |
17 | char qla4xxx_version_str[40]; | 17 | static char qla4xxx_version_str[40]; |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * SRB allocation cache | 20 | * SRB allocation cache |
@@ -45,8 +45,7 @@ int ql4_mod_unload = 0; | |||
45 | /* | 45 | /* |
46 | * SCSI host template entry points | 46 | * SCSI host template entry points |
47 | */ | 47 | */ |
48 | 48 | static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha); | |
49 | void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha); | ||
50 | 49 | ||
51 | /* | 50 | /* |
52 | * iSCSI template entry points | 51 | * iSCSI template entry points |
@@ -1352,7 +1351,7 @@ static void __devexit qla4xxx_remove_adapter(struct pci_dev *pdev) | |||
1352 | * At exit, the @ha's flags.enable_64bit_addressing set to indicated | 1351 | * At exit, the @ha's flags.enable_64bit_addressing set to indicated |
1353 | * supported addressing method. | 1352 | * supported addressing method. |
1354 | */ | 1353 | */ |
1355 | void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha) | 1354 | static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha) |
1356 | { | 1355 | { |
1357 | int retval; | 1356 | int retval; |
1358 | 1357 | ||
@@ -1627,7 +1626,7 @@ static struct pci_device_id qla4xxx_pci_tbl[] = { | |||
1627 | }; | 1626 | }; |
1628 | MODULE_DEVICE_TABLE(pci, qla4xxx_pci_tbl); | 1627 | MODULE_DEVICE_TABLE(pci, qla4xxx_pci_tbl); |
1629 | 1628 | ||
1630 | struct pci_driver qla4xxx_pci_driver = { | 1629 | static struct pci_driver qla4xxx_pci_driver = { |
1631 | .name = DRIVER_NAME, | 1630 | .name = DRIVER_NAME, |
1632 | .id_table = qla4xxx_pci_tbl, | 1631 | .id_table = qla4xxx_pci_tbl, |
1633 | .probe = qla4xxx_probe_adapter, | 1632 | .probe = qla4xxx_probe_adapter, |