From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [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
Date: Fri, 15 Sep 2023 09:49:56 +0800 [thread overview]
Message-ID: <202309150959.WgiONEmO-lkp@intel.com> (raw)
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
reply other threads:[~2023-09-15 1:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202309150959.WgiONEmO-lkp@intel.com \
--to=lkp@intel.com \
--cc=julia.lawall@inria.fr \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.