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

dm: remove unnecessary unlikely() around WARN_ON_ONCE()

WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>

authored by

Igor Stoppa and committed by
Mike Snitzer
bab5d988 092b5648

+2 -2
+1 -1
drivers/md/dm-cache-policy-smq.c
··· 1200 1200 struct policy_work work; 1201 1201 struct entry *e; 1202 1202 1203 - if (unlikely(WARN_ON_ONCE(!mq->migrations_allowed))) 1203 + if (WARN_ON_ONCE(!mq->migrations_allowed)) 1204 1204 return; 1205 1205 1206 1206 e = q_peek(&mq->clean, mq->clean.nr_levels / 2, true);
+1 -1
drivers/md/dm.c
··· 1666 1666 * Defend against IO still getting in during teardown 1667 1667 * - as was seen for a time with nvme-fcloop 1668 1668 */ 1669 - if (unlikely(WARN_ON_ONCE(!ti || !dm_target_is_valid(ti)))) { 1669 + if (WARN_ON_ONCE(!ti || !dm_target_is_valid(ti))) { 1670 1670 error = -EIO; 1671 1671 goto out; 1672 1672 }