Commit 95566065 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik

[PATCH] skge: whietspace cleanup

Cleanup whitespace around if() and switch() and end of lines
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
parent 020f46a3
...@@ -170,7 +170,7 @@ static int skge_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) ...@@ -170,7 +170,7 @@ static int skge_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
struct skge_port *skge = netdev_priv(dev); struct skge_port *skge = netdev_priv(dev);
struct skge_hw *hw = skge->hw; struct skge_hw *hw = skge->hw;
if(wol->wolopts != WAKE_MAGIC && wol->wolopts != 0) if (wol->wolopts != WAKE_MAGIC && wol->wolopts != 0)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (wol->wolopts == WAKE_MAGIC && !wol_supported(hw)) if (wol->wolopts == WAKE_MAGIC && !wol_supported(hw))
...@@ -247,7 +247,7 @@ static u32 skge_modes(const struct skge_hw *hw) ...@@ -247,7 +247,7 @@ static u32 skge_modes(const struct skge_hw *hw)
if (iscopper(hw)) { if (iscopper(hw)) {
modes |= ADVERTISED_TP; modes |= ADVERTISED_TP;
switch(hw->chip_id) { switch (hw->chip_id) {
case CHIP_ID_GENESIS: case CHIP_ID_GENESIS:
modes &= ~(ADVERTISED_100baseT_Full modes &= ~(ADVERTISED_100baseT_Full
| ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Half
...@@ -279,7 +279,7 @@ static int skge_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) ...@@ -279,7 +279,7 @@ static int skge_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
if (ecmd->advertising & skge_modes(hw)) if (ecmd->advertising & skge_modes(hw))
return -EINVAL; return -EINVAL;
} else { } else {
switch(ecmd->speed) { switch (ecmd->speed) {
case SPEED_1000: case SPEED_1000:
if (hw->chip_id == CHIP_ID_YUKON_FE) if (hw->chip_id == CHIP_ID_YUKON_FE)
return -EINVAL; return -EINVAL;
...@@ -393,7 +393,7 @@ static void skge_get_strings(struct net_device *dev, u32 stringset, u8 *data) ...@@ -393,7 +393,7 @@ static void skge_get_strings(struct net_device *dev, u32 stringset, u8 *data)
{ {
int i; int i;
switch(stringset) { switch (stringset) {
case ETH_SS_STATS: case ETH_SS_STATS:
for (i = 0; i < ARRAY_SIZE(skge_stats); i++) for (i = 0; i < ARRAY_SIZE(skge_stats); i++)
memcpy(data + i * ETH_GSTRING_LEN, memcpy(data + i * ETH_GSTRING_LEN,
...@@ -540,9 +540,9 @@ static int skge_set_pauseparam(struct net_device *dev, ...@@ -540,9 +540,9 @@ static int skge_set_pauseparam(struct net_device *dev,
skge->autoneg = ecmd->autoneg; skge->autoneg = ecmd->autoneg;
if (ecmd->rx_pause && ecmd->tx_pause) if (ecmd->rx_pause && ecmd->tx_pause)
skge->flow_control = FLOW_MODE_SYMMETRIC; skge->flow_control = FLOW_MODE_SYMMETRIC;
else if(ecmd->rx_pause && !ecmd->tx_pause) else if (ecmd->rx_pause && !ecmd->tx_pause)
skge->flow_control = FLOW_MODE_REM_SEND; skge->flow_control = FLOW_MODE_REM_SEND;
else if(!ecmd->rx_pause && ecmd->tx_pause) else if (!ecmd->rx_pause && ecmd->tx_pause)
skge->flow_control = FLOW_MODE_LOC_SEND; skge->flow_control = FLOW_MODE_LOC_SEND;
else else
skge->flow_control = FLOW_MODE_NONE; skge->flow_control = FLOW_MODE_NONE;
...@@ -730,7 +730,7 @@ static int skge_phys_id(struct net_device *dev, u32 data) ...@@ -730,7 +730,7 @@ static int skge_phys_id(struct net_device *dev, u32 data)
{ {
struct skge_port *skge = netdev_priv(dev); struct skge_port *skge = netdev_priv(dev);
if(!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ)) if (!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))
data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ); data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
/* start blinking */ /* start blinking */
...@@ -1960,7 +1960,7 @@ static u16 yukon_speed(const struct skge_hw *hw, u16 aux) ...@@ -1960,7 +1960,7 @@ static u16 yukon_speed(const struct skge_hw *hw, u16 aux)
if (hw->chip_id == CHIP_ID_YUKON_FE) if (hw->chip_id == CHIP_ID_YUKON_FE)
return (aux & PHY_M_PS_SPEED_100) ? SPEED_100 : SPEED_10; return (aux & PHY_M_PS_SPEED_100) ? SPEED_100 : SPEED_10;
switch(aux & PHY_M_PS_SPEED_MSK) { switch (aux & PHY_M_PS_SPEED_MSK) {
case PHY_M_PS_SPEED_1000: case PHY_M_PS_SPEED_1000:
return SPEED_1000; return SPEED_1000;
case PHY_M_PS_SPEED_100: case PHY_M_PS_SPEED_100:
...@@ -2439,7 +2439,7 @@ static int skge_change_mtu(struct net_device *dev, int new_mtu) ...@@ -2439,7 +2439,7 @@ static int skge_change_mtu(struct net_device *dev, int new_mtu)
{ {
int err = 0; int err = 0;
if(new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU) if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU)
return -EINVAL; return -EINVAL;
dev->mtu = new_mtu; dev->mtu = new_mtu;
...@@ -2473,7 +2473,7 @@ static void genesis_set_multicast(struct net_device *dev) ...@@ -2473,7 +2473,7 @@ static void genesis_set_multicast(struct net_device *dev)
memset(filter, 0xff, sizeof(filter)); memset(filter, 0xff, sizeof(filter));
else { else {
memset(filter, 0, sizeof(filter)); memset(filter, 0, sizeof(filter));
for(i = 0; list && i < count; i++, list = list->next) { for (i = 0; list && i < count; i++, list = list->next) {
u32 crc = crc32_le(~0, list->dmi_addr, ETH_ALEN); u32 crc = crc32_le(~0, list->dmi_addr, ETH_ALEN);
u8 bit = 63 - (crc & 63); u8 bit = 63 - (crc & 63);
...@@ -2510,7 +2510,7 @@ static void yukon_set_multicast(struct net_device *dev) ...@@ -2510,7 +2510,7 @@ static void yukon_set_multicast(struct net_device *dev)
int i; int i;
reg |= GM_RXCR_MCF_ENA; reg |= GM_RXCR_MCF_ENA;
for(i = 0; list && i < dev->mc_count; i++, list = list->next) { for (i = 0; list && i < dev->mc_count; i++, list = list->next) {
u32 bit = ether_crc(ETH_ALEN, list->dmi_addr) & 0x3f; u32 bit = ether_crc(ETH_ALEN, list->dmi_addr) & 0x3f;
filter[bit/8] |= 1 << (bit%8); filter[bit/8] |= 1 << (bit%8);
} }
...@@ -2657,7 +2657,7 @@ static inline void skge_tx_intr(struct net_device *dev) ...@@ -2657,7 +2657,7 @@ static inline void skge_tx_intr(struct net_device *dev)
struct skge_element *e; struct skge_element *e;
spin_lock(&skge->tx_lock); spin_lock(&skge->tx_lock);
for(e = ring->to_clean; e != ring->to_use; e = e->next) { for (e = ring->to_clean; e != ring->to_use; e = e->next) {
struct skge_tx_desc *td = e->desc; struct skge_tx_desc *td = e->desc;
u32 control; u32 control;
...@@ -2952,7 +2952,7 @@ static int skge_reset(struct skge_hw *hw) ...@@ -2952,7 +2952,7 @@ static int skge_reset(struct skge_hw *hw)
hw->phy_type = skge_read8(hw, B2_E_1) & 0xf; hw->phy_type = skge_read8(hw, B2_E_1) & 0xf;
hw->pmd_type = skge_read8(hw, B2_PMD_TYP); hw->pmd_type = skge_read8(hw, B2_PMD_TYP);
switch(hw->chip_id) { switch (hw->chip_id) {
case CHIP_ID_GENESIS: case CHIP_ID_GENESIS:
switch (hw->phy_type) { switch (hw->phy_type) {
case SK_PHY_XMAC: case SK_PHY_XMAC:
...@@ -3288,7 +3288,7 @@ static void __devexit skge_remove(struct pci_dev *pdev) ...@@ -3288,7 +3288,7 @@ static void __devexit skge_remove(struct pci_dev *pdev)
struct skge_hw *hw = pci_get_drvdata(pdev); struct skge_hw *hw = pci_get_drvdata(pdev);
struct net_device *dev0, *dev1; struct net_device *dev0, *dev1;
if(!hw) if (!hw)
return; return;
if ((dev1 = hw->dev[1])) if ((dev1 = hw->dev[1]))
...@@ -3316,7 +3316,7 @@ static int skge_suspend(struct pci_dev *pdev, u32 state) ...@@ -3316,7 +3316,7 @@ static int skge_suspend(struct pci_dev *pdev, u32 state)
struct skge_hw *hw = pci_get_drvdata(pdev); struct skge_hw *hw = pci_get_drvdata(pdev);
int i, wol = 0; int i, wol = 0;
for(i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
struct net_device *dev = hw->dev[i]; struct net_device *dev = hw->dev[i];
if (dev) { if (dev) {
...@@ -3349,11 +3349,11 @@ static int skge_resume(struct pci_dev *pdev) ...@@ -3349,11 +3349,11 @@ static int skge_resume(struct pci_dev *pdev)
skge_reset(hw); skge_reset(hw);
for(i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
struct net_device *dev = hw->dev[i]; struct net_device *dev = hw->dev[i];
if (dev) { if (dev) {
netif_device_attach(dev); netif_device_attach(dev);
if(netif_running(dev)) if (netif_running(dev))
skge_up(dev); skge_up(dev);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment