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-rc2]
[cannot apply to cgroup/for-next tip/perf/core hnaz-linux-mm/master next-20210312]
[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/20...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
d0962f2b24c99889a386f0658c71535f56358f77
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
mm/vmscan.c:4107:22: warning: Local variable kswapd shadows outer function
[shadowFunction]
struct task_struct *kswapd = 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 = 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 = 0;
6113
6114 buf = 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 = buf;
6124 next[len] = '\0';
6125
6126 while ((cur = 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 = -1;
6134 unsigned long nr_to_reclaim = -1;
6135
6136 cur = skip_spaces(cur);
6137 if (!*cur)
6138 continue;
6139
6140 n = 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 = -EINVAL;
6144 break;
6145 }
6146
6147 err = advance_seq(cmd, memcg_id, nid, seq, swappiness, nr_to_reclaim);
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