Re: [kbuild-all] [PATCH v6 2/4] resource: Use list_head to link sibling resource
On 07/10/18 at 08:59am, Ye Xiaolong wrote: > Hi, > > On 07/08, Baoquan He wrote: > >Hi, > > > >On 07/05/18 at 01:00am, kbuild test robot wrote: > >> Hi Baoquan, > >> > >> I love your patch! Yet something to improve: > >> > >> [auto build test ERROR on linus/master] > >> [also build test ERROR on v4.18-rc3 next-20180704] > >> [if your patch is applied to the wrong git tree, please drop us a note to > >> help improve the system] > > > >Thanks for telling. > > > >I cloned 0day-ci/linut to my local pc. > >https://github.com/0day-ci/linux.git > > > >However, I didn't find below branch. And tried to open it in web > >broswer, also failed. > > > > Sorry for the inconvenience, 0day bot didn't push the branch to github > successfully, > Just push it manually, you can have a try again. Thanks, Xiaolong, I have applied them on top of linux-next/master, and copy the config file attached, and run the command to reproduce as suggested. Now I have fixed all those issues reported, will repost. > > > > >> url: > >> https://github.com/0day-ci/linux/commits/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180704-121402 > >> config: mips-rb532_defconfig (attached as .config) > >> compiler: mipsel-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 > >> reproduce: > >> wget > >> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross > >> -O ~/bin/make.cross > >> chmod +x ~/bin/make.cross > >> # save the attached .config to linux build tree > >> GCC_VERSION=7.2.0 make.cross ARCH=mips > > > >I did find a old one which is for the old version 5 post. > > > >[bhe@linux]$ git remote -v > >0day-ci https://github.com/0day-ci/linux.git (fetch) > >0day-ci https://github.com/0day-ci/linux.git (push) > >[bhe@dhcp-128-28 linux]$ git branch -a| grep Baoquan| grep resource > > > > remotes/0day-ci/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 > > > >Could you help have a look at this? > > > >Thanks > >Baoquan > > > >> > >> All error/warnings (new ones prefixed by >>): > >> > >> >> arch/mips/pci/pci-rc32434.c:57:11: error: initialization from > >> >> incompatible pointer type [-Werror=incompatible-pointer-types] > >> .child = _res_pci_mem2 > >> ^ > >>arch/mips/pci/pci-rc32434.c:57:11: note: (near initialization for > >> 'rc32434_res_pci_mem1.child.next') > >> >> arch/mips/pci/pci-rc32434.c:51:47: warning: missing braces around > >> >> initializer [-Wmissing-braces] > >> static struct resource rc32434_res_pci_mem1 = { > >> ^ > >>arch/mips/pci/pci-rc32434.c:60:47: warning: missing braces around > >> initializer [-Wmissing-braces] > >> static struct resource rc32434_res_pci_mem2 = { > >> ^ > >>cc1: some warnings being treated as errors > >> > >> vim +57 arch/mips/pci/pci-rc32434.c > >> > >> 73b4390f Ralf Baechle 2008-07-16 50 > >> 73b4390f Ralf Baechle 2008-07-16 @51 static struct resource > >> rc32434_res_pci_mem1 = { > >> 73b4390f Ralf Baechle 2008-07-16 52 .name = "PCI MEM1", > >> 73b4390f Ralf Baechle 2008-07-16 53 .start = 0x5000, > >> 73b4390f Ralf Baechle 2008-07-16 54 .end = 0x5FFF, > >> 73b4390f Ralf Baechle 2008-07-16 55 .flags = IORESOURCE_MEM, > >> 73b4390f Ralf Baechle 2008-07-16 56 .sibling = NULL, > >> 73b4390f Ralf Baechle 2008-07-16 @57 .child = _res_pci_mem2 > >> 73b4390f Ralf Baechle 2008-07-16 58 }; > >> 73b4390f Ralf Baechle 2008-07-16 59 > >> > >> :: The code at line 57 was first introduced by commit > >> :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: > >> Support for base system > >> > >> :: TO: Ralf Baechle > >> :: CC: Ralf Baechle > >> > >> --- > >> 0-DAY kernel test infrastructureOpen Source Technology > >> Center > >> https://lists.01.org/pipermail/kbuild-all Intel > >> Corporation > > > > > >___ > >kbuild-all mailing list > >kbuild-...@lists.01.org > >https://lists.01.org/mailman/listinfo/kbuild-all
Re: [kbuild-all] [PATCH v6 2/4] resource: Use list_head to link sibling resource
Hi, On 07/08, Baoquan He wrote: >Hi, > >On 07/05/18 at 01:00am, kbuild test robot wrote: >> Hi Baoquan, >> >> I love your patch! Yet something to improve: >> >> [auto build test ERROR on linus/master] >> [also build test ERROR on v4.18-rc3 next-20180704] >> [if your patch is applied to the wrong git tree, please drop us a note to >> help improve the system] > >Thanks for telling. > >I cloned 0day-ci/linut to my local pc. >https://github.com/0day-ci/linux.git > >However, I didn't find below branch. And tried to open it in web >broswer, also failed. > Sorry for the inconvenience, 0day bot didn't push the branch to github successfully, Just push it manually, you can have a try again. Thanks, Xiaolong > >> url: >> https://github.com/0day-ci/linux/commits/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180704-121402 >> config: mips-rb532_defconfig (attached as .config) >> compiler: mipsel-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 >> reproduce: >> wget >> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O >> ~/bin/make.cross >> chmod +x ~/bin/make.cross >> # save the attached .config to linux build tree >> GCC_VERSION=7.2.0 make.cross ARCH=mips > >I did find a old one which is for the old version 5 post. > >[bhe@linux]$ git remote -v >0day-cihttps://github.com/0day-ci/linux.git (fetch) >0day-cihttps://github.com/0day-ci/linux.git (push) >[bhe@dhcp-128-28 linux]$ git branch -a| grep Baoquan| grep resource > > remotes/0day-ci/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 > >Could you help have a look at this? > >Thanks >Baoquan > >> >> All error/warnings (new ones prefixed by >>): >> >> >> arch/mips/pci/pci-rc32434.c:57:11: error: initialization from >> >> incompatible pointer type [-Werror=incompatible-pointer-types] >> .child = _res_pci_mem2 >> ^ >>arch/mips/pci/pci-rc32434.c:57:11: note: (near initialization for >> 'rc32434_res_pci_mem1.child.next') >> >> arch/mips/pci/pci-rc32434.c:51:47: warning: missing braces around >> >> initializer [-Wmissing-braces] >> static struct resource rc32434_res_pci_mem1 = { >> ^ >>arch/mips/pci/pci-rc32434.c:60:47: warning: missing braces around >> initializer [-Wmissing-braces] >> static struct resource rc32434_res_pci_mem2 = { >> ^ >>cc1: some warnings being treated as errors >> >> vim +57 arch/mips/pci/pci-rc32434.c >> >> 73b4390f Ralf Baechle 2008-07-16 50 >> 73b4390f Ralf Baechle 2008-07-16 @51 static struct resource >> rc32434_res_pci_mem1 = { >> 73b4390f Ralf Baechle 2008-07-16 52 .name = "PCI MEM1", >> 73b4390f Ralf Baechle 2008-07-16 53 .start = 0x5000, >> 73b4390f Ralf Baechle 2008-07-16 54 .end = 0x5FFF, >> 73b4390f Ralf Baechle 2008-07-16 55 .flags = IORESOURCE_MEM, >> 73b4390f Ralf Baechle 2008-07-16 56 .sibling = NULL, >> 73b4390f Ralf Baechle 2008-07-16 @57 .child = _res_pci_mem2 >> 73b4390f Ralf Baechle 2008-07-16 58 }; >> 73b4390f Ralf Baechle 2008-07-16 59 >> >> :: The code at line 57 was first introduced by commit >> :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: >> Support for base system >> >> :: TO: Ralf Baechle >> :: CC: Ralf Baechle >> >> --- >> 0-DAY kernel test infrastructureOpen Source Technology Center >> https://lists.01.org/pipermail/kbuild-all Intel Corporation > > >___ >kbuild-all mailing list >kbuild-...@lists.01.org >https://lists.01.org/mailman/listinfo/kbuild-all
Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource
On 07/08/18 at 08:48pm, Andy Shevchenko wrote: > On Sun, Jul 8, 2018 at 5:59 AM, Baoquan He wrote: > > On 07/05/18 at 01:00am, kbuild test robot wrote: > > > However, I didn't find below branch. And tried to open it in web > > broswer, also failed. > > While this is kinda valid point... > > > Could you help have a look at this? > > ...isn't obvious that you didn't change the file mentioned in a report? > Just take latest linux-next and you will see. Yes, it's clear to me. Just want to use the way to cross compile them on ia64 and mips, hope I can find out all missed places on these ARCHes. Now I think I can apply patches on linux-next, and use the config attached to compile. Thanks. > > > >> All error/warnings (new ones prefixed by >>): > >> > >> >> arch/mips/pci/pci-rc32434.c:57:11: error: initialization from > >> >> incompatible pointer type [-Werror=incompatible-pointer-types] > >> .child = _res_pci_mem2 > >> ^ > >>arch/mips/pci/pci-rc32434.c:57:11: note: (near initialization for > >> 'rc32434_res_pci_mem1.child.next') > >> >> arch/mips/pci/pci-rc32434.c:51:47: warning: missing braces around > >> >> initializer [-Wmissing-braces] > >> static struct resource rc32434_res_pci_mem1 = { > >> ^ > >>arch/mips/pci/pci-rc32434.c:60:47: warning: missing braces around > >> initializer [-Wmissing-braces] > >> static struct resource rc32434_res_pci_mem2 = { > >> ^ > >>cc1: some warnings being treated as errors > >> > >> vim +57 arch/mips/pci/pci-rc32434.c > >> > >> 73b4390f Ralf Baechle 2008-07-16 50 > >> 73b4390f Ralf Baechle 2008-07-16 @51 static struct resource > >> rc32434_res_pci_mem1 = { > >> 73b4390f Ralf Baechle 2008-07-16 52 .name = "PCI MEM1", > >> 73b4390f Ralf Baechle 2008-07-16 53 .start = 0x5000, > >> 73b4390f Ralf Baechle 2008-07-16 54 .end = 0x5FFF, > >> 73b4390f Ralf Baechle 2008-07-16 55 .flags = IORESOURCE_MEM, > >> 73b4390f Ralf Baechle 2008-07-16 56 .sibling = NULL, > >> 73b4390f Ralf Baechle 2008-07-16 @57 .child = > >> _res_pci_mem2 > >> 73b4390f Ralf Baechle 2008-07-16 58 }; > >> 73b4390f Ralf Baechle 2008-07-16 59 > >> > >> :: The code at line 57 was first introduced by commit > >> :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: > >> Support for base system > >> > >> :: TO: Ralf Baechle > >> :: CC: Ralf Baechle > >> > >> --- > >> 0-DAY kernel test infrastructureOpen Source Technology > >> Center > >> https://lists.01.org/pipermail/kbuild-all Intel > >> Corporation > > > > > > > > -- > With Best Regards, > Andy Shevchenko
Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource
On Sun, Jul 8, 2018 at 5:59 AM, Baoquan He wrote: > On 07/05/18 at 01:00am, kbuild test robot wrote: > However, I didn't find below branch. And tried to open it in web > broswer, also failed. While this is kinda valid point... > Could you help have a look at this? ...isn't obvious that you didn't change the file mentioned in a report? Just take latest linux-next and you will see. >> All error/warnings (new ones prefixed by >>): >> >> >> arch/mips/pci/pci-rc32434.c:57:11: error: initialization from >> >> incompatible pointer type [-Werror=incompatible-pointer-types] >> .child = _res_pci_mem2 >> ^ >>arch/mips/pci/pci-rc32434.c:57:11: note: (near initialization for >> 'rc32434_res_pci_mem1.child.next') >> >> arch/mips/pci/pci-rc32434.c:51:47: warning: missing braces around >> >> initializer [-Wmissing-braces] >> static struct resource rc32434_res_pci_mem1 = { >> ^ >>arch/mips/pci/pci-rc32434.c:60:47: warning: missing braces around >> initializer [-Wmissing-braces] >> static struct resource rc32434_res_pci_mem2 = { >> ^ >>cc1: some warnings being treated as errors >> >> vim +57 arch/mips/pci/pci-rc32434.c >> >> 73b4390f Ralf Baechle 2008-07-16 50 >> 73b4390f Ralf Baechle 2008-07-16 @51 static struct resource >> rc32434_res_pci_mem1 = { >> 73b4390f Ralf Baechle 2008-07-16 52 .name = "PCI MEM1", >> 73b4390f Ralf Baechle 2008-07-16 53 .start = 0x5000, >> 73b4390f Ralf Baechle 2008-07-16 54 .end = 0x5FFF, >> 73b4390f Ralf Baechle 2008-07-16 55 .flags = IORESOURCE_MEM, >> 73b4390f Ralf Baechle 2008-07-16 56 .sibling = NULL, >> 73b4390f Ralf Baechle 2008-07-16 @57 .child = _res_pci_mem2 >> 73b4390f Ralf Baechle 2008-07-16 58 }; >> 73b4390f Ralf Baechle 2008-07-16 59 >> >> :: The code at line 57 was first introduced by commit >> :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: >> Support for base system >> >> :: TO: Ralf Baechle >> :: CC: Ralf Baechle >> >> --- >> 0-DAY kernel test infrastructureOpen Source Technology Center >> https://lists.01.org/pipermail/kbuild-all Intel Corporation > > -- With Best Regards, Andy Shevchenko
Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource
Hi, On 07/05/18 at 01:00am, kbuild test robot wrote: > Hi Baoquan, > > I love your patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v4.18-rc3 next-20180704] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] Thanks for telling. I cloned 0day-ci/linut to my local pc. https://github.com/0day-ci/linux.git However, I didn't find below branch. And tried to open it in web broswer, also failed. > url: > https://github.com/0day-ci/linux/commits/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180704-121402 > config: mips-rb532_defconfig (attached as .config) > compiler: mipsel-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 > reproduce: > wget > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O > ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=7.2.0 make.cross ARCH=mips I did find a old one which is for the old version 5 post. [bhe@linux]$ git remote -v 0day-ci https://github.com/0day-ci/linux.git (fetch) 0day-ci https://github.com/0day-ci/linux.git (push) [bhe@dhcp-128-28 linux]$ git branch -a| grep Baoquan| grep resource remotes/0day-ci/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 Could you help have a look at this? Thanks Baoquan > > All error/warnings (new ones prefixed by >>): > > >> arch/mips/pci/pci-rc32434.c:57:11: error: initialization from incompatible > >> pointer type [-Werror=incompatible-pointer-types] > .child = _res_pci_mem2 > ^ >arch/mips/pci/pci-rc32434.c:57:11: note: (near initialization for > 'rc32434_res_pci_mem1.child.next') > >> arch/mips/pci/pci-rc32434.c:51:47: warning: missing braces around > >> initializer [-Wmissing-braces] > static struct resource rc32434_res_pci_mem1 = { > ^ >arch/mips/pci/pci-rc32434.c:60:47: warning: missing braces around > initializer [-Wmissing-braces] > static struct resource rc32434_res_pci_mem2 = { > ^ >cc1: some warnings being treated as errors > > vim +57 arch/mips/pci/pci-rc32434.c > > 73b4390f Ralf Baechle 2008-07-16 50 > 73b4390f Ralf Baechle 2008-07-16 @51 static struct resource > rc32434_res_pci_mem1 = { > 73b4390f Ralf Baechle 2008-07-16 52 .name = "PCI MEM1", > 73b4390f Ralf Baechle 2008-07-16 53 .start = 0x5000, > 73b4390f Ralf Baechle 2008-07-16 54 .end = 0x5FFF, > 73b4390f Ralf Baechle 2008-07-16 55 .flags = IORESOURCE_MEM, > 73b4390f Ralf Baechle 2008-07-16 56 .sibling = NULL, > 73b4390f Ralf Baechle 2008-07-16 @57 .child = _res_pci_mem2 > 73b4390f Ralf Baechle 2008-07-16 58 }; > 73b4390f Ralf Baechle 2008-07-16 59 > > :: The code at line 57 was first introduced by commit > :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: > Support for base system > > :: TO: Ralf Baechle > :: CC: Ralf Baechle > > --- > 0-DAY kernel test infrastructureOpen Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH v6 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.18-rc3 next-20180704] [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/20180704-121402 config: ia64-allnoconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=ia64 All errors (new ones prefixed by >>): arch/ia64/sn/kernel/io_init.c: In function 'sn_io_slot_fixup': >> arch/ia64/sn/kernel/io_init.c:195:19: error: invalid operands to binary && >> (have 'int' and 'struct list_head') if (res->parent && res->parent->child) ~~~ ^~ ~~ vim +195 arch/ia64/sn/kernel/io_init.c ^1da177e Linus Torvalds 2005-04-16 142 3ec829b6 John Keller 2005-11-29 143 /* 6f09a925 John Keller 2007-01-30 144 * sn_io_slot_fixup() - We are not running with an ACPI capable PROM, 8ea6091f John Keller 2006-10-04 145 * and need to convert the pci_dev->resource 8ea6091f John Keller 2006-10-04 146 * 'start' and 'end' addresses to mapped addresses, 8ea6091f John Keller 2006-10-04 147 * and setup the pci_controller->window array entries. ^1da177e Linus Torvalds 2005-04-16 148 */ 8ea6091f John Keller 2006-10-04 149 void 6f09a925 John Keller 2007-01-30 150 sn_io_slot_fixup(struct pci_dev *dev) ^1da177e Linus Torvalds 2005-04-16 151 { ^1da177e Linus Torvalds 2005-04-16 152int idx; ab97b8cc Bjorn Helgaas 2016-03-02 153struct resource *res; 18c25526 Matt Fleming2016-05-04 154unsigned long size; 6f09a925 John Keller 2007-01-30 155struct pcidev_info *pcidev_info; 6f09a925 John Keller 2007-01-30 156struct sn_irq_info *sn_irq_info; 6f09a925 John Keller 2007-01-30 157int status; 6f09a925 John Keller 2007-01-30 158 6f09a925 John Keller 2007-01-30 159pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL); 6f09a925 John Keller 2007-01-30 160if (!pcidev_info) d4ed8084 Harvey Harrison 2008-03-04 161panic("%s: Unable to alloc memory for pcidev_info", __func__); 6f09a925 John Keller 2007-01-30 162 6f09a925 John Keller 2007-01-30 163sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL); 6f09a925 John Keller 2007-01-30 164if (!sn_irq_info) d4ed8084 Harvey Harrison 2008-03-04 165panic("%s: Unable to alloc memory for sn_irq_info", __func__); 6f09a925 John Keller 2007-01-30 166 6f09a925 John Keller 2007-01-30 167/* Call to retrieve pci device information needed by kernel. */ 6f09a925 John Keller 2007-01-30 168status = sal_get_pcidev_info((u64) pci_domain_nr(dev), 6f09a925 John Keller 2007-01-30 169(u64) dev->bus->number, 6f09a925 John Keller 2007-01-30 170dev->devfn, 6f09a925 John Keller 2007-01-30 171(u64) __pa(pcidev_info), 6f09a925 John Keller 2007-01-30 172(u64) __pa(sn_irq_info)); 6f09a925 John Keller 2007-01-30 173 80a03e29 Stoyan Gaydarov 2009-03-10 174BUG_ON(status); /* Cannot get platform pci device information */ 6f09a925 John Keller 2007-01-30 175 3ec829b6 John Keller 2005-11-29 176 ^1da177e Linus Torvalds 2005-04-16 177/* Copy over PIO Mapped Addresses */ ^1da177e Linus Torvalds 2005-04-16 178for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) { ab97b8cc Bjorn Helgaas 2016-03-02 179if (!pcidev_info->pdi_pio_mapped_addr[idx]) ^1da177e Linus Torvalds 2005-04-16 180continue; ^1da177e Linus Torvalds 2005-04-16 181 ab97b8cc Bjorn Helgaas 2016-03-02 182res = >resource[idx]; ab97b8cc Bjorn Helgaas 2016-03-02 183 ab97b8cc Bjorn Helgaas 2016-03-02 184size = res->end - res->start; ab97b8cc Bjorn Helgaas 2016-03-02 185if (size == 0) 3ec829b6 John Keller 2005-11-29 186continue; ab97b8cc Bjorn Helgaas 2016-03-02 187 240504ad Bjorn Helgaas 2016-03-02 188res->start = pcidev_info->pdi_pio_mapped_addr[idx]; 18c25526 Matt Fleming2016-05-04 189res->end = res->start + size; 64715725 Bernhard Walle 2007-03-18 190 64715725 Bernhard Walle 2007-03-18 191/* 64715725 Bernhard Walle 2007-03-18 192 * if it's already in the device structure, remove it before 64715725 Bernhard Walle 2007-03-18
Re: [PATCH v6 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.18-rc3 next-20180704] [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/20180704-121402 config: mips-rb532_defconfig (attached as .config) compiler: mipsel-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=mips All error/warnings (new ones prefixed by >>): >> arch/mips/pci/pci-rc32434.c:57:11: error: initialization from incompatible >> pointer type [-Werror=incompatible-pointer-types] .child = _res_pci_mem2 ^ arch/mips/pci/pci-rc32434.c:57:11: note: (near initialization for 'rc32434_res_pci_mem1.child.next') >> arch/mips/pci/pci-rc32434.c:51:47: warning: missing braces around >> initializer [-Wmissing-braces] static struct resource rc32434_res_pci_mem1 = { ^ arch/mips/pci/pci-rc32434.c:60:47: warning: missing braces around initializer [-Wmissing-braces] static struct resource rc32434_res_pci_mem2 = { ^ cc1: some warnings being treated as errors vim +57 arch/mips/pci/pci-rc32434.c 73b4390f Ralf Baechle 2008-07-16 50 73b4390f Ralf Baechle 2008-07-16 @51 static struct resource rc32434_res_pci_mem1 = { 73b4390f Ralf Baechle 2008-07-16 52.name = "PCI MEM1", 73b4390f Ralf Baechle 2008-07-16 53.start = 0x5000, 73b4390f Ralf Baechle 2008-07-16 54.end = 0x5FFF, 73b4390f Ralf Baechle 2008-07-16 55.flags = IORESOURCE_MEM, 73b4390f Ralf Baechle 2008-07-16 56.sibling = NULL, 73b4390f Ralf Baechle 2008-07-16 @57.child = _res_pci_mem2 73b4390f Ralf Baechle 2008-07-16 58 }; 73b4390f Ralf Baechle 2008-07-16 59 :: The code at line 57 was first introduced by commit :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: Support for base system :: TO: Ralf Baechle :: CC: Ralf Baechle --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[PATCH v6 2/4] resource: Use list_head to link sibling resource
The struct resource uses singly linked list to link siblings, implemented by pointer operation. Replace it with list_head for better code readability. Based on this list_head replacement, it will be very easy to do reverse iteration on iomem_resource's sibling list in later patch. Besides, type of member variables of struct resource, sibling and child, are changed from 'struct resource *' to 'struct list_head'. This brings two pointers of size increase. Suggested-by: Andrew Morton Signed-off-by: Baoquan He Cc: Patrik Jakobsson Cc: David Airlie Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Dmitry Torokhov Cc: Dan Williams Cc: Rob Herring Cc: Frank Rowand Cc: Keith Busch Cc: Jonathan Derrick Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thomas Gleixner Cc: Brijesh Singh Cc: "Jérôme Glisse" Cc: Borislav Petkov Cc: Tom Lendacky Cc: Greg Kroah-Hartman Cc: Yaowei Bai Cc: Wei Yang Cc: de...@linuxdriverproject.org Cc: linux-in...@vger.kernel.org Cc: linux-nvd...@lists.01.org Cc: devicet...@vger.kernel.org Cc: linux-...@vger.kernel.org --- arch/arm/plat-samsung/pm-check.c| 6 +- arch/microblaze/pci/pci-common.c| 4 +- arch/powerpc/kernel/pci-common.c| 4 +- arch/sparc/kernel/ioport.c | 2 +- arch/xtensa/include/asm/pci-bridge.h| 4 +- drivers/eisa/eisa-bus.c | 2 + drivers/gpu/drm/drm_memory.c| 3 +- drivers/gpu/drm/gma500/gtt.c| 5 +- drivers/hv/vmbus_drv.c | 52 +++ drivers/input/joystick/iforce/iforce-main.c | 4 +- drivers/nvdimm/namespace_devs.c | 6 +- drivers/nvdimm/nd.h | 5 +- drivers/of/address.c| 4 +- drivers/parisc/lba_pci.c| 4 +- drivers/pci/controller/vmd.c| 8 +- drivers/pci/probe.c | 2 + drivers/pci/setup-bus.c | 2 +- include/linux/ioport.h | 17 ++- kernel/resource.c | 208 ++-- 19 files changed, 175 insertions(+), 167 deletions(-) diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c index cd2c02c68bc3..5494355b1c49 100644 --- a/arch/arm/plat-samsung/pm-check.c +++ b/arch/arm/plat-samsung/pm-check.c @@ -46,8 +46,8 @@ typedef u32 *(run_fn_t)(struct resource *ptr, u32 *arg); static void s3c_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg) { while (ptr != NULL) { - if (ptr->child != NULL) - s3c_pm_run_res(ptr->child, fn, arg); + if (!list_empty(>child)) + s3c_pm_run_res(resource_first_child(>child), fn, arg); if ((ptr->flags & IORESOURCE_SYSTEM_RAM) == IORESOURCE_SYSTEM_RAM) { @@ -57,7 +57,7 @@ static void s3c_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg) arg = (fn)(ptr, arg); } - ptr = ptr->sibling; + ptr = resource_sibling(ptr); } } diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 7899bafab064..2bf73e27e231 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c @@ -533,7 +533,9 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose, res->flags = range.flags; res->start = range.cpu_addr; res->end = range.cpu_addr + range.size - 1; - res->parent = res->child = res->sibling = NULL; + res->parent = NULL; + INIT_LIST_HEAD(>child); + INIT_LIST_HEAD(>sibling); } } diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 926035bb378d..28fbe83c9daf 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -761,7 +761,9 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose, res->flags = range.flags; res->start = range.cpu_addr; res->end = range.cpu_addr + range.size - 1; - res->parent = res->child = res->sibling = NULL; + res->parent = NULL; + INIT_LIST_HEAD(>child); + INIT_LIST_HEAD(>sibling); } } } diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index cca9134cfa7d..99efe4e98b16 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c @@ -669,7 +669,7 @@ static int sparc_io_proc_show(struct seq_file *m, void *v) struct resource *root = m->private, *r; const char *nm; - for (r = root->child; r != NULL; r = r->sibling) { + list_for_each_entry(r,