Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bcache: remove bch_crc64_update

bch_crc64_update is an entirely pointless wrapper around crc64_be.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20211020143812.6403-9-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
39fa7a95 00387bd2

+2 -10
+1 -1
drivers/md/bcache/btree.c
··· 141 141 uint64_t crc = b->key.ptr[0]; 142 142 void *data = (void *) i + 8, *end = bset_bkey_last(i); 143 143 144 - crc = bch_crc64_update(crc, data, end - data); 144 + crc = crc64_be(crc, data, end - data); 145 145 return crc ^ 0xffffffffffffffffULL; 146 146 } 147 147
+1 -1
drivers/md/bcache/request.c
··· 46 46 bio_for_each_segment(bv, bio, iter) { 47 47 void *d = kmap(bv.bv_page) + bv.bv_offset; 48 48 49 - csum = bch_crc64_update(csum, d, bv.bv_len); 49 + csum = crc64_be(csum, d, bv.bv_len); 50 50 kunmap(bv.bv_page); 51 51 } 52 52
-8
drivers/md/bcache/util.h
··· 548 548 return crc ^ 0xffffffffffffffffULL; 549 549 } 550 550 551 - static inline uint64_t bch_crc64_update(uint64_t crc, 552 - const void *p, 553 - size_t len) 554 - { 555 - crc = crc64_be(crc, p, len); 556 - return crc; 557 - } 558 - 559 551 /* 560 552 * A stepwise-linear pseudo-exponential. This returns 1 << (x >> 561 553 * frac_bits), with the less-significant bits filled in by linear