[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201901181249.EYdq00dv%fengguang.wu@intel.com>
Date: Fri, 18 Jan 2019 12:48:25 +0800
From: kbuild test robot <lkp@...el.com>
To: Bart Van Assche <bvanassche@....org>
Cc: kbuild-all@...org, David Miller <davem@...emloft.net>,
tgraf@...g.ch, herbert@...dor.apana.org.au, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Bart Van Assche <bvanassche@....org>
Subject: Re: [PATCH v2] lib/test_rhashtable: Make test_insert_dup() allocate
its hash table dynamically
Hi Bart,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc2 next-20190116]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Bart-Van-Assche/lib-test_rhashtable-Make-test_insert_dup-allocate-its-hash-table-dynamically/20190118-081736
config: i386-randconfig-b0-01181042 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
lib/test_rhashtable.c: In function 'test_insert_dup':
>> lib/test_rhashtable.c:561:21: error: request for member 'ht' in something not a structure or union
key = rht_obj(rhlt.ht, &rhl_test_objects[i].list_node.rhead);
^
lib/test_rhashtable.c:565:45: error: request for member 'ht' in something not a structure or union
err = PTR_ERR(rhashtable_insert_slow(rhlt.ht, key,
^
vim +/ht +561 lib/test_rhashtable.c
540
541 static int __init test_insert_dup(struct test_obj_rhl *rhl_test_objects,
542 int cnt, bool slow)
543 {
544 struct rhltable *rhlt;
545 unsigned int i, ret;
546 const char *key;
547 int err = 0;
548
549 rhlt = kmalloc(sizeof(*rhlt), GFP_KERNEL);
550 if (WARN_ON(!rhlt))
551 return -EINVAL;
552
553 err = rhltable_init(rhlt, &test_rht_params_dup);
554 if (WARN_ON(err)) {
555 kfree(rhlt);
556 return err;
557 }
558
559 for (i = 0; i < cnt; i++) {
560 rhl_test_objects[i].value.tid = i;
> 561 key = rht_obj(rhlt.ht, &rhl_test_objects[i].list_node.rhead);
562 key += test_rht_params_dup.key_offset;
563
564 if (slow) {
565 err = PTR_ERR(rhashtable_insert_slow(rhlt.ht, key,
566 &rhl_test_objects[i].list_node.rhead));
567 if (err == -EAGAIN)
568 err = 0;
569 } else
570 err = rhltable_insert(rhlt,
571 &rhl_test_objects[i].list_node,
572 test_rht_params_dup);
573 if (WARN(err, "error %d on element %d/%d (%s)\n", err, i, cnt, slow? "slow" : "fast"))
574 goto skip_print;
575 }
576
577 ret = print_ht(rhlt);
578 WARN(ret != cnt, "missing rhltable elements (%d != %d, %s)\n", ret, cnt, slow? "slow" : "fast");
579
580 skip_print:
581 rhltable_destroy(rhlt);
582 kfree(rhlt);
583
584 return 0;
585 }
586
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (33891 bytes)
Powered by blists - more mailing lists