summaryrefslogtreecommitdiff
path: root/rust/kernel/gpu/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-02-05 20:59:33 -0800
committerMikulas Patocka <mpatocka@redhat.com>2026-03-09 15:12:53 +0100
commit5ef22361fa98a44409f11a10cb7d08b5cbf6d57c (patch)
tree34f54298372a6c1e5366854f33e83d902043ce38 /rust/kernel/gpu/git@git.tavy.me:linux-stable.git
parent8ef45923fdcb7ec44e3a965bcbf41723e20814e4 (diff)
dm-verity-fec: simplify computation of ileaved
fec_read_bufs() just iterates over a sequence of message blocks with step size region_blocks. At each step, 'ileaved' is just the offset (in bytes) to one of these blocks. Compute it in the straightforward way, eliminating fec_interleave(). In more detail, previously the code computed 'ileaved = (n / k) + (n % k) * (region_blocks * block_size)' where n = rsb * k + i and 0 <= i < k. Substituting 'n' gives: ileaved = ((rsb * k + i) / k) + ((rsb * k + i) % k) * region_blocks * block_size = rsb + (i * region_blocks * block_size) The result is more efficient and easier to understand. Signed-off-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'rust/kernel/gpu/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions