Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1243912
| From | Ming Lei <tom.leiming@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] block: mark 1st parameter of bvec_iter_advance as const |
| Date | 2015-10-10 17:30 +0200 |
| Message-ID | <qi4fT-4T5-1@gated-at.bofh.it> (permalink) |
| References | <qi4fT-4T5-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
bvec_iter_advance() only writes the parameter of iterator,
so the base address of bvec can be marked as const safely.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
include/linux/bio.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/bio.h b/include/linux/bio.h
index b9b6e04..3333684 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -193,7 +193,8 @@ static inline void *bio_data(struct bio *bio)
#define bio_for_each_segment_all(bvl, bio, i) \
for (i = 0, bvl = (bio)->bi_io_vec; i < (bio)->bi_vcnt; i++, bvl++)
-static inline void bvec_iter_advance(struct bio_vec *bv, struct bvec_iter *iter,
+static inline void bvec_iter_advance(const struct bio_vec *bv,
+ struct bvec_iter *iter,
unsigned bytes)
{
WARN_ONCE(bytes > iter->bi_size,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/2] block: mark 1st parameter of bvec_iter_advance as const Ming Lei <tom.leiming@gmail.com> - 2015-10-10 17:30 +0200
csiph-web