diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-02-05 15:18:53 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-02-05 15:18:53 -0500 |
commit | 4d284cac76d0bfebc42d76b428c4e44d921200a9 (patch) | |
tree | e99d659aea9c747a3d5b4b4341f84a5cbead265b /drivers/s390/scsi | |
parent | 162e006ef59266b9ebf34e3d15ca1f3d9ee956d7 (diff) |
[S390] Avoid excessive inlining.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 25 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 38 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 2 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_qdio.c | 38 |
4 files changed, 51 insertions, 52 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 85093b71f9fa..39a885266790 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -47,13 +47,12 @@ static int __init zfcp_module_init(void); | |||
47 | static void zfcp_ns_gid_pn_handler(unsigned long); | 47 | static void zfcp_ns_gid_pn_handler(unsigned long); |
48 | 48 | ||
49 | /* miscellaneous */ | 49 | /* miscellaneous */ |
50 | static inline int zfcp_sg_list_alloc(struct zfcp_sg_list *, size_t); | 50 | static int zfcp_sg_list_alloc(struct zfcp_sg_list *, size_t); |
51 | static inline void zfcp_sg_list_free(struct zfcp_sg_list *); | 51 | static void zfcp_sg_list_free(struct zfcp_sg_list *); |
52 | static inline int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *, | 52 | static int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *, |
53 | void __user *, size_t); | 53 | void __user *, size_t); |
54 | static inline int zfcp_sg_list_copy_to_user(void __user *, | 54 | static int zfcp_sg_list_copy_to_user(void __user *, |
55 | struct zfcp_sg_list *, size_t); | 55 | struct zfcp_sg_list *, size_t); |
56 | |||
57 | static long zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long); | 56 | static long zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long); |
58 | 57 | ||
59 | #define ZFCP_CFDC_IOC_MAGIC 0xDD | 58 | #define ZFCP_CFDC_IOC_MAGIC 0xDD |
@@ -605,7 +604,7 @@ zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, | |||
605 | * elements of the scatter-gather list. The maximum size of a single element | 604 | * elements of the scatter-gather list. The maximum size of a single element |
606 | * in the scatter-gather list is PAGE_SIZE. | 605 | * in the scatter-gather list is PAGE_SIZE. |
607 | */ | 606 | */ |
608 | static inline int | 607 | static int |
609 | zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size) | 608 | zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size) |
610 | { | 609 | { |
611 | struct scatterlist *sg; | 610 | struct scatterlist *sg; |
@@ -652,7 +651,7 @@ zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size) | |||
652 | * Memory for each element in the scatter-gather list is freed. | 651 | * Memory for each element in the scatter-gather list is freed. |
653 | * Finally sg_list->sg is freed itself and sg_list->count is reset. | 652 | * Finally sg_list->sg is freed itself and sg_list->count is reset. |
654 | */ | 653 | */ |
655 | static inline void | 654 | static void |
656 | zfcp_sg_list_free(struct zfcp_sg_list *sg_list) | 655 | zfcp_sg_list_free(struct zfcp_sg_list *sg_list) |
657 | { | 656 | { |
658 | struct scatterlist *sg; | 657 | struct scatterlist *sg; |
@@ -697,7 +696,7 @@ zfcp_sg_size(struct scatterlist *sg, unsigned int sg_count) | |||
697 | * @size: number of bytes to be copied | 696 | * @size: number of bytes to be copied |
698 | * Return: 0 on success, -EFAULT if copy_from_user fails. | 697 | * Return: 0 on success, -EFAULT if copy_from_user fails. |
699 | */ | 698 | */ |
700 | static inline int | 699 | static int |
701 | zfcp_sg_list_copy_from_user(struct zfcp_sg_list *sg_list, | 700 | zfcp_sg_list_copy_from_user(struct zfcp_sg_list *sg_list, |
702 | void __user *user_buffer, | 701 | void __user *user_buffer, |
703 | size_t size) | 702 | size_t size) |
@@ -735,7 +734,7 @@ zfcp_sg_list_copy_from_user(struct zfcp_sg_list *sg_list, | |||
735 | * @size: number of bytes to be copied | 734 | * @size: number of bytes to be copied |
736 | * Return: 0 on success, -EFAULT if copy_to_user fails | 735 | * Return: 0 on success, -EFAULT if copy_to_user fails |
737 | */ | 736 | */ |
738 | static inline int | 737 | static int |
739 | zfcp_sg_list_copy_to_user(void __user *user_buffer, | 738 | zfcp_sg_list_copy_to_user(void __user *user_buffer, |
740 | struct zfcp_sg_list *sg_list, | 739 | struct zfcp_sg_list *sg_list, |
741 | size_t size) | 740 | size_t size) |
@@ -1799,7 +1798,7 @@ static const struct zfcp_rc_entry zfcp_p_rjt_rc[] = { | |||
1799 | * @code: reason code | 1798 | * @code: reason code |
1800 | * @rc_table: table of reason codes and descriptions | 1799 | * @rc_table: table of reason codes and descriptions |
1801 | */ | 1800 | */ |
1802 | static inline const char * | 1801 | static const char * |
1803 | zfcp_rc_description(u8 code, const struct zfcp_rc_entry *rc_table) | 1802 | zfcp_rc_description(u8 code, const struct zfcp_rc_entry *rc_table) |
1804 | { | 1803 | { |
1805 | const char *descr = "unknown reason code"; | 1804 | const char *descr = "unknown reason code"; |
@@ -1847,7 +1846,7 @@ zfcp_check_ct_response(struct ct_hdr *rjt) | |||
1847 | * @rjt_par: reject parameter acc. to FC-PH/FC-FS | 1846 | * @rjt_par: reject parameter acc. to FC-PH/FC-FS |
1848 | * @rc_table: table of reason codes and descriptions | 1847 | * @rc_table: table of reason codes and descriptions |
1849 | */ | 1848 | */ |
1850 | static inline void | 1849 | static void |
1851 | zfcp_print_els_rjt(struct zfcp_ls_rjt_par *rjt_par, | 1850 | zfcp_print_els_rjt(struct zfcp_ls_rjt_par *rjt_par, |
1852 | const struct zfcp_rc_entry *rc_table) | 1851 | const struct zfcp_rc_entry *rc_table) |
1853 | { | 1852 | { |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index fd33537d0b2b..d8191d115c14 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -31,7 +31,7 @@ MODULE_PARM_DESC(dbfsize, | |||
31 | 31 | ||
32 | #define ZFCP_LOG_AREA ZFCP_LOG_AREA_OTHER | 32 | #define ZFCP_LOG_AREA ZFCP_LOG_AREA_OTHER |
33 | 33 | ||
34 | static inline int | 34 | static int |
35 | zfcp_dbf_stck(char *out_buf, const char *label, unsigned long long stck) | 35 | zfcp_dbf_stck(char *out_buf, const char *label, unsigned long long stck) |
36 | { | 36 | { |
37 | unsigned long long sec; | 37 | unsigned long long sec; |
@@ -106,7 +106,7 @@ zfcp_dbf_view_dump(char *out_buf, const char *label, | |||
106 | return len; | 106 | return len; |
107 | } | 107 | } |
108 | 108 | ||
109 | static inline int | 109 | static int |
110 | zfcp_dbf_view_header(debug_info_t * id, struct debug_view *view, int area, | 110 | zfcp_dbf_view_header(debug_info_t * id, struct debug_view *view, int area, |
111 | debug_entry_t * entry, char *out_buf) | 111 | debug_entry_t * entry, char *out_buf) |
112 | { | 112 | { |
@@ -130,7 +130,7 @@ zfcp_dbf_view_header(debug_info_t * id, struct debug_view *view, int area, | |||
130 | return len; | 130 | return len; |
131 | } | 131 | } |
132 | 132 | ||
133 | inline void zfcp_hba_dbf_event_fsf_response(struct zfcp_fsf_req *fsf_req) | 133 | void zfcp_hba_dbf_event_fsf_response(struct zfcp_fsf_req *fsf_req) |
134 | { | 134 | { |
135 | struct zfcp_adapter *adapter = fsf_req->adapter; | 135 | struct zfcp_adapter *adapter = fsf_req->adapter; |
136 | struct fsf_qtcb *qtcb = fsf_req->qtcb; | 136 | struct fsf_qtcb *qtcb = fsf_req->qtcb; |
@@ -241,7 +241,7 @@ inline void zfcp_hba_dbf_event_fsf_response(struct zfcp_fsf_req *fsf_req) | |||
241 | spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags); | 241 | spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags); |
242 | } | 242 | } |
243 | 243 | ||
244 | inline void | 244 | void |
245 | zfcp_hba_dbf_event_fsf_unsol(const char *tag, struct zfcp_adapter *adapter, | 245 | zfcp_hba_dbf_event_fsf_unsol(const char *tag, struct zfcp_adapter *adapter, |
246 | struct fsf_status_read_buffer *status_buffer) | 246 | struct fsf_status_read_buffer *status_buffer) |
247 | { | 247 | { |
@@ -295,7 +295,7 @@ zfcp_hba_dbf_event_fsf_unsol(const char *tag, struct zfcp_adapter *adapter, | |||
295 | spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags); | 295 | spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags); |
296 | } | 296 | } |
297 | 297 | ||
298 | inline void | 298 | void |
299 | zfcp_hba_dbf_event_qdio(struct zfcp_adapter *adapter, unsigned int status, | 299 | zfcp_hba_dbf_event_qdio(struct zfcp_adapter *adapter, unsigned int status, |
300 | unsigned int qdio_error, unsigned int siga_error, | 300 | unsigned int qdio_error, unsigned int siga_error, |
301 | int sbal_index, int sbal_count) | 301 | int sbal_index, int sbal_count) |
@@ -316,7 +316,7 @@ zfcp_hba_dbf_event_qdio(struct zfcp_adapter *adapter, unsigned int status, | |||
316 | spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags); | 316 | spin_unlock_irqrestore(&adapter->hba_dbf_lock, flags); |
317 | } | 317 | } |
318 | 318 | ||
319 | static inline int | 319 | static int |
320 | zfcp_hba_dbf_view_response(char *out_buf, | 320 | zfcp_hba_dbf_view_response(char *out_buf, |
321 | struct zfcp_hba_dbf_record_response *rec) | 321 | struct zfcp_hba_dbf_record_response *rec) |
322 | { | 322 | { |
@@ -403,7 +403,7 @@ zfcp_hba_dbf_view_response(char *out_buf, | |||
403 | return len; | 403 | return len; |
404 | } | 404 | } |
405 | 405 | ||
406 | static inline int | 406 | static int |
407 | zfcp_hba_dbf_view_status(char *out_buf, struct zfcp_hba_dbf_record_status *rec) | 407 | zfcp_hba_dbf_view_status(char *out_buf, struct zfcp_hba_dbf_record_status *rec) |
408 | { | 408 | { |
409 | int len = 0; | 409 | int len = 0; |
@@ -424,7 +424,7 @@ zfcp_hba_dbf_view_status(char *out_buf, struct zfcp_hba_dbf_record_status *rec) | |||
424 | return len; | 424 | return len; |
425 | } | 425 | } |
426 | 426 | ||
427 | static inline int | 427 | static int |
428 | zfcp_hba_dbf_view_qdio(char *out_buf, struct zfcp_hba_dbf_record_qdio *rec) | 428 | zfcp_hba_dbf_view_qdio(char *out_buf, struct zfcp_hba_dbf_record_qdio *rec) |
429 | { | 429 | { |
430 | int len = 0; | 430 | int len = 0; |
@@ -478,7 +478,7 @@ static struct debug_view zfcp_hba_dbf_view = { | |||
478 | NULL | 478 | NULL |
479 | }; | 479 | }; |
480 | 480 | ||
481 | inline void | 481 | void |
482 | _zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req, | 482 | _zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req, |
483 | u32 s_id, u32 d_id, void *buffer, int buflen) | 483 | u32 s_id, u32 d_id, void *buffer, int buflen) |
484 | { | 484 | { |
@@ -519,7 +519,7 @@ _zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req, | |||
519 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 519 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
520 | } | 520 | } |
521 | 521 | ||
522 | inline void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | 522 | void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) |
523 | { | 523 | { |
524 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; | 524 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; |
525 | struct zfcp_port *port = ct->port; | 525 | struct zfcp_port *port = ct->port; |
@@ -531,7 +531,7 @@ inline void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | |||
531 | ct->req->length); | 531 | ct->req->length); |
532 | } | 532 | } |
533 | 533 | ||
534 | inline void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | 534 | void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) |
535 | { | 535 | { |
536 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; | 536 | struct zfcp_send_ct *ct = (struct zfcp_send_ct *)fsf_req->data; |
537 | struct zfcp_port *port = ct->port; | 537 | struct zfcp_port *port = ct->port; |
@@ -543,7 +543,7 @@ inline void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | |||
543 | ct->resp->length); | 543 | ct->resp->length); |
544 | } | 544 | } |
545 | 545 | ||
546 | static inline void | 546 | static void |
547 | _zfcp_san_dbf_event_common_els(const char *tag, int level, | 547 | _zfcp_san_dbf_event_common_els(const char *tag, int level, |
548 | struct zfcp_fsf_req *fsf_req, u32 s_id, | 548 | struct zfcp_fsf_req *fsf_req, u32 s_id, |
549 | u32 d_id, u8 ls_code, void *buffer, int buflen) | 549 | u32 d_id, u8 ls_code, void *buffer, int buflen) |
@@ -585,7 +585,7 @@ _zfcp_san_dbf_event_common_els(const char *tag, int level, | |||
585 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 585 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
586 | } | 586 | } |
587 | 587 | ||
588 | inline void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *fsf_req) | 588 | void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *fsf_req) |
589 | { | 589 | { |
590 | struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data; | 590 | struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data; |
591 | 591 | ||
@@ -597,7 +597,7 @@ inline void zfcp_san_dbf_event_els_request(struct zfcp_fsf_req *fsf_req) | |||
597 | els->req->length); | 597 | els->req->length); |
598 | } | 598 | } |
599 | 599 | ||
600 | inline void zfcp_san_dbf_event_els_response(struct zfcp_fsf_req *fsf_req) | 600 | void zfcp_san_dbf_event_els_response(struct zfcp_fsf_req *fsf_req) |
601 | { | 601 | { |
602 | struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data; | 602 | struct zfcp_send_els *els = (struct zfcp_send_els *)fsf_req->data; |
603 | 603 | ||
@@ -608,7 +608,7 @@ inline void zfcp_san_dbf_event_els_response(struct zfcp_fsf_req *fsf_req) | |||
608 | els->resp->length); | 608 | els->resp->length); |
609 | } | 609 | } |
610 | 610 | ||
611 | inline void zfcp_san_dbf_event_incoming_els(struct zfcp_fsf_req *fsf_req) | 611 | void zfcp_san_dbf_event_incoming_els(struct zfcp_fsf_req *fsf_req) |
612 | { | 612 | { |
613 | struct zfcp_adapter *adapter = fsf_req->adapter; | 613 | struct zfcp_adapter *adapter = fsf_req->adapter; |
614 | struct fsf_status_read_buffer *status_buffer = | 614 | struct fsf_status_read_buffer *status_buffer = |
@@ -702,7 +702,7 @@ static struct debug_view zfcp_san_dbf_view = { | |||
702 | NULL | 702 | NULL |
703 | }; | 703 | }; |
704 | 704 | ||
705 | static inline void | 705 | static void |
706 | _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, | 706 | _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, |
707 | struct zfcp_adapter *adapter, | 707 | struct zfcp_adapter *adapter, |
708 | struct scsi_cmnd *scsi_cmnd, | 708 | struct scsi_cmnd *scsi_cmnd, |
@@ -786,7 +786,7 @@ _zfcp_scsi_dbf_event_common(const char *tag, const char *tag2, int level, | |||
786 | spin_unlock_irqrestore(&adapter->scsi_dbf_lock, flags); | 786 | spin_unlock_irqrestore(&adapter->scsi_dbf_lock, flags); |
787 | } | 787 | } |
788 | 788 | ||
789 | inline void | 789 | void |
790 | zfcp_scsi_dbf_event_result(const char *tag, int level, | 790 | zfcp_scsi_dbf_event_result(const char *tag, int level, |
791 | struct zfcp_adapter *adapter, | 791 | struct zfcp_adapter *adapter, |
792 | struct scsi_cmnd *scsi_cmnd, | 792 | struct scsi_cmnd *scsi_cmnd, |
@@ -796,7 +796,7 @@ zfcp_scsi_dbf_event_result(const char *tag, int level, | |||
796 | adapter, scsi_cmnd, fsf_req, 0); | 796 | adapter, scsi_cmnd, fsf_req, 0); |
797 | } | 797 | } |
798 | 798 | ||
799 | inline void | 799 | void |
800 | zfcp_scsi_dbf_event_abort(const char *tag, struct zfcp_adapter *adapter, | 800 | zfcp_scsi_dbf_event_abort(const char *tag, struct zfcp_adapter *adapter, |
801 | struct scsi_cmnd *scsi_cmnd, | 801 | struct scsi_cmnd *scsi_cmnd, |
802 | struct zfcp_fsf_req *new_fsf_req, | 802 | struct zfcp_fsf_req *new_fsf_req, |
@@ -806,7 +806,7 @@ zfcp_scsi_dbf_event_abort(const char *tag, struct zfcp_adapter *adapter, | |||
806 | adapter, scsi_cmnd, new_fsf_req, old_req_id); | 806 | adapter, scsi_cmnd, new_fsf_req, old_req_id); |
807 | } | 807 | } |
808 | 808 | ||
809 | inline void | 809 | void |
810 | zfcp_scsi_dbf_event_devreset(const char *tag, u8 flag, struct zfcp_unit *unit, | 810 | zfcp_scsi_dbf_event_devreset(const char *tag, u8 flag, struct zfcp_unit *unit, |
811 | struct scsi_cmnd *scsi_cmnd) | 811 | struct scsi_cmnd *scsi_cmnd) |
812 | { | 812 | { |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 067f1519eb04..4b3ae3f22e78 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -4563,7 +4563,7 @@ zfcp_fsf_req_sbal_check(unsigned long *flags, | |||
4563 | /* | 4563 | /* |
4564 | * set qtcb pointer in fsf_req and initialize QTCB | 4564 | * set qtcb pointer in fsf_req and initialize QTCB |
4565 | */ | 4565 | */ |
4566 | static inline void | 4566 | static void |
4567 | zfcp_fsf_req_qtcb_init(struct zfcp_fsf_req *fsf_req) | 4567 | zfcp_fsf_req_qtcb_init(struct zfcp_fsf_req *fsf_req) |
4568 | { | 4568 | { |
4569 | if (likely(fsf_req->qtcb != NULL)) { | 4569 | if (likely(fsf_req->qtcb != NULL)) { |
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index dbd9f48e863e..1e12a78e8edd 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
@@ -21,22 +21,22 @@ | |||
21 | 21 | ||
22 | #include "zfcp_ext.h" | 22 | #include "zfcp_ext.h" |
23 | 23 | ||
24 | static inline void zfcp_qdio_sbal_limit(struct zfcp_fsf_req *, int); | 24 | static void zfcp_qdio_sbal_limit(struct zfcp_fsf_req *, int); |
25 | static inline volatile struct qdio_buffer_element *zfcp_qdio_sbale_get | 25 | static inline volatile struct qdio_buffer_element *zfcp_qdio_sbale_get |
26 | (struct zfcp_qdio_queue *, int, int); | 26 | (struct zfcp_qdio_queue *, int, int); |
27 | static inline volatile struct qdio_buffer_element *zfcp_qdio_sbale_resp | 27 | static inline volatile struct qdio_buffer_element *zfcp_qdio_sbale_resp |
28 | (struct zfcp_fsf_req *, int, int); | 28 | (struct zfcp_fsf_req *, int, int); |
29 | static inline volatile struct qdio_buffer_element *zfcp_qdio_sbal_chain | 29 | static volatile struct qdio_buffer_element *zfcp_qdio_sbal_chain |
30 | (struct zfcp_fsf_req *, unsigned long); | 30 | (struct zfcp_fsf_req *, unsigned long); |
31 | static inline volatile struct qdio_buffer_element *zfcp_qdio_sbale_next | 31 | static volatile struct qdio_buffer_element *zfcp_qdio_sbale_next |
32 | (struct zfcp_fsf_req *, unsigned long); | 32 | (struct zfcp_fsf_req *, unsigned long); |
33 | static inline int zfcp_qdio_sbals_zero(struct zfcp_qdio_queue *, int, int); | 33 | static int zfcp_qdio_sbals_zero(struct zfcp_qdio_queue *, int, int); |
34 | static inline int zfcp_qdio_sbals_wipe(struct zfcp_fsf_req *); | 34 | static inline int zfcp_qdio_sbals_wipe(struct zfcp_fsf_req *); |
35 | static inline void zfcp_qdio_sbale_fill | 35 | static void zfcp_qdio_sbale_fill |
36 | (struct zfcp_fsf_req *, unsigned long, void *, int); | 36 | (struct zfcp_fsf_req *, unsigned long, void *, int); |
37 | static inline int zfcp_qdio_sbals_from_segment | 37 | static int zfcp_qdio_sbals_from_segment |
38 | (struct zfcp_fsf_req *, unsigned long, void *, unsigned long); | 38 | (struct zfcp_fsf_req *, unsigned long, void *, unsigned long); |
39 | static inline int zfcp_qdio_sbals_from_buffer | 39 | static int zfcp_qdio_sbals_from_buffer |
40 | (struct zfcp_fsf_req *, unsigned long, void *, unsigned long, int); | 40 | (struct zfcp_fsf_req *, unsigned long, void *, unsigned long, int); |
41 | 41 | ||
42 | static qdio_handler_t zfcp_qdio_request_handler; | 42 | static qdio_handler_t zfcp_qdio_request_handler; |
@@ -201,7 +201,7 @@ zfcp_qdio_allocate(struct zfcp_adapter *adapter) | |||
201 | * returns: error flag | 201 | * returns: error flag |
202 | * | 202 | * |
203 | */ | 203 | */ |
204 | static inline int | 204 | static int |
205 | zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, unsigned int status, | 205 | zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, unsigned int status, |
206 | unsigned int qdio_error, unsigned int siga_error, | 206 | unsigned int qdio_error, unsigned int siga_error, |
207 | int first_element, int elements_processed) | 207 | int first_element, int elements_processed) |
@@ -462,7 +462,7 @@ zfcp_qdio_sbale_get(struct zfcp_qdio_queue *queue, int sbal, int sbale) | |||
462 | * zfcp_qdio_sbale_req - return pointer to SBALE of request_queue for | 462 | * zfcp_qdio_sbale_req - return pointer to SBALE of request_queue for |
463 | * a struct zfcp_fsf_req | 463 | * a struct zfcp_fsf_req |
464 | */ | 464 | */ |
465 | inline volatile struct qdio_buffer_element * | 465 | volatile struct qdio_buffer_element * |
466 | zfcp_qdio_sbale_req(struct zfcp_fsf_req *fsf_req, int sbal, int sbale) | 466 | zfcp_qdio_sbale_req(struct zfcp_fsf_req *fsf_req, int sbal, int sbale) |
467 | { | 467 | { |
468 | return zfcp_qdio_sbale_get(&fsf_req->adapter->request_queue, | 468 | return zfcp_qdio_sbale_get(&fsf_req->adapter->request_queue, |
@@ -484,7 +484,7 @@ zfcp_qdio_sbale_resp(struct zfcp_fsf_req *fsf_req, int sbal, int sbale) | |||
484 | * zfcp_qdio_sbale_curr - return current SBALE on request_queue for | 484 | * zfcp_qdio_sbale_curr - return current SBALE on request_queue for |
485 | * a struct zfcp_fsf_req | 485 | * a struct zfcp_fsf_req |
486 | */ | 486 | */ |
487 | inline volatile struct qdio_buffer_element * | 487 | volatile struct qdio_buffer_element * |
488 | zfcp_qdio_sbale_curr(struct zfcp_fsf_req *fsf_req) | 488 | zfcp_qdio_sbale_curr(struct zfcp_fsf_req *fsf_req) |
489 | { | 489 | { |
490 | return zfcp_qdio_sbale_req(fsf_req, fsf_req->sbal_curr, | 490 | return zfcp_qdio_sbale_req(fsf_req, fsf_req->sbal_curr, |
@@ -499,7 +499,7 @@ zfcp_qdio_sbale_curr(struct zfcp_fsf_req *fsf_req) | |||
499 | * | 499 | * |
500 | * Note: We can assume at least one free SBAL in the request_queue when called. | 500 | * Note: We can assume at least one free SBAL in the request_queue when called. |
501 | */ | 501 | */ |
502 | static inline void | 502 | static void |
503 | zfcp_qdio_sbal_limit(struct zfcp_fsf_req *fsf_req, int max_sbals) | 503 | zfcp_qdio_sbal_limit(struct zfcp_fsf_req *fsf_req, int max_sbals) |
504 | { | 504 | { |
505 | int count = atomic_read(&fsf_req->adapter->request_queue.free_count); | 505 | int count = atomic_read(&fsf_req->adapter->request_queue.free_count); |
@@ -517,7 +517,7 @@ zfcp_qdio_sbal_limit(struct zfcp_fsf_req *fsf_req, int max_sbals) | |||
517 | * | 517 | * |
518 | * This function changes sbal_curr, sbale_curr, sbal_number of fsf_req. | 518 | * This function changes sbal_curr, sbale_curr, sbal_number of fsf_req. |
519 | */ | 519 | */ |
520 | static inline volatile struct qdio_buffer_element * | 520 | static volatile struct qdio_buffer_element * |
521 | zfcp_qdio_sbal_chain(struct zfcp_fsf_req *fsf_req, unsigned long sbtype) | 521 | zfcp_qdio_sbal_chain(struct zfcp_fsf_req *fsf_req, unsigned long sbtype) |
522 | { | 522 | { |
523 | volatile struct qdio_buffer_element *sbale; | 523 | volatile struct qdio_buffer_element *sbale; |
@@ -554,7 +554,7 @@ zfcp_qdio_sbal_chain(struct zfcp_fsf_req *fsf_req, unsigned long sbtype) | |||
554 | /** | 554 | /** |
555 | * zfcp_qdio_sbale_next - switch to next SBALE, chain SBALs if needed | 555 | * zfcp_qdio_sbale_next - switch to next SBALE, chain SBALs if needed |
556 | */ | 556 | */ |
557 | static inline volatile struct qdio_buffer_element * | 557 | static volatile struct qdio_buffer_element * |
558 | zfcp_qdio_sbale_next(struct zfcp_fsf_req *fsf_req, unsigned long sbtype) | 558 | zfcp_qdio_sbale_next(struct zfcp_fsf_req *fsf_req, unsigned long sbtype) |
559 | { | 559 | { |
560 | if (fsf_req->sbale_curr == ZFCP_LAST_SBALE_PER_SBAL) | 560 | if (fsf_req->sbale_curr == ZFCP_LAST_SBALE_PER_SBAL) |
@@ -569,7 +569,7 @@ zfcp_qdio_sbale_next(struct zfcp_fsf_req *fsf_req, unsigned long sbtype) | |||
569 | * zfcp_qdio_sbals_zero - initialize SBALs between first and last in queue | 569 | * zfcp_qdio_sbals_zero - initialize SBALs between first and last in queue |
570 | * with zero from | 570 | * with zero from |
571 | */ | 571 | */ |
572 | static inline int | 572 | static int |
573 | zfcp_qdio_sbals_zero(struct zfcp_qdio_queue *queue, int first, int last) | 573 | zfcp_qdio_sbals_zero(struct zfcp_qdio_queue *queue, int first, int last) |
574 | { | 574 | { |
575 | struct qdio_buffer **buf = queue->buffer; | 575 | struct qdio_buffer **buf = queue->buffer; |
@@ -603,7 +603,7 @@ zfcp_qdio_sbals_wipe(struct zfcp_fsf_req *fsf_req) | |||
603 | * zfcp_qdio_sbale_fill - set address and lenght in current SBALE | 603 | * zfcp_qdio_sbale_fill - set address and lenght in current SBALE |
604 | * on request_queue | 604 | * on request_queue |
605 | */ | 605 | */ |
606 | static inline void | 606 | static void |
607 | zfcp_qdio_sbale_fill(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, | 607 | zfcp_qdio_sbale_fill(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, |
608 | void *addr, int length) | 608 | void *addr, int length) |
609 | { | 609 | { |
@@ -624,7 +624,7 @@ zfcp_qdio_sbale_fill(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, | |||
624 | * Alignment and length of the segment determine how many SBALEs are needed | 624 | * Alignment and length of the segment determine how many SBALEs are needed |
625 | * for the memory segment. | 625 | * for the memory segment. |
626 | */ | 626 | */ |
627 | static inline int | 627 | static int |
628 | zfcp_qdio_sbals_from_segment(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, | 628 | zfcp_qdio_sbals_from_segment(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, |
629 | void *start_addr, unsigned long total_length) | 629 | void *start_addr, unsigned long total_length) |
630 | { | 630 | { |
@@ -659,7 +659,7 @@ zfcp_qdio_sbals_from_segment(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, | |||
659 | * @sg_count: number of elements in scatter-gather list | 659 | * @sg_count: number of elements in scatter-gather list |
660 | * @max_sbals: upper bound for number of SBALs to be used | 660 | * @max_sbals: upper bound for number of SBALs to be used |
661 | */ | 661 | */ |
662 | inline int | 662 | int |
663 | zfcp_qdio_sbals_from_sg(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, | 663 | zfcp_qdio_sbals_from_sg(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, |
664 | struct scatterlist *sg, int sg_count, int max_sbals) | 664 | struct scatterlist *sg, int sg_count, int max_sbals) |
665 | { | 665 | { |
@@ -707,7 +707,7 @@ out: | |||
707 | * @length: length of buffer | 707 | * @length: length of buffer |
708 | * @max_sbals: upper bound for number of SBALs to be used | 708 | * @max_sbals: upper bound for number of SBALs to be used |
709 | */ | 709 | */ |
710 | static inline int | 710 | static int |
711 | zfcp_qdio_sbals_from_buffer(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, | 711 | zfcp_qdio_sbals_from_buffer(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, |
712 | void *buffer, unsigned long length, int max_sbals) | 712 | void *buffer, unsigned long length, int max_sbals) |
713 | { | 713 | { |
@@ -728,7 +728,7 @@ zfcp_qdio_sbals_from_buffer(struct zfcp_fsf_req *fsf_req, unsigned long sbtype, | |||
728 | * @scsi_cmnd: either scatter-gather list or buffer contained herein is used | 728 | * @scsi_cmnd: either scatter-gather list or buffer contained herein is used |
729 | * to fill SBALs | 729 | * to fill SBALs |
730 | */ | 730 | */ |
731 | inline int | 731 | int |
732 | zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req, | 732 | zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req, |
733 | unsigned long sbtype, struct scsi_cmnd *scsi_cmnd) | 733 | unsigned long sbtype, struct scsi_cmnd *scsi_cmnd) |
734 | { | 734 | { |