Messages in this thread Patch in this message | | | Date | Sat, 21 Jun 2003 12:51:11 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] Isapnp warning |
| |
Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > > int pnp_add_irq_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) > > > { > > > +#ifdef CONFIG_PCI > > > int i; > > > +#endif > > > > This is far uglier than te warning > > It depends on your goals. These warnings distract us from the real harmful > warnings. Will we ever have a kernel that compiles with -Werror?
It would be nice. But as soon as we do that, some gcc guy will have a brainfart and we'll get a whole new batch of warnings which we cannot turn off. Again. I've been involved in projects where it was unacceptable to upgrade the gcc version for this sole reason.
Meanwhile, let's do this:
diff -puN drivers/pnp/resource.c~misc6 drivers/pnp/resource.c --- 25/drivers/pnp/resource.c~misc6 2003-06-21 12:47:23.000000000 -0700 +++ 25-akpm/drivers/pnp/resource.c 2003-06-21 12:47:44.000000000 -0700 @@ -97,7 +97,6 @@ int pnp_get_max_depnum(struct pnp_dev *d int pnp_add_irq_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { - int i; struct pnp_resources *res; struct pnp_irq *ptr; res = pnp_find_resources(dev,depnum); @@ -113,9 +112,13 @@ int pnp_add_irq_resource(struct pnp_dev else res->irq = data; #ifdef CONFIG_PCI - for (i=0; i<16; i++) - if (data->map & (1<<i)) - pcibios_penalize_isa_irq(i); + { + int i; + + for (i=0; i<16; i++) + if (data->map & (1<<i)) + pcibios_penalize_isa_irq(i); + } #endif return 0; } _
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |