mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.5 patch] 3c359.c: remove comparison that is always true
@ 2003-06-20  0:20 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2003-06-20  0:20 UTC (permalink / raw)
  To: Mike Phillips; +Cc: linux-kernel, linux-tr, linux-net

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-20  0:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-20  0:20 [2.5 patch] 3c359.c: remove comparison that is always true Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®