Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1243912
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| 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 | Sat, 10 Oct 2015 17:30:01 +0200 |
| Message-ID | <qi4fT-4T5-1@gated-at.bofh.it> (permalink) |
| References | <qi4fT-4T5-3@gated-at.bofh.it> |
| X-Original-To | Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kMTlYRpXUMzVecH9glJ4ha+BHewMiV1/ROxtLS3v+FE=; b=Kqi95DvTBIW0wIpmthyRH5cNJD7zmRIHi1LeSoyXCsNZNg0H5NJWoZf02gpK1KS++z fPJbj2VV97tGWJVPe2KnX6sKYfGt/4m3oZ2AyUuqPH3wXAaj+xrModj6U4KgMcFBN+Xn gDiX6/2n8AVr+3huZidldPksnftcxkmqx1Fx1s1nm6fhfqXyiZudly+P76Ici35egojE V/dXu2vKG2Y2C5CWHBB2jgkSf0XipBWKW+hZ8tEkjL2h3x/6t1zFiw4ZZ/V8mgzIaj4W qMFrA3zaS6ULQNDZrEsB8unCeHBrZYE+sCZDg7T2Vm0M0OLqOubcVaywoVm6f8TRrKg6 E2tw== |
| X-Received | by 10.66.145.193 with SMTP id sw1mr23162863pab.74.1444490439194; Sat, 10 Oct 2015 08:20:39 -0700 (PDT) |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 30 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Christoph Hellwig <hch@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Alexander Viro <viro@zeniv.linux.org.uk>, Ming Lei <tom.leiming@gmail.com> |
| X-Original-Date | Sat, 10 Oct 2015 23:20:25 +0800 |
| X-Original-Message-ID | <1444490426-16522-2-git-send-email-tom.leiming@gmail.com> |
| X-Original-References | <1444490426-16522-1-git-send-email-tom.leiming@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1243912 |
Show key headers only | View raw
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