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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux