CC: [email protected]
BCC: [email protected]
CC: Hao Li <[email protected]>

From: kernel test robot <[email protected]>

drivers/clocksource/mmio.c:211:15-21: WARNING: Consider using vma_pages helper 
on vma


 Use vma_pages function on vma object instead of explicit computation.

Generated by: scripts/coccinelle/api/vma_pages.cocci

Fixes: 20fd627143e8 ("clocksource: mmio: add user-mappable mmio clocksources")
CC: Gilles Chanteperdrix <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://github.com/intel/linux-intel-lts.git 5.10/dovetail-xenomai
head:   7e50195eb7b91d6b58f1c65457442eb5edc21848
commit: 20fd627143e8652ac182ac06627776b10ce234bd [14/205] clocksource: mmio: 
add user-mappable mmio clocksources
:::::: branch date: 5 days ago
:::::: commit date: 6 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 drivers/clocksource/mmio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/clocksource/mmio.c
+++ b/drivers/clocksource/mmio.c
@@ -208,7 +208,7 @@ static int mmio_ucs_mmap(struct file *fi
        size_t pages;
        int err;
 
-       pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+       pages = vma_pages(vma);
        if (pages > 2)
                return -EINVAL;
 
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to