From: Jens Axboe Date: Tue, 28 Jul 2009 08:15:30 +0000 (+0200) Subject: block: make bio_rw_flagged() return a bool X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7e503aedb1f4d165081cb8d47a58c38f80f0cb4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git block: make bio_rw_flagged() return a bool Makes for a saner interface, instead of returning the bit position. Signed-off-by: Jens Axboe --- diff --git a/include/linux/bio.h b/include/linux/bio.h index a299ed38fcd7..4f8fd0221cd2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -177,7 +177,10 @@ enum bio_rw_flags { BIO_RW_NOIDLE, }; -#define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag))) +static inline bool bio_rw_flagged(struct bio *bio, enum bio_rw_flags flag) +{ + return (bio->bi_rw & (1 << flag)) != 0; +} /* * Old defines, these should eventually be replaced by direct usage of