summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorColy Li <colyli@kernel.org>2025-03-09 19:05:56 +0300
committerJens Axboe <axboe@kernel.dk>2025-03-10 16:41:58 +0300
commit7e76336e14de9a2b67af96012ddd46c5676cf340 (patch)
treeab197e8a5e2b5e75f1c01ae3e4fbbb2a826c3db6 /tools/perf/scripts/python/check-perf-trace.py
parentfc0e982b8a3a169b1c654d9a1aa45bf292943ef2 (diff)
downloadlinux-7e76336e14de9a2b67af96012ddd46c5676cf340.tar.xz
badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0
In _badblocks_check(), there are lines of code like this, 1246 sectors -= len; [snipped] 1251 WARN_ON(sectors < 0); The WARN_ON() at line 1257 doesn't make sense because sectors is unsigned long long type and never to be <0. Fix it by checking directly checking whether sectors is less than len. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Coly Li <colyli@kernel.org> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/20250309160556.42854-1-colyli@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions