]> err.no Git - linux-2.6/commitdiff
e100: cleanup unneeded math
authorAuke Kok <auke-jan.h.kok@intel.com>
Wed, 5 Dec 2007 19:57:37 +0000 (11:57 -0800)
committerJeff Garzik <jeff@garzik.org>
Fri, 7 Dec 2007 20:01:44 +0000 (15:01 -0500)
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/e100.c

index 3dbaec680b462de47ff738ed5ab14cbf8cedf111..e1c8a0d023ea13546f5cb4fb006dfa503a874d45 100644 (file)
@@ -2214,13 +2214,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,