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

Commit 5ae297b0 authored by françois romieu's avatar françois romieu Committed by David S. Miller
Browse files

via-velocity : cleanups.



- empty lines
- tabs / spaces
- ETHTOOL_GWOL _is_ defined
- useless cast from void *

Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ad66fa7a
Loading
Loading
Loading
Loading
+25 −46
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@
 *
 */


#include <linux/module.h>
#include <linux/types.h>
#include <linux/bitops.h>
@@ -112,7 +111,6 @@ static void mac_get_cam_mask(struct mac_regs __iomem *regs, u8 *mask)
	BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, &regs->CAMCR);
}


/**
 *	mac_set_cam_mask	-	Set a CAM mask
 *	@regs: register block for this velocity
@@ -700,7 +698,6 @@ static int velocity_mii_read(struct mac_regs __iomem *regs, u8 index, u16 *data)
	return 0;
}


/**
 *	mii_check_media_mode	-	check media state
 *	@regs: velocity registers
@@ -866,8 +863,6 @@ static u32 check_connection_type(struct mac_regs __iomem *regs)
	return status;
}



/**
 *	velocity_set_media_mode		-	set media mode
 *	@mii_status: old MII link state
@@ -1262,6 +1257,7 @@ static void setup_queue_timers(struct velocity_info *vptr)
		writeb(rxqueue_timer, &vptr->mac_regs->RQETMR);
	}
}

/**
 * setup_adaptive_interrupts  -  Setup interrupt suppression
 *
@@ -1601,8 +1597,6 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
	vptr->rx.info = NULL;
}



/**
 *	velocity_init_rd_ring	-	set up receive ring
 *	@vptr: velocity to configure
@@ -1676,7 +1670,6 @@ static void velocity_free_dma_rings(struct velocity_info *vptr)
	pci_free_consistent(vptr->pdev, size, vptr->rx.ring, vptr->rx.pool_dma);
}


static int velocity_init_rings(struct velocity_info *vptr, int mtu)
{
	int ret;
@@ -1739,7 +1732,6 @@ static void velocity_free_tx_buf(struct velocity_info *vptr,
	tdinfo->skb = NULL;
}


/*
 *	FIXME: could we merge this with velocity_free_tx_buf ?
 */
@@ -1787,7 +1779,6 @@ static void velocity_free_td_ring(struct velocity_info *vptr)
	}
}


static void velocity_free_rings(struct velocity_info *vptr)
{
	velocity_free_td_ring(vptr);
@@ -2025,7 +2016,6 @@ static inline void velocity_iph_realign(struct velocity_info *vptr,
	}
}


/**
 *	velocity_receive_frame	-	received packet processor
 *	@vptr: velocity we are handling
@@ -2097,7 +2087,6 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
	return 0;
}


/**
 *	velocity_rx_srv		-	service RX interrupt
 *	@vptr: velocity
@@ -2405,7 +2394,6 @@ static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd
	return 0;
}


/**
 *	velocity_ioctl		-	ioctl entry point
 *	@dev: network device
@@ -2620,7 +2608,6 @@ out:
	return NETDEV_TX_OK;
}


static const struct net_device_ops velocity_netdev_ops = {
	.ndo_open		= velocity_open,
	.ndo_stop		= velocity_close,
@@ -2718,7 +2705,6 @@ static u32 velocity_get_link(struct net_device *dev)
	return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, &regs->PHYSR0) ? 1 : 0;
}


/**
 *	velocity_found1		-	set up discovered velocity card
 *	@pdev: PCI device
@@ -2865,7 +2851,6 @@ err_free_dev:
	goto out;
}


#ifdef CONFIG_PM
/**
 *	wol_calc_crc		-	WOL CRC
@@ -3036,7 +3021,7 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state)

	spin_lock_irqsave(&vptr->lock, flags);
	pci_save_state(pdev);
#ifdef ETHTOOL_GWOL

	if (vptr->flags & VELOCITY_FLAGS_WOL_ENABLED) {
		velocity_get_ip(vptr);
		velocity_save_context(vptr, &vptr->context);
@@ -3050,9 +3035,7 @@ static int velocity_suspend(struct pci_dev *pdev, pm_message_t state)
		pci_disable_device(pdev);
		pci_set_power_state(pdev, pci_choose_state(pdev, state));
	}
#else
	pci_set_power_state(pdev, pci_choose_state(pdev, state));
#endif

	spin_unlock_irqrestore(&vptr->lock, flags);
	return 0;
}
@@ -3538,11 +3521,10 @@ static const struct ethtool_ops velocity_ethtool_ops = {
	.complete		= velocity_ethtool_down
};

#ifdef CONFIG_PM
#ifdef CONFIG_INET
#if defined(CONFIG_PM) && defined(CONFIG_INET)
static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
{
	struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
	struct in_ifaddr *ifa = ptr;
	struct net_device *dev = ifa->ifa_dev->dev;

	if (dev_net(dev) == &init_net &&
@@ -3551,10 +3533,7 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi

	return NOTIFY_DONE;
}
#endif	/* CONFIG_INET */
#endif	/* CONFIG_PM */

#if defined(CONFIG_PM) && defined(CONFIG_INET)
static struct notifier_block velocity_inetaddr_notifier = {
	.notifier_call	= velocity_netdev_event,
};