On Fri, Oct 21, 2022 at 11:09:53AM +0800, Maria Yu wrote:I don't like this long either. While the current Deadcode warning is also annoying for our clang tidy check.
When !CONFIG_VM_BUG_ON, there is warning of
clang-analyzer-deadcode.DeadStores:
Value stored to 'mt' during its initialization
is never read.
Honestly, the cure is worse than the disease. I'd rather not have a
line that's this long.
>> - int mt = get_pageblock_migratetype(pfn_to_page(isolate_pageblock));
-
- VM_BUG_ON(!is_migrate_isolate(mt));
+ VM_BUG_ON(!is_migrate_isolate(get_pageblock_migratetype(pfn_to_page(isolate_pageblock))));