[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201806121242.NKm8SoJR%fengguang.wu@intel.com>
Date: Tue, 12 Jun 2018 12:37:50 +0800
From: kbuild test robot <lkp@...el.com>
To: Baoquan He <bhe@...hat.com>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, robh+dt@...nel.org,
dan.j.williams@...el.com, nicolas.pitre@...aro.org,
josh@...htriplett.org, fengguang.wu@...el.com, bp@...e.de,
brijesh.singh@....com, devicetree@...r.kernel.org,
airlied@...ux.ie, linux-pci@...r.kernel.org,
richard.weiyang@...il.com, keith.busch@...el.com,
jcmvbkbc@...il.com, baiyaowei@...s.chinamobile.com,
frowand.list@...il.com, lorenzo.pieralisi@....com,
sthemmin@...rosoft.com, Baoquan He <bhe@...hat.com>,
linux-nvdimm@...ts.01.org, patrik.r.jakobsson@...il.com,
linux-input@...r.kernel.org, gustavo@...ovan.org,
dyoung@...hat.com, vgoyal@...hat.com, thomas.lendacky@....com,
haiyangz@...rosoft.com, maarten.lankhorst@...ux.intel.com,
jglisse@...hat.com, seanpaul@...omium.org, bhelgaas@...gle.com,
tglx@...utronix.de, yinghai@...nel.org, jonathan.derrick@...el.com,
chris@...kel.net, monstr@...str.eu, linux-parisc@...r.kernel.org,
gregkh@...uxfoundation.org, dmitry.torokhov@...il.com,
kexec@...ts.infradead.org, ebiederm@...ssion.com,
devel@...uxdriverproject.org, linuxppc-dev@...ts.ozlabs.org,
davem@...emloft.net
Subject: Re: [PATCH v5 2/4] resource: Use list_head to link sibling resource
Hi Baoquan,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.17 next-20180608]
[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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
kernel/resource.c: In function 'reparent_resources':
>> kernel/resource.c:1005:26: error: passing argument 2 of 'list_add' from incompatible pointer type [-Werror=incompatible-pointer-types]
list_add(&res->sibling, &p->sibling.prev);
^
In file included from include/linux/ioport.h:15:0,
from kernel/resource.c:14:
include/linux/list.h:77:20: note: expected 'struct list_head *' but argument is of type 'struct list_head **'
static inline void list_add(struct list_head *new, struct list_head *head)
^~~~~~~~
In file included from include/linux/list.h:9:0,
from include/linux/ioport.h:15,
from kernel/resource.c:14:
>> kernel/resource.c:1013:26: error: 'new' undeclared (first use in this function); did you mean 'net'?
list_for_each_entry(p, &new->child, sibling) {
^
include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
list_entry((ptr)->next, type, member)
^~~~~~~~~~
include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^~~~~~~~~~~~~~~~
kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry'
list_for_each_entry(p, &new->child, sibling) {
^~~~~~~~~~~~~~~~~~~
kernel/resource.c:1013:26: note: each undeclared identifier is reported only once for each function it appears in
list_for_each_entry(p, &new->child, sibling) {
^
include/linux/kernel.h:963:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
include/linux/list.h:377:2: note: in expansion of macro 'list_entry'
list_entry((ptr)->next, type, member)
^~~~~~~~~~
include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry'
for (pos = list_first_entry(head, typeof(*pos), member); \
^~~~~~~~~~~~~~~~
kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry'
list_for_each_entry(p, &new->child, sibling) {
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/list_add +1005 kernel/resource.c
983
984 /*
985 * Reparent resource children of pr that conflict with res
986 * under res, and make res replace those children.
987 */
988 int reparent_resources(struct resource *parent, struct resource *res)
989 {
990 struct resource *p, *first = NULL;
991
992 list_for_each_entry(p, &parent->child, sibling) {
993 if (p->end < res->start)
994 continue;
995 if (res->end < p->start)
996 break;
997 if (p->start < res->start || p->end > res->end)
998 return -1; /* not completely contained */
999 if (first == NULL)
1000 first = p;
1001 }
1002 if (first == NULL)
1003 return -1; /* didn't find any conflicting entries? */
1004 res->parent = parent;
> 1005 list_add(&res->sibling, &p->sibling.prev);
1006 INIT_LIST_HEAD(&res->child);
1007
1008 /*
1009 * From first to p's previous sibling, they all fall into
1010 * res's region, change them as res's children.
1011 */
1012 list_cut_position(&res->child, first->sibling.prev, res->sibling.prev);
> 1013 list_for_each_entry(p, &new->child, sibling) {
1014 p->parent = new;
1015 pr_debug("PCI: Reparented %s %pR under %s\n",
1016 p->name, p, res->name);
1017 }
1018 return 0;
1019 }
1020 EXPORT_SYMBOL(reparent_resources);
1021
---
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" (6347 bytes)
Powered by blists - more mailing lists