linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Coverity: ttm_bo_vm_insert_huge(): Incorrect expression
@ 2020-04-03 23:26 coverity-bot
  0 siblings, 0 replies; only message in thread
From: coverity-bot @ 2020-04-03 23:26 UTC (permalink / raw)
  To: Thomas Hellstrom
  Cc: Christian König, Roland Scheidegger, Gustavo A. R. Silva,
	linux-next

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):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1492487 ("Incorrect expression")
Fixes: 314b6580adc5 ("drm/ttm, drm/vmwgfx: Support huge TTM pagefaults")


Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-03 23:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-03 23:26 Coverity: ttm_bo_vm_insert_huge(): Incorrect expression coverity-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).