diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-09-20 09:58:51 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-20 09:58:51 -0400 |
commit | 39b083fe1c3c7b88939f6fa1b0b96e579f12e96f (patch) | |
tree | b56864fed4a0aa286696cb4e63cbea6d8a962c8a /drivers/s390 | |
parent | ff6b8ea68f4b7353f88b97024f28127e2148aa00 (diff) |
[S390] empty function defines.
Use do { } while (0) constructs instead of empty defines to avoid
subtle compile bugs.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio.h | 16 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index ceb3ab31ee08..124569362f02 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h | |||
@@ -191,49 +191,49 @@ enum qdio_irq_states { | |||
191 | #if QDIO_VERBOSE_LEVEL>8 | 191 | #if QDIO_VERBOSE_LEVEL>8 |
192 | #define QDIO_PRINT_STUPID(x...) printk( KERN_DEBUG QDIO_PRINTK_HEADER x) | 192 | #define QDIO_PRINT_STUPID(x...) printk( KERN_DEBUG QDIO_PRINTK_HEADER x) |
193 | #else | 193 | #else |
194 | #define QDIO_PRINT_STUPID(x...) | 194 | #define QDIO_PRINT_STUPID(x...) do { } while (0) |
195 | #endif | 195 | #endif |
196 | 196 | ||
197 | #if QDIO_VERBOSE_LEVEL>7 | 197 | #if QDIO_VERBOSE_LEVEL>7 |
198 | #define QDIO_PRINT_ALL(x...) printk( QDIO_PRINTK_HEADER x) | 198 | #define QDIO_PRINT_ALL(x...) printk( QDIO_PRINTK_HEADER x) |
199 | #else | 199 | #else |
200 | #define QDIO_PRINT_ALL(x...) | 200 | #define QDIO_PRINT_ALL(x...) do { } while (0) |
201 | #endif | 201 | #endif |
202 | 202 | ||
203 | #if QDIO_VERBOSE_LEVEL>6 | 203 | #if QDIO_VERBOSE_LEVEL>6 |
204 | #define QDIO_PRINT_INFO(x...) printk( QDIO_PRINTK_HEADER x) | 204 | #define QDIO_PRINT_INFO(x...) printk( QDIO_PRINTK_HEADER x) |
205 | #else | 205 | #else |
206 | #define QDIO_PRINT_INFO(x...) | 206 | #define QDIO_PRINT_INFO(x...) do { } while (0) |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | #if QDIO_VERBOSE_LEVEL>5 | 209 | #if QDIO_VERBOSE_LEVEL>5 |
210 | #define QDIO_PRINT_WARN(x...) printk( QDIO_PRINTK_HEADER x) | 210 | #define QDIO_PRINT_WARN(x...) printk( QDIO_PRINTK_HEADER x) |
211 | #else | 211 | #else |
212 | #define QDIO_PRINT_WARN(x...) | 212 | #define QDIO_PRINT_WARN(x...) do { } while (0) |
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | #if QDIO_VERBOSE_LEVEL>4 | 215 | #if QDIO_VERBOSE_LEVEL>4 |
216 | #define QDIO_PRINT_ERR(x...) printk( QDIO_PRINTK_HEADER x) | 216 | #define QDIO_PRINT_ERR(x...) printk( QDIO_PRINTK_HEADER x) |
217 | #else | 217 | #else |
218 | #define QDIO_PRINT_ERR(x...) | 218 | #define QDIO_PRINT_ERR(x...) do { } while (0) |
219 | #endif | 219 | #endif |
220 | 220 | ||
221 | #if QDIO_VERBOSE_LEVEL>3 | 221 | #if QDIO_VERBOSE_LEVEL>3 |
222 | #define QDIO_PRINT_CRIT(x...) printk( QDIO_PRINTK_HEADER x) | 222 | #define QDIO_PRINT_CRIT(x...) printk( QDIO_PRINTK_HEADER x) |
223 | #else | 223 | #else |
224 | #define QDIO_PRINT_CRIT(x...) | 224 | #define QDIO_PRINT_CRIT(x...) do { } while (0) |
225 | #endif | 225 | #endif |
226 | 226 | ||
227 | #if QDIO_VERBOSE_LEVEL>2 | 227 | #if QDIO_VERBOSE_LEVEL>2 |
228 | #define QDIO_PRINT_ALERT(x...) printk( QDIO_PRINTK_HEADER x) | 228 | #define QDIO_PRINT_ALERT(x...) printk( QDIO_PRINTK_HEADER x) |
229 | #else | 229 | #else |
230 | #define QDIO_PRINT_ALERT(x...) | 230 | #define QDIO_PRINT_ALERT(x...) do { } while (0) |
231 | #endif | 231 | #endif |
232 | 232 | ||
233 | #if QDIO_VERBOSE_LEVEL>1 | 233 | #if QDIO_VERBOSE_LEVEL>1 |
234 | #define QDIO_PRINT_EMERG(x...) printk( QDIO_PRINTK_HEADER x) | 234 | #define QDIO_PRINT_EMERG(x...) printk( QDIO_PRINTK_HEADER x) |
235 | #else | 235 | #else |
236 | #define QDIO_PRINT_EMERG(x...) | 236 | #define QDIO_PRINT_EMERG(x...) do { } while (0) |
237 | #endif | 237 | #endif |
238 | 238 | ||
239 | #define HEXDUMP16(importance,header,ptr) \ | 239 | #define HEXDUMP16(importance,header,ptr) \ |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 94d1b74db356..7c84b3d4bd94 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -543,7 +543,7 @@ do { \ | |||
543 | } while (0) | 543 | } while (0) |
544 | 544 | ||
545 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_NORMAL | 545 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_NORMAL |
546 | # define ZFCP_LOG_NORMAL(fmt, args...) | 546 | # define ZFCP_LOG_NORMAL(fmt, args...) do { } while (0) |
547 | #else | 547 | #else |
548 | # define ZFCP_LOG_NORMAL(fmt, args...) \ | 548 | # define ZFCP_LOG_NORMAL(fmt, args...) \ |
549 | do { \ | 549 | do { \ |
@@ -553,7 +553,7 @@ do { \ | |||
553 | #endif | 553 | #endif |
554 | 554 | ||
555 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_INFO | 555 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_INFO |
556 | # define ZFCP_LOG_INFO(fmt, args...) | 556 | # define ZFCP_LOG_INFO(fmt, args...) do { } while (0) |
557 | #else | 557 | #else |
558 | # define ZFCP_LOG_INFO(fmt, args...) \ | 558 | # define ZFCP_LOG_INFO(fmt, args...) \ |
559 | do { \ | 559 | do { \ |
@@ -563,14 +563,14 @@ do { \ | |||
563 | #endif | 563 | #endif |
564 | 564 | ||
565 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_DEBUG | 565 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_DEBUG |
566 | # define ZFCP_LOG_DEBUG(fmt, args...) | 566 | # define ZFCP_LOG_DEBUG(fmt, args...) do { } while (0) |
567 | #else | 567 | #else |
568 | # define ZFCP_LOG_DEBUG(fmt, args...) \ | 568 | # define ZFCP_LOG_DEBUG(fmt, args...) \ |
569 | ZFCP_LOG(ZFCP_LOG_LEVEL_DEBUG, fmt , ##args) | 569 | ZFCP_LOG(ZFCP_LOG_LEVEL_DEBUG, fmt , ##args) |
570 | #endif | 570 | #endif |
571 | 571 | ||
572 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_TRACE | 572 | #if ZFCP_LOG_LEVEL_LIMIT < ZFCP_LOG_LEVEL_TRACE |
573 | # define ZFCP_LOG_TRACE(fmt, args...) | 573 | # define ZFCP_LOG_TRACE(fmt, args...) do { } while (0) |
574 | #else | 574 | #else |
575 | # define ZFCP_LOG_TRACE(fmt, args...) \ | 575 | # define ZFCP_LOG_TRACE(fmt, args...) \ |
576 | ZFCP_LOG(ZFCP_LOG_LEVEL_TRACE, fmt , ##args) | 576 | ZFCP_LOG(ZFCP_LOG_LEVEL_TRACE, fmt , ##args) |