The patch titled Char: mxser_new, compress isa finding has been added to the -mm tree. Its filename is char-mxser_new-compress-isa-finding.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Char: mxser_new, compress isa finding From: Jiri Slaby <jirislaby@xxxxxxxxx> ISA cards finding was too complex -- 2 (module params + predefined) absolutely same routines, join them together with one for loop, one if and one indent level. Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/char/mxser_new.c | 109 +++++++++++++------------------------ 1 file changed, 40 insertions(+), 69 deletions(-) diff -puN drivers/char/mxser_new.c~char-mxser_new-compress-isa-finding drivers/char/mxser_new.c --- a/drivers/char/mxser_new.c~char-mxser_new-compress-isa-finding +++ a/drivers/char/mxser_new.c @@ -2803,7 +2803,8 @@ static int __init mxser_module_init(void { struct pci_dev *pdev = NULL; struct mxser_board *brd; - unsigned int i, m; + unsigned long cap; + unsigned int i, m, isaloop; int retval, b, n; pr_debug("Loading module mxser ...\n"); @@ -2839,84 +2840,54 @@ static int __init mxser_module_init(void m = 0; /* Start finding ISA boards here */ - for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) { - int cap; + for (isaloop = 0; isaloop < 2; isaloop++) + for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) { + if (!isaloop) + cap = mxserBoardCAP[b]; /* predefined */ + else + cap = ioaddr[b]; /* module param */ - if (!(cap = mxserBoardCAP[b])) - continue; - - brd = &mxser_boards[m]; - retval = mxser_get_ISA_conf(cap, brd); - - if (retval != 0) - printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n", - mxser_brdname[brd->board_type - 1], ioaddr[b]); - - if (retval <= 0) { - if (retval == MXSER_ERR_IRQ) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); - else if (retval == MXSER_ERR_IRQ_CONFLIT) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); - else if (retval == MXSER_ERR_VECTOR) - printk(KERN_ERR "Invalid interrupt vector, " - "board not configured\n"); - else if (retval == MXSER_ERR_IOADDR) - printk(KERN_ERR "Invalid I/O address, " - "board not configured\n"); - - continue; - } - - brd->pdev = NULL; + if (!cap) + continue; - /* mxser_initbrd will hook ISR. */ - if (mxser_initbrd(brd) < 0) - continue; + brd = &mxser_boards[m]; + retval = mxser_get_ISA_conf(cap, brd); - m++; - } + if (retval != 0) + printk(KERN_INFO "Found MOXA %s board " + "(CAP=0x%x)\n", + mxser_brdname[brd->board_type - 1], + ioaddr[b]); - /* Start finding ISA boards from module arg */ - for (b = 0; b < MXSER_BOARDS && m < MXSER_BOARDS; b++) { - unsigned long cap; + if (retval <= 0) { + if (retval == MXSER_ERR_IRQ) + printk(KERN_ERR "Invalid interrupt " + "number, board not " + "configured\n"); + else if (retval == MXSER_ERR_IRQ_CONFLIT) + printk(KERN_ERR "Invalid interrupt " + "number, board not " + "configured\n"); + else if (retval == MXSER_ERR_VECTOR) + printk(KERN_ERR "Invalid interrupt " + "vector, board not " + "configured\n"); + else if (retval == MXSER_ERR_IOADDR) + printk(KERN_ERR "Invalid I/O address, " + "board not configured\n"); - if (!(cap = ioaddr[b])) - continue; + continue; + } - brd = &mxser_boards[m]; - retval = mxser_get_ISA_conf(cap, &mxser_boards[m]); + brd->pdev = NULL; - if (retval != 0) - printk(KERN_INFO "Found MOXA %s board (CAP=0x%x)\n", - mxser_brdname[brd->board_type - 1], ioaddr[b]); - - if (retval <= 0) { - if (retval == MXSER_ERR_IRQ) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); - else if (retval == MXSER_ERR_IRQ_CONFLIT) - printk(KERN_ERR "Invalid interrupt number, " - "board not configured\n"); - else if (retval == MXSER_ERR_VECTOR) - printk(KERN_ERR "Invalid interrupt vector, " - "board not configured\n"); - else if (retval == MXSER_ERR_IOADDR) - printk(KERN_ERR "Invalid I/O address, " - "board not configured\n"); + /* mxser_initbrd will hook ISR. */ + if (mxser_initbrd(brd) < 0) + continue; - continue; + m++; } - brd->pdev = NULL; - /* mxser_initbrd will hook ISR. */ - if (mxser_initbrd(brd) < 0) - continue; - - m++; - } - /* start finding PCI board here */ n = ARRAY_SIZE(mxser_pcibrds) - 1; b = 0; _ Patches currently in -mm which might be from jirislaby@xxxxxxxxx are pci-mxser-pci-refcounts.patch mxser-make-an-experimental-clone.patch char-mxser_new-correct-include-file.patch char-mxser_new-upgrade-to-191.patch char-mxser_new-rework-to-allow-dynamic-structs.patch char-mxser_new-use-__devinit-macros.patch char-mxser_new-pci_request_region-for-pci-regions.patch char-mxser_new-check-request_region-retvals.patch char-mxser_new-kill-unneeded-memsets.patch char-mxser_new-revert-spin_lock-changes.patch char-mxser_new-remove-request-for-testers-line.patch char-mxser_new-debug-printk-dependent-on-debug.patch char-mxser_new-alter-license-terms.patch char-mxser_new-code-upside-down.patch char-mxser_new-cmspar-is-defined.patch char-remove-unneded-termbits-redefinitions-mxser_new.patch char-mxser_new-eliminate-tty-ldisc-deref.patch char-mxser_new-testbit-for-bit-testing.patch char-mxser_new-correct-fail-paths.patch char-mxser_new-dont-check-tty_unregister-retval.patch char-mxser_new-compress-isa-finding.patch char-mxser_new-register-tty-devices-on-the-fly.patch char-nozomi-use-tty_wakeup.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html