Commit 6484a677 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

misc: mic/scif: fix copy-paste error in scif_create_remote_lookup

gcc '-Wunused-but-set-variable' warning:

drivers/misc/mic/scif/scif_rma.c: In function 'scif_create_remote_lookup':
drivers/misc/mic/scif/scif_rma.c:373:25: warning:
 variable 'vmalloc_num_pages' set but not used [-Wunused-but-set-variable]

'vmalloc_num_pages' should be used to determine if the address is
within the vmalloc range.

Fixes: ba612aa8 ("misc: mic: SCIF memory registration and unregistration")
Signed-off-by: default avatarYueHaibing <>
Cc: stable <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 1830b6ee
......@@ -416,7 +416,7 @@ static int scif_create_remote_lookup(struct scif_dev *remote_dev,
if (err)
goto error_window;
err = scif_map_page(&window->num_pages_lookup.lookup[j],
vmalloc_dma_phys ?
vmalloc_num_pages ?
vmalloc_to_page(&window->num_pages[i]) :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment