Coverity: ttm_bo_vm_insert_huge(): Incorrect expression
Hello!
This is an experimental automated report about issues detected by Coverity from a scan of next-20200403 as part of the linux-next weekly scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified lines of code (noted below) that were touched by recent commits:
314b6580adc5 ("drm/ttm, drm/vmwgfx: Support huge TTM pagefaults")
Coverity reported the following:
*** CID 1492487: Incorrect expression (PW.ASSIGN_WHERE_COMPARE_MEANT) /drivers/gpu/drm/ttm/ttm_bo_vm.c: 227 in ttm_bo_vm_insert_huge()
221 ret = vmf_insert_pfn_pmd_prot(vmf, pfnt, pgprot, write); 222 #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 223 else if (fault_page_size == (HPAGE_PUD_SIZE >> PAGE_SHIFT)) 224 ret = vmf_insert_pfn_pud_prot(vmf, pfnt, pgprot, write); 225 #endif 226 else vvv CID 1492487: Incorrect expression (PW.ASSIGN_WHERE_COMPARE_MEANT) vvv use of "=" where "==" may have been intended 227 WARN_ON_ONCE(ret = VM_FAULT_FALLBACK);
228
229 if (ret != VM_FAULT_NOPAGE)
230 goto out_fallback;
231
232 return VM_FAULT_NOPAGE;
If this is a false positive, please let us know so we can mark it as such, or teach the Coverity rules to be smarter. If not, please make sure fixes get into linux-next. :) For patches fixing this, please include these lines (but double-check the "Fixes" first):
Addresses-Coverity-ID: 1492487 ("Incorrect expression")
Thanks for your attention!
Signature · 1 line
Coverity-bot