[PATCH 4/7] dm-verity: remove unnecessary ifdef around verity_fec_decode()

Eric Biggers posted 7 patches 2 days ago
[PATCH 4/7] dm-verity: remove unnecessary ifdef around verity_fec_decode()
Posted by Eric Biggers 2 days ago
Since verity_fec_decode() has a !CONFIG_DM_VERITY_FEC stub, it can just
be called unconditionally, similar to the other calls in the same file.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 drivers/md/dm-verity-target.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
index c9f5602a42c6..777a0ebe8536 100644
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -433,15 +433,13 @@ static int verity_handle_data_hash_mismatch(struct dm_verity *v,
 	if (verity_recheck(v, io, want_digest, blkno, data) == 0) {
 		if (v->validated_blocks)
 			set_bit(blkno, v->validated_blocks);
 		return 0;
 	}
-#if defined(CONFIG_DM_VERITY_FEC)
 	if (verity_fec_decode(v, io, DM_VERITY_BLOCK_TYPE_DATA, want_digest,
 			      blkno, data) == 0)
 		return 0;
-#endif
 	if (bio->bi_status)
 		return -EIO; /* Error correction failed; Just return error */
 
 	if (verity_handle_err(v, DM_VERITY_BLOCK_TYPE_DATA, blkno)) {
 		io->had_mismatch = true;
-- 
2.52.0
Re: [PATCH 4/7] dm-verity: remove unnecessary ifdef around verity_fec_decode()
Posted by Sami Tolvanen 1 day, 5 hours ago
On Tue, Dec 16, 2025 at 03:06:11PM -0800, Eric Biggers wrote:
> Since verity_fec_decode() has a !CONFIG_DM_VERITY_FEC stub, it can just
> be called unconditionally, similar to the other calls in the same file.
> 
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>

Reviewed-by: Sami Tolvanen <samitolvanen@google.com>

Sami