All of lore.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

* Re: [PATCH] bio: use a static inline function for bio_integrity_clone
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Américo Wang @ 2011-08-30 15:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, Martin K. Petersen, Geert Uytterhoeven,
	Christoph Hellwig, LKML, Neil Brown

On Fri, Aug 26, 2011 at 10:09 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 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;
> +}

or

#define bio_integrity_clone(a, b, c, d)        ({0})

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

* Re: [PATCH] bio: use a static inline function for bio_integrity_clone
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2011-10-06 23:22 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Martin K. Petersen, Geert Uytterhoeven, Christoph Hellwig, LKML,
	Neil Brown, Jens Axboe

On Fri, 26 Aug 2011 12:09:00 +1000
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> 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)

grumble@lazybones.  All those other vile macros should be similarly
converted, for this reason and for all the others.

Am too lazy to do it myself, so let's at least fix this warning until
some others turn up.


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

* Re: [PATCH] bio: use a static inline function for bio_integrity_clone
  2011-10-06 23:22 ` Andrew Morton
@ 2011-10-07  0:45   ` Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2011-10-07  0:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Martin K. Petersen, Geert Uytterhoeven, Christoph Hellwig, LKML,
	Neil Brown, Jens Axboe

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

Hi Andrew,

On Thu, 6 Oct 2011 16:22:19 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> grumble@lazybones.  All those other vile macros should be similarly
> converted, for this reason and for all the others.
> 
> Am too lazy to do it myself, so let's at least fix this warning until
> some others turn up.

That was my feeling as well.  I will apply this to (the akpm part of)
linux-next today (since you have added it to the -mm tree).

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.