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/block | |
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/block')
-rw-r--r-- | drivers/s390/block/dasd.c | 12 | ||||
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 6 | ||||
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 4 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 47 | ||||
-rw-r--r-- | drivers/s390/block/dasd_erp.c | 19 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 4 | ||||
-rw-r--r-- | drivers/s390/block/dasd_proc.c | 6 | ||||
-rw-r--r-- | drivers/s390/block/dcssblk.c | 2 |
8 files changed, 22 insertions, 78 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 555e18a6b781..eb5dc62f0d9c 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -483,7 +483,7 @@ unsigned int dasd_profile_level = DASD_PROFILE_OFF; | |||
483 | /* | 483 | /* |
484 | * Add profiling information for cqr before execution. | 484 | * Add profiling information for cqr before execution. |
485 | */ | 485 | */ |
486 | static inline void | 486 | static void |
487 | dasd_profile_start(struct dasd_device *device, struct dasd_ccw_req * cqr, | 487 | dasd_profile_start(struct dasd_device *device, struct dasd_ccw_req * cqr, |
488 | struct request *req) | 488 | struct request *req) |
489 | { | 489 | { |
@@ -505,7 +505,7 @@ dasd_profile_start(struct dasd_device *device, struct dasd_ccw_req * cqr, | |||
505 | /* | 505 | /* |
506 | * Add profiling information for cqr after execution. | 506 | * Add profiling information for cqr after execution. |
507 | */ | 507 | */ |
508 | static inline void | 508 | static void |
509 | dasd_profile_end(struct dasd_device *device, struct dasd_ccw_req * cqr, | 509 | dasd_profile_end(struct dasd_device *device, struct dasd_ccw_req * cqr, |
510 | struct request *req) | 510 | struct request *req) |
511 | { | 511 | { |
@@ -1102,7 +1102,7 @@ __dasd_process_erp(struct dasd_device *device, struct dasd_ccw_req *cqr) | |||
1102 | /* | 1102 | /* |
1103 | * Process ccw request queue. | 1103 | * Process ccw request queue. |
1104 | */ | 1104 | */ |
1105 | static inline void | 1105 | static void |
1106 | __dasd_process_ccw_queue(struct dasd_device * device, | 1106 | __dasd_process_ccw_queue(struct dasd_device * device, |
1107 | struct list_head *final_queue) | 1107 | struct list_head *final_queue) |
1108 | { | 1108 | { |
@@ -1181,7 +1181,7 @@ dasd_end_request_cb(struct dasd_ccw_req * cqr, void *data) | |||
1181 | /* | 1181 | /* |
1182 | * Fetch requests from the block device queue. | 1182 | * Fetch requests from the block device queue. |
1183 | */ | 1183 | */ |
1184 | static inline void | 1184 | static void |
1185 | __dasd_process_blk_queue(struct dasd_device * device) | 1185 | __dasd_process_blk_queue(struct dasd_device * device) |
1186 | { | 1186 | { |
1187 | request_queue_t *queue; | 1187 | request_queue_t *queue; |
@@ -1267,7 +1267,7 @@ __dasd_process_blk_queue(struct dasd_device * device) | |||
1267 | * Take a look at the first request on the ccw queue and check | 1267 | * Take a look at the first request on the ccw queue and check |
1268 | * if it reached its expire time. If so, terminate the IO. | 1268 | * if it reached its expire time. If so, terminate the IO. |
1269 | */ | 1269 | */ |
1270 | static inline void | 1270 | static void |
1271 | __dasd_check_expire(struct dasd_device * device) | 1271 | __dasd_check_expire(struct dasd_device * device) |
1272 | { | 1272 | { |
1273 | struct dasd_ccw_req *cqr; | 1273 | struct dasd_ccw_req *cqr; |
@@ -1298,7 +1298,7 @@ __dasd_check_expire(struct dasd_device * device) | |||
1298 | * Take a look at the first request on the ccw queue and check | 1298 | * Take a look at the first request on the ccw queue and check |
1299 | * if it needs to be started. | 1299 | * if it needs to be started. |
1300 | */ | 1300 | */ |
1301 | static inline void | 1301 | static void |
1302 | __dasd_start_head(struct dasd_device * device) | 1302 | __dasd_start_head(struct dasd_device * device) |
1303 | { | 1303 | { |
1304 | struct dasd_ccw_req *cqr; | 1304 | struct dasd_ccw_req *cqr; |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 5943266152f5..ed70852cc915 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -136,7 +136,7 @@ __setup ("dasd=", dasd_call_setup); | |||
136 | /* | 136 | /* |
137 | * Read a device busid/devno from a string. | 137 | * Read a device busid/devno from a string. |
138 | */ | 138 | */ |
139 | static inline int | 139 | static int |
140 | dasd_busid(char **str, int *id0, int *id1, int *devno) | 140 | dasd_busid(char **str, int *id0, int *id1, int *devno) |
141 | { | 141 | { |
142 | int val, old_style; | 142 | int val, old_style; |
@@ -182,7 +182,7 @@ dasd_busid(char **str, int *id0, int *id1, int *devno) | |||
182 | * only one: "ro" for read-only devices. The default feature set | 182 | * only one: "ro" for read-only devices. The default feature set |
183 | * is empty (value 0). | 183 | * is empty (value 0). |
184 | */ | 184 | */ |
185 | static inline int | 185 | static int |
186 | dasd_feature_list(char *str, char **endp) | 186 | dasd_feature_list(char *str, char **endp) |
187 | { | 187 | { |
188 | int features, len, rc; | 188 | int features, len, rc; |
@@ -341,7 +341,7 @@ dasd_parse_range( char *parsestring ) { | |||
341 | return ERR_PTR(-EINVAL); | 341 | return ERR_PTR(-EINVAL); |
342 | } | 342 | } |
343 | 343 | ||
344 | static inline char * | 344 | static char * |
345 | dasd_parse_next_element( char *parsestring ) { | 345 | dasd_parse_next_element( char *parsestring ) { |
346 | char * residual_str; | 346 | char * residual_str; |
347 | residual_str = dasd_parse_keyword(parsestring); | 347 | residual_str = dasd_parse_keyword(parsestring); |
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 51cdc16a72c5..ab782bb46ac1 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -90,7 +90,7 @@ static inline int dia250(void *iob, int cmd) | |||
90 | * block offset. On success, return zero and set end_block to contain the | 90 | * block offset. On success, return zero and set end_block to contain the |
91 | * number of blocks on the device minus the specified offset. Return non-zero | 91 | * number of blocks on the device minus the specified offset. Return non-zero |
92 | * otherwise. */ | 92 | * otherwise. */ |
93 | static __inline__ int | 93 | static inline int |
94 | mdsk_init_io(struct dasd_device *device, unsigned int blocksize, | 94 | mdsk_init_io(struct dasd_device *device, unsigned int blocksize, |
95 | blocknum_t offset, blocknum_t *end_block) | 95 | blocknum_t offset, blocknum_t *end_block) |
96 | { | 96 | { |
@@ -117,7 +117,7 @@ mdsk_init_io(struct dasd_device *device, unsigned int blocksize, | |||
117 | 117 | ||
118 | /* Remove block I/O environment for device. Return zero on success, non-zero | 118 | /* Remove block I/O environment for device. Return zero on success, non-zero |
119 | * otherwise. */ | 119 | * otherwise. */ |
120 | static __inline__ int | 120 | static inline int |
121 | mdsk_term_io(struct dasd_device * device) | 121 | mdsk_term_io(struct dasd_device * device) |
122 | { | 122 | { |
123 | struct dasd_diag_private *private; | 123 | struct dasd_diag_private *private; |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index a17d73193aab..cecab2274a6e 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -134,44 +134,7 @@ ceil_quot(unsigned int d1, unsigned int d2) | |||
134 | return (d1 + (d2 - 1)) / d2; | 134 | return (d1 + (d2 - 1)) / d2; |
135 | } | 135 | } |
136 | 136 | ||
137 | static inline int | 137 | static unsigned int |
138 | bytes_per_record(struct dasd_eckd_characteristics *rdc, int kl, int dl) | ||
139 | { | ||
140 | unsigned int fl1, fl2, int1, int2; | ||
141 | int bpr; | ||
142 | |||
143 | switch (rdc->formula) { | ||
144 | case 0x01: | ||
145 | fl1 = round_up_multiple(ECKD_F2(rdc) + dl, ECKD_F1(rdc)); | ||
146 | fl2 = round_up_multiple(kl ? ECKD_F2(rdc) + kl : 0, | ||
147 | ECKD_F1(rdc)); | ||
148 | bpr = fl1 + fl2; | ||
149 | break; | ||
150 | case 0x02: | ||
151 | int1 = ceil_quot(dl + ECKD_F6(rdc), ECKD_F5(rdc) << 1); | ||
152 | int2 = ceil_quot(kl + ECKD_F6(rdc), ECKD_F5(rdc) << 1); | ||
153 | fl1 = round_up_multiple(ECKD_F1(rdc) * ECKD_F2(rdc) + dl + | ||
154 | ECKD_F6(rdc) + ECKD_F4(rdc) * int1, | ||
155 | ECKD_F1(rdc)); | ||
156 | fl2 = round_up_multiple(ECKD_F1(rdc) * ECKD_F3(rdc) + kl + | ||
157 | ECKD_F6(rdc) + ECKD_F4(rdc) * int2, | ||
158 | ECKD_F1(rdc)); | ||
159 | bpr = fl1 + fl2; | ||
160 | break; | ||
161 | default: | ||
162 | bpr = 0; | ||
163 | break; | ||
164 | } | ||
165 | return bpr; | ||
166 | } | ||
167 | |||
168 | static inline unsigned int | ||
169 | bytes_per_track(struct dasd_eckd_characteristics *rdc) | ||
170 | { | ||
171 | return *(unsigned int *) (rdc->byte_per_track) >> 8; | ||
172 | } | ||
173 | |||
174 | static inline unsigned int | ||
175 | recs_per_track(struct dasd_eckd_characteristics * rdc, | 138 | recs_per_track(struct dasd_eckd_characteristics * rdc, |
176 | unsigned int kl, unsigned int dl) | 139 | unsigned int kl, unsigned int dl) |
177 | { | 140 | { |
@@ -204,7 +167,7 @@ recs_per_track(struct dasd_eckd_characteristics * rdc, | |||
204 | return 0; | 167 | return 0; |
205 | } | 168 | } |
206 | 169 | ||
207 | static inline int | 170 | static int |
208 | check_XRC (struct ccw1 *de_ccw, | 171 | check_XRC (struct ccw1 *de_ccw, |
209 | struct DE_eckd_data *data, | 172 | struct DE_eckd_data *data, |
210 | struct dasd_device *device) | 173 | struct dasd_device *device) |
@@ -230,7 +193,7 @@ check_XRC (struct ccw1 *de_ccw, | |||
230 | return rc; | 193 | return rc; |
231 | } | 194 | } |
232 | 195 | ||
233 | static inline int | 196 | static int |
234 | define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk, | 197 | define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk, |
235 | int totrk, int cmd, struct dasd_device * device) | 198 | int totrk, int cmd, struct dasd_device * device) |
236 | { | 199 | { |
@@ -317,7 +280,7 @@ define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk, | |||
317 | return rc; | 280 | return rc; |
318 | } | 281 | } |
319 | 282 | ||
320 | static inline void | 283 | static void |
321 | locate_record(struct ccw1 *ccw, struct LO_eckd_data *data, int trk, | 284 | locate_record(struct ccw1 *ccw, struct LO_eckd_data *data, int trk, |
322 | int rec_on_trk, int no_rec, int cmd, | 285 | int rec_on_trk, int no_rec, int cmd, |
323 | struct dasd_device * device, int reclen) | 286 | struct dasd_device * device, int reclen) |
@@ -1617,7 +1580,7 @@ dasd_eckd_ioctl(struct dasd_device *device, unsigned int cmd, void __user *argp) | |||
1617 | * Dump the range of CCWs into 'page' buffer | 1580 | * Dump the range of CCWs into 'page' buffer |
1618 | * and return number of printed chars. | 1581 | * and return number of printed chars. |
1619 | */ | 1582 | */ |
1620 | static inline int | 1583 | static int |
1621 | dasd_eckd_dump_ccw_range(struct ccw1 *from, struct ccw1 *to, char *page) | 1584 | dasd_eckd_dump_ccw_range(struct ccw1 *from, struct ccw1 *to, char *page) |
1622 | { | 1585 | { |
1623 | int len, count; | 1586 | int len, count; |
diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c index abf7cefb29c2..caa5d91420f8 100644 --- a/drivers/s390/block/dasd_erp.c +++ b/drivers/s390/block/dasd_erp.c | |||
@@ -152,25 +152,6 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr) | |||
152 | 152 | ||
153 | } /* end default_erp_postaction */ | 153 | } /* end default_erp_postaction */ |
154 | 154 | ||
155 | /* | ||
156 | * Print the hex dump of the memory used by a request. This includes | ||
157 | * all error recovery ccws that have been chained in from of the | ||
158 | * real request. | ||
159 | */ | ||
160 | static inline void | ||
161 | hex_dump_memory(struct dasd_device *device, void *data, int len) | ||
162 | { | ||
163 | int *pint; | ||
164 | |||
165 | pint = (int *) data; | ||
166 | while (len > 0) { | ||
167 | DEV_MESSAGE(KERN_ERR, device, "%p: %08x %08x %08x %08x", | ||
168 | pint, pint[0], pint[1], pint[2], pint[3]); | ||
169 | pint += 4; | ||
170 | len -= 16; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | void | 155 | void |
175 | dasd_log_sense(struct dasd_ccw_req *cqr, struct irb *irb) | 156 | dasd_log_sense(struct dasd_ccw_req *cqr, struct irb *irb) |
176 | { | 157 | { |
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index b857fd5893fd..be0909e39226 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -75,7 +75,7 @@ static struct ccw_driver dasd_fba_driver = { | |||
75 | .notify = dasd_generic_notify, | 75 | .notify = dasd_generic_notify, |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static inline void | 78 | static void |
79 | define_extent(struct ccw1 * ccw, struct DE_fba_data *data, int rw, | 79 | define_extent(struct ccw1 * ccw, struct DE_fba_data *data, int rw, |
80 | int blksize, int beg, int nr) | 80 | int blksize, int beg, int nr) |
81 | { | 81 | { |
@@ -95,7 +95,7 @@ define_extent(struct ccw1 * ccw, struct DE_fba_data *data, int rw, | |||
95 | data->ext_end = nr - 1; | 95 | data->ext_end = nr - 1; |
96 | } | 96 | } |
97 | 97 | ||
98 | static inline void | 98 | static void |
99 | locate_record(struct ccw1 * ccw, struct LO_fba_data *data, int rw, | 99 | locate_record(struct ccw1 * ccw, struct LO_fba_data *data, int rw, |
100 | int block_nr, int block_ct) | 100 | int block_nr, int block_ct) |
101 | { | 101 | { |
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index a9ff934d7e2b..8b7e11815d70 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -28,7 +28,7 @@ static struct proc_dir_entry *dasd_proc_root_entry = NULL; | |||
28 | static struct proc_dir_entry *dasd_devices_entry = NULL; | 28 | static struct proc_dir_entry *dasd_devices_entry = NULL; |
29 | static struct proc_dir_entry *dasd_statistics_entry = NULL; | 29 | static struct proc_dir_entry *dasd_statistics_entry = NULL; |
30 | 30 | ||
31 | static inline char * | 31 | static char * |
32 | dasd_get_user_string(const char __user *user_buf, size_t user_len) | 32 | dasd_get_user_string(const char __user *user_buf, size_t user_len) |
33 | { | 33 | { |
34 | char *buffer; | 34 | char *buffer; |
@@ -154,7 +154,7 @@ static struct file_operations dasd_devices_file_ops = { | |||
154 | .release = seq_release, | 154 | .release = seq_release, |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static inline int | 157 | static int |
158 | dasd_calc_metrics(char *page, char **start, off_t off, | 158 | dasd_calc_metrics(char *page, char **start, off_t off, |
159 | int count, int *eof, int len) | 159 | int count, int *eof, int len) |
160 | { | 160 | { |
@@ -167,7 +167,7 @@ dasd_calc_metrics(char *page, char **start, off_t off, | |||
167 | return len; | 167 | return len; |
168 | } | 168 | } |
169 | 169 | ||
170 | static inline char * | 170 | static char * |
171 | dasd_statistics_array(char *str, unsigned int *array, int shift) | 171 | dasd_statistics_array(char *str, unsigned int *array, int shift) |
172 | { | 172 | { |
173 | int i; | 173 | int i; |
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index bd1b66a54c21..1340451ea408 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -102,7 +102,7 @@ dcssblk_release_segment(struct device *dev) | |||
102 | * device needs to be enqueued before the semaphore is | 102 | * device needs to be enqueued before the semaphore is |
103 | * freed. | 103 | * freed. |
104 | */ | 104 | */ |
105 | static inline int | 105 | static int |
106 | dcssblk_assign_free_minor(struct dcssblk_dev_info *dev_info) | 106 | dcssblk_assign_free_minor(struct dcssblk_dev_info *dev_info) |
107 | { | 107 | { |
108 | int minor, found; | 108 | int minor, found; |