diff options
| author | Martin K. Petersen <martin.petersen@oracle.com> | 2012-01-13 02:15:33 -0500 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2012-01-13 02:15:33 -0500 |
| commit | 6898e3bd11cc9a931ef115eee9000ac9d8f8c3cf (patch) | |
| tree | c33b7c04926370b604e56009c124782222fc7fe6 /include/linux | |
| parent | fd83240a60ecc59849420df3393e9e6d35c77683 (diff) | |
block: Stop using macro stubs for the bio data integrity calls
Replace preprocessor macro stubs with real function declarations to
prevent warnings when CONFIG_BLK_DEV_INTEGRITY is disabled.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bio.h | 66 |
1 files changed, 53 insertions, 13 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 847994aef0e9..129a9c097958 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -515,24 +515,64 @@ extern void bio_integrity_init(void); | |||
| 515 | 515 | ||
| 516 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | 516 | #else /* CONFIG_BLK_DEV_INTEGRITY */ |
| 517 | 517 | ||
| 518 | #define bio_integrity(a) (0) | 518 | static inline int bio_integrity(struct bio *bio) |
| 519 | #define bioset_integrity_create(a, b) (0) | 519 | { |
| 520 | #define bio_integrity_prep(a) (0) | 520 | return 0; |
| 521 | #define bio_integrity_enabled(a) (0) | 521 | } |
| 522 | |||
| 523 | static inline int bio_integrity_enabled(struct bio *bio) | ||
| 524 | { | ||
| 525 | return 0; | ||
| 526 | } | ||
| 527 | |||
| 528 | static inline int bioset_integrity_create(struct bio_set *bs, int pool_size) | ||
| 529 | { | ||
| 530 | return 0; | ||
| 531 | } | ||
| 532 | |||
| 533 | static inline void bioset_integrity_free (struct bio_set *bs) | ||
| 534 | { | ||
| 535 | return; | ||
| 536 | } | ||
| 537 | |||
| 538 | static inline int bio_integrity_prep(struct bio *bio) | ||
| 539 | { | ||
| 540 | return 0; | ||
| 541 | } | ||
| 542 | |||
| 543 | static inline void bio_integrity_free(struct bio *bio, struct bio_set *bs) | ||
| 544 | { | ||
| 545 | return; | ||
| 546 | } | ||
| 547 | |||
| 522 | static inline int bio_integrity_clone(struct bio *bio, struct bio *bio_src, | 548 | static inline int bio_integrity_clone(struct bio *bio, struct bio *bio_src, |
| 523 | gfp_t gfp_mask, struct bio_set *bs) | 549 | gfp_t gfp_mask, struct bio_set *bs) |
| 524 | { | 550 | { |
| 525 | return 0; | 551 | return 0; |
| 526 | } | 552 | } |
| 527 | #define bioset_integrity_free(a) do { } while (0) | 553 | |
| 528 | #define bio_integrity_free(a, b) do { } while (0) | 554 | static inline void bio_integrity_split(struct bio *bio, struct bio_pair *bp, |
| 529 | #define bio_integrity_endio(a, b) do { } while (0) | 555 | int sectors) |
| 530 | #define bio_integrity_advance(a, b) do { } while (0) | 556 | { |
| 531 | #define bio_integrity_trim(a, b, c) do { } while (0) | 557 | return; |
| 532 | #define bio_integrity_split(a, b, c) do { } while (0) | 558 | } |
| 533 | #define bio_integrity_set_tag(a, b, c) do { } while (0) | 559 | |
| 534 | #define bio_integrity_get_tag(a, b, c) do { } while (0) | 560 | static inline void bio_integrity_advance(struct bio *bio, |
| 535 | #define bio_integrity_init(a) do { } while (0) | 561 | unsigned int bytes_done) |
| 562 | { | ||
| 563 | return; | ||
| 564 | } | ||
| 565 | |||
| 566 | static inline void bio_integrity_trim(struct bio *bio, unsigned int offset, | ||
| 567 | unsigned int sectors) | ||
| 568 | { | ||
| 569 | return; | ||
| 570 | } | ||
| 571 | |||
| 572 | static inline void bio_integrity_init(void) | ||
| 573 | { | ||
| 574 | return; | ||
| 575 | } | ||
| 536 | 576 | ||
| 537 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 577 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
| 538 | 578 | ||
