Re: [PATCH] bio: use a static inline function for bio_integrity_clone

From: AmÃrico Wang
Date: Tue Aug 30 2011 - 11:05:54 EST


On Fri, Aug 26, 2011 at 10:09 AM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx>
> ---
> Â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})
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/