Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abf9b902 authored by Auke Kok's avatar Auke Kok Committed by Jeff Garzik
Browse files

e100: cleanup unneeded math



No need to convert to bytes and back - cleanup unneeded code.

Adapted from fix from 'Roel Kluin <12o3l@tiscali.nl>'

Signed-off-by: default avatarAuke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent c32bc6e9
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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,