aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorMike McCormack <mikem@ring3k.org>2010-07-28 23:34:52 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-31 02:59:04 -0400
commit060b946cc28682620667c33cb145094c763078be (patch)
treef8360ffe5cc64a37e6841ccebd55142f713f6f6f /drivers/net/sky2.c
parente994762f7afef242738b220b48c00a6fd2b165a1 (diff)
sky2: Code style fixes
Fix selected style problems reported by checkpatch. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index c762c6ac055b..194e5cf8c763 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -79,7 +79,7 @@
79 79
80#define SKY2_EEPROM_MAGIC 0x9955aabb 80#define SKY2_EEPROM_MAGIC 0x9955aabb
81 81
82#define RING_NEXT(x,s) (((x)+1) & ((s)-1)) 82#define RING_NEXT(x, s) (((x)+1) & ((s)-1))
83 83
84static const u32 default_msg = 84static const u32 default_msg =
85 NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK 85 NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK
@@ -172,7 +172,7 @@ static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val)
172 udelay(10); 172 udelay(10);
173 } 173 }
174 174
175 dev_warn(&hw->pdev->dev,"%s: phy write timeout\n", hw->dev[port]->name); 175 dev_warn(&hw->pdev->dev, "%s: phy write timeout\n", hw->dev[port]->name);
176 return -ETIMEDOUT; 176 return -ETIMEDOUT;
177 177
178io_error: 178io_error:
@@ -1067,7 +1067,7 @@ static inline struct sky2_rx_le *sky2_next_rx(struct sky2_port *sky2)
1067 return le; 1067 return le;
1068} 1068}
1069 1069
1070static unsigned sky2_get_rx_threshold(struct sky2_port* sky2) 1070static unsigned sky2_get_rx_threshold(struct sky2_port *sky2)
1071{ 1071{
1072 unsigned size; 1072 unsigned size;
1073 1073
@@ -1078,7 +1078,7 @@ static unsigned sky2_get_rx_threshold(struct sky2_port* sky2)
1078 return (size - 8) / sizeof(u32); 1078 return (size - 8) / sizeof(u32);
1079} 1079}
1080 1080
1081static unsigned sky2_get_rx_data_size(struct sky2_port* sky2) 1081static unsigned sky2_get_rx_data_size(struct sky2_port *sky2)
1082{ 1082{
1083 struct rx_ring_info *re; 1083 struct rx_ring_info *re;
1084 unsigned size; 1084 unsigned size;
@@ -1102,7 +1102,7 @@ static unsigned sky2_get_rx_data_size(struct sky2_port* sky2)
1102} 1102}
1103 1103
1104/* Build description to hardware for one receive segment */ 1104/* Build description to hardware for one receive segment */
1105static void sky2_rx_add(struct sky2_port *sky2, u8 op, 1105static void sky2_rx_add(struct sky2_port *sky2, u8 op,
1106 dma_addr_t map, unsigned len) 1106 dma_addr_t map, unsigned len)
1107{ 1107{
1108 struct sky2_rx_le *le; 1108 struct sky2_rx_le *le;
@@ -3014,7 +3014,7 @@ static int __devinit sky2_init(struct sky2_hw *hw)
3014 hw->chip_id = sky2_read8(hw, B2_CHIP_ID); 3014 hw->chip_id = sky2_read8(hw, B2_CHIP_ID);
3015 hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4; 3015 hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4;
3016 3016
3017 switch(hw->chip_id) { 3017 switch (hw->chip_id) {
3018 case CHIP_ID_YUKON_XL: 3018 case CHIP_ID_YUKON_XL:
3019 hw->flags = SKY2_HW_GIGABIT | SKY2_HW_NEWER_PHY; 3019 hw->flags = SKY2_HW_GIGABIT | SKY2_HW_NEWER_PHY;
3020 if (hw->chip_rev < CHIP_REV_YU_XL_A2) 3020 if (hw->chip_rev < CHIP_REV_YU_XL_A2)
@@ -3685,7 +3685,7 @@ static int sky2_set_mac_address(struct net_device *dev, void *p)
3685 return 0; 3685 return 0;
3686} 3686}
3687 3687
3688static void inline sky2_add_filter(u8 filter[8], const u8 *addr) 3688static inline void sky2_add_filter(u8 filter[8], const u8 *addr)
3689{ 3689{
3690 u32 bit; 3690 u32 bit;
3691 3691
@@ -3911,7 +3911,7 @@ static int sky2_set_coalesce(struct net_device *dev,
3911 return -EINVAL; 3911 return -EINVAL;
3912 if (ecmd->rx_max_coalesced_frames > RX_MAX_PENDING) 3912 if (ecmd->rx_max_coalesced_frames > RX_MAX_PENDING)
3913 return -EINVAL; 3913 return -EINVAL;
3914 if (ecmd->rx_max_coalesced_frames_irq >RX_MAX_PENDING) 3914 if (ecmd->rx_max_coalesced_frames_irq > RX_MAX_PENDING)
3915 return -EINVAL; 3915 return -EINVAL;
3916 3916
3917 if (ecmd->tx_coalesce_usecs == 0) 3917 if (ecmd->tx_coalesce_usecs == 0)
@@ -4372,7 +4372,7 @@ static int sky2_debug_show(struct seq_file *seq, void *v)
4372 seq_printf(seq, "%u:", idx); 4372 seq_printf(seq, "%u:", idx);
4373 sop = 0; 4373 sop = 0;
4374 4374
4375 switch(le->opcode & ~HW_OWNER) { 4375 switch (le->opcode & ~HW_OWNER) {
4376 case OP_ADDR64: 4376 case OP_ADDR64:
4377 seq_printf(seq, " %#x:", a); 4377 seq_printf(seq, " %#x:", a);
4378 break; 4378 break;
@@ -4441,7 +4441,7 @@ static int sky2_device_event(struct notifier_block *unused,
4441 if (dev->netdev_ops->ndo_open != sky2_up || !sky2_debug) 4441 if (dev->netdev_ops->ndo_open != sky2_up || !sky2_debug)
4442 return NOTIFY_DONE; 4442 return NOTIFY_DONE;
4443 4443
4444 switch(event) { 4444 switch (event) {
4445 case NETDEV_CHANGENAME: 4445 case NETDEV_CHANGENAME:
4446 if (sky2->debugfs) { 4446 if (sky2->debugfs) {
4447 sky2->debugfs = debugfs_rename(sky2_debug, sky2->debugfs, 4447 sky2->debugfs = debugfs_rename(sky2_debug, sky2->debugfs,
@@ -4636,7 +4636,7 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
4636 struct pci_dev *pdev = hw->pdev; 4636 struct pci_dev *pdev = hw->pdev;
4637 int err; 4637 int err;
4638 4638
4639 init_waitqueue_head (&hw->msi_wait); 4639 init_waitqueue_head(&hw->msi_wait);
4640 4640
4641 sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW); 4641 sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
4642 4642
@@ -4753,7 +4753,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4753 * this driver uses software swapping. 4753 * this driver uses software swapping.
4754 */ 4754 */
4755 reg &= ~PCI_REV_DESC; 4755 reg &= ~PCI_REV_DESC;
4756 err = pci_write_config_dword(pdev,PCI_DEV_REG2, reg); 4756 err = pci_write_config_dword(pdev, PCI_DEV_REG2, reg);
4757 if (err) { 4757 if (err) {
4758 dev_err(&pdev->dev, "PCI write config failed\n"); 4758 dev_err(&pdev->dev, "PCI write config failed\n");
4759 goto err_out_free_regions; 4759 goto err_out_free_regions;