Content-Type: multipart/mixed; boundary="===============6346312732418520426==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v1 12/14] mm: multigenerational lru: user space interface Date: Sat, 13 Mar 2021 20:23:30 +0800 Message-ID: <202103132018.8RBnL0OM-lkp@intel.com> In-Reply-To: <20210313075747.3781593-13-yuzhao@google.com> List-Id: --===============6346312732418520426== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Yu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on tip/x86/core] [also build test WARNING on tip/x86/mm tip/sched/core linus/master v5.12-rc= 2] [cannot apply to cgroup/for-next tip/perf/core hnaz-linux-mm/master next-20= 210312] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Yu-Zhao/Multigenerational-= LRU/20210313-160036 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git d0962f2= b24c99889a386f0658c71535f56358f77 compiler: s390-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck possible warnings: (new ones prefixed by >>, may not real problems) mm/vmscan.c:4107:22: warning: Local variable kswapd shadows outer functi= on [shadowFunction] struct task_struct *kswapd =3D NODE_DATA(nid)->kswapd; ^ mm/vmscan.c:3909:12: note: Shadowed declaration static int kswapd(void *p) ^ mm/vmscan.c:4107:22: note: Shadow variable struct task_struct *kswapd =3D NODE_DATA(nid)->kswapd; ^ vim +6140 mm/vmscan.c 6106 = 6107 static ssize_t lru_gen_debugfs_write(struct file *file, const char _= _user *src, 6108 size_t len, loff_t *pos) 6109 { 6110 void *buf; 6111 char *cur, *next; 6112 int err =3D 0; 6113 = 6114 buf =3D kvmalloc(len + 1, GFP_USER); 6115 if (!buf) 6116 return -ENOMEM; 6117 = 6118 if (copy_from_user(buf, src, len)) { 6119 kvfree(buf); 6120 return -EFAULT; 6121 } 6122 = 6123 next =3D buf; 6124 next[len] =3D '\0'; 6125 = 6126 while ((cur =3D strsep(&next, ",;\n"))) { 6127 int n; 6128 int end; 6129 char cmd; 6130 int memcg_id; 6131 int nid; 6132 unsigned long seq; 6133 int swappiness =3D -1; 6134 unsigned long nr_to_reclaim =3D -1; 6135 = 6136 cur =3D skip_spaces(cur); 6137 if (!*cur) 6138 continue; 6139 = > 6140 n =3D sscanf(cur, "%c %u %u %lu %n %u %n %lu %n", &cmd, &memcg_id,= &nid, 6141 &seq, &end, &swappiness, &end, &nr_to_reclaim, &end); 6142 if (n < 4 || cur[end]) { 6143 err =3D -EINVAL; 6144 break; 6145 } 6146 = 6147 err =3D advance_seq(cmd, memcg_id, nid, seq, swappiness, nr_to_rec= laim); 6148 if (err) 6149 break; 6150 } 6151 = 6152 kvfree(buf); 6153 = 6154 return err ? : len; 6155 } 6156 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org --===============6346312732418520426==--