Skip to content

Commit

Permalink
dm verity fec: remove redundant unlikely annotation
Browse files Browse the repository at this point in the history
unlikely has already included in IS_ERR(),
so just remove redundant unlikely annotation.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Chengguang Xu authored and Mike Snitzer committed Mar 5, 2019
1 parent 5e3d0e3 commit 821b40d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/md/dm-verity-fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static u8 *fec_read_parity(struct dm_verity *v, u64 rsb, int index,
*offset = (unsigned)(position - (block << v->data_dev_block_bits));

res = dm_bufio_read(v->fec->bufio, v->fec->start + block, buf);
if (unlikely(IS_ERR(res))) {
if (IS_ERR(res)) {
DMERR("%s: FEC %llu: parity read failed (block %llu): %ld",
v->data_dev->name, (unsigned long long)rsb,
(unsigned long long)(v->fec->start + block),
Expand Down Expand Up @@ -163,7 +163,7 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio,
dm_bufio_release(buf);

par = fec_read_parity(v, rsb, block_offset, &offset, &buf);
if (unlikely(IS_ERR(par)))
if (IS_ERR(par))
return PTR_ERR(par);
}
}
Expand Down Expand Up @@ -253,7 +253,7 @@ static int fec_read_bufs(struct dm_verity *v, struct dm_verity_io *io,
}

bbuf = dm_bufio_read(bufio, block, &buf);
if (unlikely(IS_ERR(bbuf))) {
if (IS_ERR(bbuf)) {
DMWARN_LIMIT("%s: FEC %llu: read failed (%llu): %ld",
v->data_dev->name,
(unsigned long long)rsb,
Expand Down

0 comments on commit 821b40d

Please sign in to comment.