mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: Mike Phillips <mikep@linuxtr.net>
Cc: linux-kernel@vger.kernel.org, linux-tr@linuxtr.net,
	linux-net@vger.kernel.org
Subject: [2.5 patch] 3c359.c: remove comparison that is always true
Date: Fri, 20 Jun 2003 02:20:19 +0200	[thread overview]
Message-ID: <20030620002019.GJ29247@fs.tum.de> (raw)

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)

                 reply	other threads:[~2003-06-20  0:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030620002019.GJ29247@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=linux-tr@linuxtr.net \
    --cc=mikep@linuxtr.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®