On Thu, Nov 11, 2010 at 11:14:42AM +0100, Gerd Hoffmann wrote: > Hi, > > > register_ioport_write (s->port, 1, 1, gus_writeb, s); > > register_ioport_write (s->port, 1, 2, gus_writew, s); > >+ isa_init_ioport_range(dev, s->port, 2); > > > > register_ioport_read ((s->port + 0x100)& 0xf00, 1, 1, gus_readb, s); > > register_ioport_read ((s->port + 0x100)& 0xf00, 1, 2, gus_readw, s); > >+ isa_init_ioport_range(dev, (s->port + 0x100)& 0xf00, 2); > > > > register_ioport_write (s->port + 6, 10, 1, gus_writeb, s); > > register_ioport_write (s->port + 6, 10, 2, gus_writew, s); > > register_ioport_read (s->port + 6, 10, 1, gus_readb, s); > > register_ioport_read (s->port + 6, 10, 2, gus_readw, s); > >+ isa_init_ioport_range(dev, s->port + 6, 10); > > > > > > register_ioport_write (s->port + 0x100, 8, 1, gus_writeb, s); > > register_ioport_write (s->port + 0x100, 8, 2, gus_writew, s); > > register_ioport_read (s->port + 0x100, 8, 1, gus_readb, s); > > register_ioport_read (s->port + 0x100, 8, 2, gus_readw, s); > >+ isa_init_ioport_range(dev, s->port + 0x100, 8); > > Seeing all the duplication here and elsewhere ... > > How about moving the register_ioport_{read,write} calls into > isa_init_ioport_range() ? > I am waiting for Avi's "Type-safe ioport callbacks" series to be applied before cleaning this up. With that patch what you propose will come naturally. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html