All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: mmio: fix vma_pages.cocci warnings
  2022-05-22 19:27 [intel-lts:5.10/dovetail-xenomai 14/205] drivers/clocksource/mmio.c:187:5-24: atomic_dec_and_test variation before object free at line 189 kernel test robot
@ 2022-05-22 19:24 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-22 19:24 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Hao Li <hao3.li@intel.com>

From: kernel test robot <lkp@intel.com>

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 <gilles.chanteperdrix@xenomai.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

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;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [intel-lts:5.10/dovetail-xenomai 14/205] drivers/clocksource/mmio.c:187:5-24: atomic_dec_and_test variation before object free at line 189.
@ 2022-05-22 19:27 kernel test robot
  2022-05-22 19:24 ` [PATCH] clocksource: mmio: fix vma_pages.cocci warnings kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-05-22 19:27 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Hao Li <hao3.li@intel.com>

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
config: i386-randconfig-c021 (https://download.01.org/0day-ci/archive/20220523/202205230346.TDJh4I8y-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/clocksource/mmio.c:187:5-24: atomic_dec_and_test variation before object free at line 189.
--
>> drivers/clocksource/mmio.c:211:15-21: WARNING: Consider using vma_pages helper on vma

Please review and possibly fold the followup patch.

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-22 19:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 19:27 [intel-lts:5.10/dovetail-xenomai 14/205] drivers/clocksource/mmio.c:187:5-24: atomic_dec_and_test variation before object free at line 189 kernel test robot
2022-05-22 19:24 ` [PATCH] clocksource: mmio: fix vma_pages.cocci warnings kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.