lkml.org 
[lkml]   [2020]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 06/17] sched/debug: Output SD flag names rather than their values
Hi Valentin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on tip/auto-latest linux/master linus/master v5.8 next-20200812]
[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/Valentin-Schneider/sched-Instrument-sched-domain-flags/20200812-205638
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 949bcb8135a96a6923e676646bd29cbe69e8350f
config: i386-randconfig-s001-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

kernel/sched/debug.c:327:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/debug.c:327:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/debug.c:327:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/debug.c:334:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/debug.c:334:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/debug.c:334:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/debug.c:486:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/debug.c:486:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/debug.c:486:22: sparse: struct task_struct *
kernel/sched/debug.c:694:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/debug.c:694:9: sparse: expected struct task_struct *tsk
kernel/sched/debug.c:694:9: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/debug.c:694:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/debug.c:694:9: sparse: expected struct task_struct *tsk
kernel/sched/debug.c:694:9: sparse: got struct task_struct [noderef] __rcu *curr
>> kernel/sched/debug.c:279:17: sparse: sparse: non size-preserving pointer to integer cast
>> kernel/sched/debug.c:279:17: sparse: sparse: non size-preserving integer to pointer cast

vim +279 kernel/sched/debug.c

247
248 static int sd_ctl_doflags(struct ctl_table *table, int write,
249 void *buffer, size_t *lenp, loff_t *ppos)
250 {
251 unsigned long flags = *(unsigned long *)table->data;
252 size_t data_size = 0;
253 size_t len = 0;
254 char *tmp;
255 int idx;
256
257 if (write)
258 return 0;
259
260 for_each_set_bit(idx, &flags, __SD_FLAG_CNT) {
261 char *name = sd_flag_debug[idx].name;
262
263 /* Name plus whitespace */
264 data_size += strlen(name) + 1;
265 }
266
267 if (*ppos > data_size) {
268 *lenp = 0;
269 return 0;
270 }
271
272 tmp = kcalloc(data_size + 1, sizeof(tmp), GFP_KERNEL);
273 for_each_set_bit(idx, &flags, __SD_FLAG_CNT) {
274 char *name = sd_flag_debug[idx].name;
275
276 len += snprintf(tmp + len, strlen(name) + 2, "%s ", name);
277 }
278
> 279 tmp += *ppos;
280 len -= *ppos;
281
282 if (len > *lenp)
283 len = *lenp;
284 if (len)
285 memcpy(buffer, tmp, len);
286 if (len < *lenp) {
287 ((char *)buffer)[len] = '\n';
288 len++;
289 }
290
291 *lenp = len;
292 *ppos += len;
293
294 kfree(tmp);
295
296 return 0;
297 }
298

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-08-12 19:06    [W:0.200 / U:1.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site