public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bio: use a static inline function for bio_integrity_clone
@ 2011-08-26  2:09 Stephen Rothwell
  2011-08-30 15:05 ` Américo Wang
  2011-10-06 23:22 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Rothwell @ 2011-08-26  2:09 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Martin K. Petersen, Geert Uytterhoeven, Christoph Hellwig, LKML,
	Neil Brown

When CONFIG_BLK_DEV_INTEGRITY is not set, we get these warnings:

drivers/md/dm.c: In function 'split_bvec':
drivers/md/dm.c:1061:3: warning: statement with no effect
drivers/md/dm.c: In function 'clone_bio':
drivers/md/dm.c:1088:3: warning: statement with no effect

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/bio.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/linux/bio.h b/include/linux/bio.h
index ce33e68..c98ecc8 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -527,7 +527,11 @@ extern void bio_integrity_init(void);
 #define bioset_integrity_create(a, b)	(0)
 #define bio_integrity_prep(a)		(0)
 #define bio_integrity_enabled(a)	(0)
-#define bio_integrity_clone(a, b, c, d)	(0)
+static inline int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
+				      gfp_t gfp_mask, struct bio_set *bs)
+{
+	return 0;
+}
 #define bioset_integrity_free(a)	do { } while (0)
 #define bio_integrity_free(a, b)	do { } while (0)
 #define bio_integrity_endio(a, b)	do { } while (0)
-- 
1.7.5.4

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-07  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-26  2:09 [PATCH] bio: use a static inline function for bio_integrity_clone Stephen Rothwell
2011-08-30 15:05 ` Américo Wang
2011-10-06 23:22 ` Andrew Morton
2011-10-07  0:45   ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox