[2.5 patch] 3c359.c: remove comparison that is always true

Adrian Bunk (bunk@fs.tum.de)
Fri, 20 Jun 2003 02:20:19 +0200


The patch below removes a comparison that is always true.

i is defined as u16, IOW it obviously can't be > 0xffff.

I don't know whether this patch is correct. The correct fix might be
different but the current code is definitely broken.

cu
Adrian

--- linux-2.5.72-mm2/drivers/net/tokenring/3c359.c.old 2003-06-20 02:12:45.000000000 +0200
+++ linux-2.5.72-mm2/drivers/net/tokenring/3c359.c 2003-06-20 02:15:36.000000000 +0200
@@ -464,7 +464,7 @@

printk(KERN_INFO "3C359: Uploading Microcode: ");

- for (i = start,j=0; (j < mc_size && i <= 0xffff) ; i++,j++) {
+ for (i = start,j=0; j < mc_size; i++,j++) {
writel(MEM_BYTE_WRITE | 0XD0000 | i, xl_mmio + MMIO_MAC_ACCESS_CMD) ;
writeb(microcode[j],xl_mmio + MMIO_MACDATA) ;
if (j % 1024 == 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/