]> www.infradead.org Git - users/hch/block.git/commitdiff
bcache: remove bch_crc64_update
authorChristoph Hellwig <hch@lst.de>
Thu, 20 May 2021 13:09:37 +0000 (15:09 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 21 May 2021 05:57:23 +0000 (07:57 +0200)
bch_crc64_update is an entirely pointless wrapper around crc64_be.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/md/bcache/btree.c
drivers/md/bcache/request.c
drivers/md/bcache/util.h

index 183a58c893774d59f46c02070d84462d454bb3a7..88c573eeb59823bd38ddb38d51b14099fec0f935 100644 (file)
@@ -141,7 +141,7 @@ static uint64_t btree_csum_set(struct btree *b, struct bset *i)
        uint64_t crc = b->key.ptr[0];
        void *data = (void *) i + 8, *end = bset_bkey_last(i);
 
-       crc = bch_crc64_update(crc, data, end - data);
+       crc = crc64_be(crc, data, end - data);
        return crc ^ 0xffffffffffffffffULL;
 }
 
index 29c231758293e2bb99bbc2026b076813a06dbf27..466f187e1215d613199dae3098f88324e513997b 100644 (file)
@@ -46,7 +46,7 @@ static void bio_csum(struct bio *bio, struct bkey *k)
        bio_for_each_segment(bv, bio, iter) {
                void *d = kmap(bv.bv_page) + bv.bv_offset;
 
-               csum = bch_crc64_update(csum, d, bv.bv_len);
+               csum = crc64_be(csum, d, bv.bv_len);
                kunmap(bv.bv_page);
        }
 
index bca4a7c97da7c0b0ba8a274b4092784721d98844..50d1dc69d9703316347f515663b55dacf557e595 100644 (file)
@@ -550,14 +550,6 @@ static inline uint64_t bch_crc64(const void *p, size_t len)
        return crc ^ 0xffffffffffffffffULL;
 }
 
-static inline uint64_t bch_crc64_update(uint64_t crc,
-                                       const void *p,
-                                       size_t len)
-{
-       crc = crc64_be(crc, p, len);
-       return crc;
-}
-
 /*
  * A stepwise-linear pseudo-exponential.  This returns 1 << (x >>
  * frac_bits), with the less-significant bits filled in by linear