On Friday 18 April 2008 4:29:15 pm Rene Herman wrote: > On 18-04-08 22:50, Bjorn Helgaas wrote: > > Move the common part of pnp_init_resource_table() and > > pnp_clean_resource_table() into a new pnp_init_resource(). > > This reduces a little code duplication and will be > > useful later to initialize an individual resource. > > This can't be right, can it? : > > +void pnp_init_resource(struct resource *res) > > +{ > > + unsigned long type; > > + > > + type = res->flags & (IORESOURCE_IO | IORESOURCE_MEM | > > + IORESOURCE_IRQ | IORESOURCE_DMA); > > + > > + res->name = NULL; > > + res->flags = type | IORESOURCE_AUTO | IORESOURCE_UNSET; > > + if (type == IORESOURCE_IRQ || type == IORESOURCE_DMA) { > > + res->start = -1; > > + res->end = -1; > > + } else { > > + res->start = 0; > > + res->end = 0; > > + } > > +} > > This depends on the type already being set in res->flags, yet: Yep, you're right. I fixed it, but it requires changes to a couple other patches down the line, so I'll wait to repost the series until next week in case you find more problems. I think this is only a problem for bisection. By the time you apply the whole series, we start with an empty resource list, and every time we add one, we set the type in pnp_new_resource(). That makes me wonder whether pnp_init_resources() should just free the whole list, so we just start again with an empty list. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html