Skip to contentSkip to conversation

bio.h: Remove unused conditional code

PATCH Applied Alberto Bertogli 2 participants 2 messages Sep 27, 2008 – Oct 2, 2008 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bio.h: Remove unused conditional code

The whole bio_integrity() definition is inside an #ifdef CONFIG_BLK_DEV_INTEGRITY, there's no need for the conditional code.

---
 include/linux/bio.h |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
include/linux/bio.h +1 -8
index 0933a14..57f9532 100644
@@ -458,14 +458,7 @@ static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
 #define bip_for_each_vec(bvl, bip, i)					\
 	__bip_for_each_vec(bvl, bip, i, (bip)->bip_idx)
 
-static inline int bio_integrity(struct bio *bio)
-{
-#if defined(CONFIG_BLK_DEV_INTEGRITY)
-	return bio->bi_integrity != NULL;
-#else
-	return 0;
-#endif
-}
+#define bio_integrity(bio) (bio->bi_integrity != NULL)
 
 extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *);
 extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int);
Signature · 1 line
1.6.0.87.g2858d
Applied
#1 lore raw
Quoted 2 lines · Alberto Bertogli

The whole bio_integrity() definition is inside an #ifdef CONFIG_BLK_DEV_INTEGRITY, there's no need for the conditional code.

Applied

Signature · 1 line
Jens Axboe