netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH] remove redundant check in de2104x ->get_regs()
Date: Fri, 16 Apr 2004 15:37:54 -0700	[thread overview]
Message-ID: <20040416153754.U21045@build.pdx.osdl.net> (raw)

Hi Jeff,

Trivial patchlet...ethtool core already caps regs.len at a max of
->get_regs_len():

	reglen = ops->get_regs_len(dev);
	if (regs.len > reglen)
		regs.len = reglen;

So doing the same in the in de2104x driver ->get_regs() is redundant.
Patch below simply removes it to clarify the guarantee of the API.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

===== drivers/net/tulip/de2104x.c 1.29 vs edited =====
--- 1.29/drivers/net/tulip/de2104x.c	Wed Mar 17 11:32:53 2004
+++ edited/drivers/net/tulip/de2104x.c	Fri Apr 16 15:31:55 2004
@@ -1676,8 +1676,6 @@
 {
 	struct de_private *de = dev->priv;
 
-	if (regs->len > DE_REGS_SIZE)
-		regs->len = DE_REGS_SIZE;
 	regs->version = (DE_REGS_VER << 2) | de->de21040;
 
 	spin_lock_irq(&de->lock);

             reply	other threads:[~2004-04-16 22:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16 22:37 Chris Wright [this message]
2004-04-19 16:38 ` [PATCH] remove redundant check in de2104x ->get_regs() Jeff Garzik

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=20040416153754.U21045@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).