tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 200e028b39abd7f9d901a50673f9a5f54d3eeb1e commit: ce35ded5d5774f055f6850b15032066ff4936414 [20704/21867] sched: smart grid: init sched_grid_qos structure on QOS purpose config: x86_64-randconfig-r111-20240313 (https://download.01.org/0day-ci/archive/20240315/202403151634.PfWUhfUu-lkp@i...) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240315/202403151634.PfWUhfUu-lkp@i...)
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 | Closes: https://lore.kernel.org/oe-kbuild-all/202403151634.PfWUhfUu-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/sched/grid/qos.c:84:13: sparse: sparse: using member 'v' in incomplete struct mempolicy kernel/sched/grid/qos.c:91:9: sparse: sparse: using member 'v' in incomplete struct mempolicy kernel/sched/grid/qos.c:95:16: sparse: sparse: no member 'il_prev' in struct task_struct kernel/sched/grid/qos.c:97:19: sparse: sparse: no member 'il_prev' in struct task_struct In file included from kernel/sched/grid/qos.c:20: In file included from include/linux/mempolicy.h:16: include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict] 425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/grid/qos.c:84:26: error: no member named 'v' in 'struct mempolicy'
84 | if (nodes_equal(policy->v.nodes, *preferred_nmask)) | ~~~~~~ ^ include/linux/nodemask.h:202:20: note: expanded from macro 'nodes_equal' 202 | __nodes_equal(&(src1), &(src2), MAX_NUMNODES) | ^~~~ kernel/sched/grid/qos.c:91:27: error: no member named 'v' in 'struct mempolicy' 91 | nodes_and(nmask, policy->v.nodes, *preferred_nmask); | ~~~~~~ ^ include/linux/nodemask.h:162:26: note: expanded from macro 'nodes_and' 162 | __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES) | ^~~~
kernel/sched/grid/qos.c:95:26: error: no member named 'il_prev' in 'struct task_struct'
95 | next = next_node_in(me->il_prev, nmask); | ~~ ^ include/linux/nodemask.h:278:46: note: expanded from macro 'next_node_in' 278 | #define next_node_in(n, src) __next_node_in((n), &(src)) | ^ kernel/sched/grid/qos.c:97:7: error: no member named 'il_prev' in 'struct task_struct' 97 | me->il_prev = next; | ~~ ^ 1 warning and 4 errors generated. -- In file included from kernel/sched/grid/qos.c:20: In file included from include/linux/mempolicy.h:16: include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict] 425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/grid/qos.c:84:26: error: no member named 'v' in 'struct mempolicy'
84 | if (nodes_equal(policy->v.nodes, *preferred_nmask)) | ~~~~~~ ^ include/linux/nodemask.h:202:20: note: expanded from macro 'nodes_equal' 202 | __nodes_equal(&(src1), &(src2), MAX_NUMNODES) | ^~~~ kernel/sched/grid/qos.c:91:27: error: no member named 'v' in 'struct mempolicy' 91 | nodes_and(nmask, policy->v.nodes, *preferred_nmask); | ~~~~~~ ^ include/linux/nodemask.h:162:26: note: expanded from macro 'nodes_and' 162 | __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES) | ^~~~
kernel/sched/grid/qos.c:95:26: error: no member named 'il_prev' in 'struct task_struct'
95 | next = next_node_in(me->il_prev, nmask); | ~~ ^ include/linux/nodemask.h:278:46: note: expanded from macro 'next_node_in' 278 | #define next_node_in(n, src) __next_node_in((n), &(src)) | ^ kernel/sched/grid/qos.c:97:7: error: no member named 'il_prev' in 'struct task_struct' 97 | me->il_prev = next; | ~~ ^ 1 warning and 4 errors generated.
vim +84 kernel/sched/grid/qos.c
68 69 /* dynamic select a more appropriate preferred interleave nid for process */ 70 int sched_grid_preferred_interleave_nid(struct mempolicy *policy) 71 { 72 nodemask_t nmask; 73 unsigned int next; 74 struct task_struct *me = current; 75 nodemask_t *preferred_nmask = NULL; 76 77 if (likely(me->grid_qos)) 78 preferred_nmask = 79 &me->grid_qos->affinity.mem_preferred_node_mask; 80 81 if (!preferred_nmask || !policy) 82 return NUMA_NO_NODE; 83
84 if (nodes_equal(policy->v.nodes, *preferred_nmask))
85 return NUMA_NO_NODE; 86 /* 87 * We perceive the actual consumption of memory bandwidth 88 * in each node and post a preferred interleave nid in 89 * more appropriate range. 90 */
91 nodes_and(nmask, policy->v.nodes, *preferred_nmask);
92 if (nodes_empty(nmask)) 93 return NUMA_NO_NODE; 94
95 next = next_node_in(me->il_prev, nmask);
96 if (next < MAX_NUMNODES) 97 me->il_prev = next; 98 return next; 99 } 100