Messages in this thread Patch in this message | | | Date | Fri, 6 Feb 2004 19:09:56 +0000 | From | viro@parcelfa ... | Subject | Re: IA32 (2.6.2 - 2004-02-05.22.30) - 3 New warnings (gcc 3.2.2) |
| |
On Fri, Feb 06, 2004 at 06:47:07PM +0000, viro@parcelfarce.linux.theplanet.co.uk wrote: > Anyway, in both of those cases BUG() is gratitious. What that code tries > to do is "if we decided to use one of the old modes, we'll need 3 ports; > otherwise we should claim 8". So simple if() would be enough. I'll send > a patch in a few.
Please, apply
diff -urN RC2-bk1-base/drivers/scsi/imm.c RC2-bk1-current/drivers/scsi/imm.c --- RC2-bk1-base/drivers/scsi/imm.c Thu Feb 5 18:48:49 2004 +++ RC2-bk1-current/drivers/scsi/imm.c Fri Feb 6 14:07:08 2004 @@ -1208,19 +1208,10 @@ goto out1; /* now the glue ... */ - switch (dev->mode) { - case IMM_NIBBLE: - case IMM_PS2: + if (dev->mode == IMM_NIBBLE || dev->mode == IMM_PS2) ports = 3; - break; - case IMM_EPP_8: - case IMM_EPP_16: - case IMM_EPP_32: + else ports = 8; - break; - default: /* Never gets here */ - BUG(); - } INIT_WORK(&dev->imm_tq, imm_interrupt, dev); diff -urN RC2-bk1-base/drivers/scsi/ppa.c RC2-bk1-current/drivers/scsi/ppa.c --- RC2-bk1-base/drivers/scsi/ppa.c Thu Feb 5 18:48:57 2004 +++ RC2-bk1-current/drivers/scsi/ppa.c Fri Feb 6 14:07:50 2004 @@ -1069,21 +1069,10 @@ goto out1; /* now the glue ... */ - switch (dev->mode) { - case PPA_NIBBLE: + if (dev->mode == PPA_NIBBLE || dev->mode == PPA_PS2) ports = 3; - break; - case PPA_PS2: - ports = 3; - break; - case PPA_EPP_8: - case PPA_EPP_16: - case PPA_EPP_32: + else ports = 8; - break; - default: /* Never gets here */ - BUG(); - } INIT_WORK(&dev->ppa_tq, ppa_interrupt, dev); - 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/
| |