From: Auke Kok <auke-jan.h.kok@intel.com>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, 12o3l@tiscali.nl
Subject: [PATCH 2/2] e100: cleanup unneeded math
Date: Wed, 05 Dec 2007 11:57:37 -0800 [thread overview]
Message-ID: <20071205195737.6859.11168.stgit@localhost.localdomain> (raw)
In-Reply-To: <20071205195729.6859.97796.stgit@localhost.localdomain>
No need to convert to bytes and back - cleanup unneeded code.
Adapted from fix from 'Roel Kluin <12o3l@tiscali.nl>'
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
drivers/net/e100.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 9189aff..27f4d4a 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2284,13 +2284,11 @@ static void e100_get_drvinfo(struct net_device *netdev,
strcpy(info->bus_info, pci_name(nic->pdev));
}
+#define E100_PHY_REGS 0x1C
static int e100_get_regs_len(struct net_device *netdev)
{
struct nic *nic = netdev_priv(netdev);
-#define E100_PHY_REGS 0x1C
-#define E100_REGS_LEN 1 + E100_PHY_REGS + \
- sizeof(nic->mem->dump_buf) / sizeof(u32)
- return E100_REGS_LEN * sizeof(u32);
+ return 1 + E100_PHY_REGS + sizeof(nic->mem->dump_buf);
}
static void e100_get_regs(struct net_device *netdev,
next prev parent reply other threads:[~2007-12-05 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 19:57 [PATCH 1/2] e1000: fix memcpy in e1000_get_strings Auke Kok
2007-12-05 19:57 ` Auke Kok [this message]
2007-12-07 20:03 ` 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=20071205195737.6859.11168.stgit@localhost.localdomain \
--to=auke-jan.h.kok@intel.com \
--cc=12o3l@tiscali.nl \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.