* [linux-next:master 846/1095] drivers/dax/kmem.c:74:8-13: ERROR: invalid reference to the index variable of the iterator on line 61
@ 2023-09-15 1:49 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-15 1:49 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Huang Ying <ying.huang@intel.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 98897dc735cf6635f0966f76eb0108354168fb15
commit: cb826bb2f6e132253d68b931d64b8d3973bf6095 [846/1095] dax, kmem: calculate abstract distance with general interface
:::::: branch date: 23 hours ago
:::::: commit date: 9 days ago
config: x86_64-randconfig-104-20230912 (https://download.01.org/0day-ci/archive/20230915/202309150959.WgiONEmO-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230915/202309150959.WgiONEmO-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202309150959.WgiONEmO-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/dax/kmem.c:74:8-13: ERROR: invalid reference to the index variable of the iterator on line 61
vim +74 drivers/dax/kmem.c
cb826bb2f6e132 Huang Ying 2023-08-16 54
cb826bb2f6e132 Huang Ying 2023-08-16 55 static struct memory_dev_type *kmem_find_alloc_memory_type(int adist)
cb826bb2f6e132 Huang Ying 2023-08-16 56 {
cb826bb2f6e132 Huang Ying 2023-08-16 57 bool found = false;
cb826bb2f6e132 Huang Ying 2023-08-16 58 struct memory_dev_type *mtype;
cb826bb2f6e132 Huang Ying 2023-08-16 59
cb826bb2f6e132 Huang Ying 2023-08-16 60 mutex_lock(&kmem_memory_type_lock);
cb826bb2f6e132 Huang Ying 2023-08-16 @61 list_for_each_entry(mtype, &kmem_memory_types, list) {
cb826bb2f6e132 Huang Ying 2023-08-16 62 if (mtype->adistance == adist) {
cb826bb2f6e132 Huang Ying 2023-08-16 63 found = true;
cb826bb2f6e132 Huang Ying 2023-08-16 64 break;
cb826bb2f6e132 Huang Ying 2023-08-16 65 }
cb826bb2f6e132 Huang Ying 2023-08-16 66 }
cb826bb2f6e132 Huang Ying 2023-08-16 67 if (!found) {
cb826bb2f6e132 Huang Ying 2023-08-16 68 mtype = alloc_memory_type(adist);
cb826bb2f6e132 Huang Ying 2023-08-16 69 if (!IS_ERR(mtype))
cb826bb2f6e132 Huang Ying 2023-08-16 70 list_add(&mtype->list, &kmem_memory_types);
cb826bb2f6e132 Huang Ying 2023-08-16 71 }
cb826bb2f6e132 Huang Ying 2023-08-16 72 mutex_unlock(&kmem_memory_type_lock);
cb826bb2f6e132 Huang Ying 2023-08-16 73
cb826bb2f6e132 Huang Ying 2023-08-16 @74 return mtype;
cb826bb2f6e132 Huang Ying 2023-08-16 75 }
cb826bb2f6e132 Huang Ying 2023-08-16 76
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-15 1:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15 1:49 [linux-next:master 846/1095] drivers/dax/kmem.c:74:8-13: ERROR: invalid reference to the index variable of the iterator on line 61 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.