aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Song <Baohua.Song@csr.com>2014-01-15 10:31:46 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-16 19:22:53 -0500
commit5b22721d1fb03f2c43b79adc35bd6646405a34da (patch)
tree3506e5799e54f029c71c25c7214abd379cfbb427
parentb013840810c221f2b0cf641d01531526052dc1fb (diff)
dm9000: fix a lot of checkpatch issues
recently, dm9000 codes have many checkpatch errors and warnings: WARNING: please, no space before tabs 3: FILE: dm9000.c:3: + * ^ICopyright (C) 1997 Sten Wang$ WARNING: please, no space before tabs 5: FILE: dm9000.c:5: + * ^IThis program is free software; you can redistribute it and/or$ WARNING: please, no space before tabs 6: FILE: dm9000.c:6: + * ^Imodify it under the terms of the GNU General Public License$ WARNING: please, no space before tabs 7: FILE: dm9000.c:7: + * ^Ias published by the Free Software Foundation; either version 2$ WARNING: please, no space before tabs 8: FILE: dm9000.c:8: + * ^Iof the License, or (at your option) any later version.$ WARNING: please, no space before tabs 10: FILE: dm9000.c:10: + * ^IThis program is distributed in the hope that it will be useful,$ WARNING: please, no space before tabs 11: FILE: dm9000.c:11: + * ^Ibut WITHOUT ANY WARRANTY; without even the implied warranty of$ WARNING: please, no space before tabs 12: FILE: dm9000.c:12: + * ^IMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the$ WARNING: please, no space before tabs 13: FILE: dm9000.c:13: + * ^IGNU General Public License for more details.$ WARNING: do not add new typedefs 97: FILE: dm9000.c:97: +typedef struct board_info { ERROR: spaces prohibited around that ':' (ctx:WxV) 113: FILE: dm9000.c:113: + unsigned int in_suspend :1; ^ ERROR: spaces prohibited around that ':' (ctx:WxV) 114: FILE: dm9000.c:114: + unsigned int wake_supported :1; ^ This patch fixes important errors in it. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/davicom/dm9000.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 25683db4c03d..a1a2b4028a5c 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -109,8 +109,8 @@ typedef struct board_info {
109 u8 imr_all; 109 u8 imr_all;
110 110
111 unsigned int flags; 111 unsigned int flags;
112 unsigned int in_suspend :1; 112 unsigned int in_suspend:1;
113 unsigned int wake_supported :1; 113 unsigned int wake_supported:1;
114 114
115 enum dm9000_type type; 115 enum dm9000_type type;
116 116
@@ -161,7 +161,7 @@ static inline board_info_t *to_dm9000_board(struct net_device *dev)
161 * Read a byte from I/O port 161 * Read a byte from I/O port
162 */ 162 */
163static u8 163static u8
164ior(board_info_t * db, int reg) 164ior(board_info_t *db, int reg)
165{ 165{
166 writeb(reg, db->io_addr); 166 writeb(reg, db->io_addr);
167 return readb(db->io_data); 167 return readb(db->io_data);
@@ -172,7 +172,7 @@ ior(board_info_t * db, int reg)
172 */ 172 */
173 173
174static void 174static void
175iow(board_info_t * db, int reg, int value) 175iow(board_info_t *db, int reg, int value)
176{ 176{
177 writeb(reg, db->io_addr); 177 writeb(reg, db->io_addr);
178 writeb(value, db->io_data); 178 writeb(value, db->io_data);
@@ -744,9 +744,9 @@ static const struct ethtool_ops dm9000_ethtool_ops = {
744 .get_link = dm9000_get_link, 744 .get_link = dm9000_get_link,
745 .get_wol = dm9000_get_wol, 745 .get_wol = dm9000_get_wol,
746 .set_wol = dm9000_set_wol, 746 .set_wol = dm9000_set_wol,
747 .get_eeprom_len = dm9000_get_eeprom_len, 747 .get_eeprom_len = dm9000_get_eeprom_len,
748 .get_eeprom = dm9000_get_eeprom, 748 .get_eeprom = dm9000_get_eeprom,
749 .set_eeprom = dm9000_set_eeprom, 749 .set_eeprom = dm9000_set_eeprom,
750}; 750};
751 751
752static void dm9000_show_carrier(board_info_t *db, 752static void dm9000_show_carrier(board_info_t *db,
@@ -794,7 +794,7 @@ dm9000_poll_work(struct work_struct *w)
794 } 794 }
795 } else 795 } else
796 mii_check_media(&db->mii, netif_msg_link(db), 0); 796 mii_check_media(&db->mii, netif_msg_link(db), 0);
797 797
798 if (netif_running(ndev)) 798 if (netif_running(ndev))
799 dm9000_schedule_poll(db); 799 dm9000_schedule_poll(db);
800} 800}
@@ -1251,12 +1251,11 @@ static irqreturn_t dm9000_wol_interrupt(int irq, void *dev_id)
1251 dev_info(db->dev, "wake by link status change\n"); 1251 dev_info(db->dev, "wake by link status change\n");
1252 if (wcr & WCR_SAMPLEST) 1252 if (wcr & WCR_SAMPLEST)
1253 dev_info(db->dev, "wake by sample packet\n"); 1253 dev_info(db->dev, "wake by sample packet\n");
1254 if (wcr & WCR_MAGICST ) 1254 if (wcr & WCR_MAGICST)
1255 dev_info(db->dev, "wake by magic packet\n"); 1255 dev_info(db->dev, "wake by magic packet\n");
1256 if (!(wcr & (WCR_LINKST | WCR_SAMPLEST | WCR_MAGICST))) 1256 if (!(wcr & (WCR_LINKST | WCR_SAMPLEST | WCR_MAGICST)))
1257 dev_err(db->dev, "wake signalled with no reason? " 1257 dev_err(db->dev, "wake signalled with no reason? "
1258 "NSR=0x%02x, WSR=0x%02x\n", nsr, wcr); 1258 "NSR=0x%02x, WSR=0x%02x\n", nsr, wcr);
1259
1260 } 1259 }
1261 1260
1262 spin_unlock_irqrestore(&db->lock, flags); 1261 spin_unlock_irqrestore(&db->lock, flags);
@@ -1313,7 +1312,7 @@ dm9000_open(struct net_device *dev)
1313 1312
1314 mii_check_media(&db->mii, netif_msg_link(db), 1); 1313 mii_check_media(&db->mii, netif_msg_link(db), 1);
1315 netif_start_queue(dev); 1314 netif_start_queue(dev);
1316 1315
1317 dm9000_schedule_poll(db); 1316 dm9000_schedule_poll(db);
1318 1317
1319 return 0; 1318 return 0;
@@ -1627,7 +1626,7 @@ dm9000_probe(struct platform_device *pdev)
1627 1626
1628 if (!is_valid_ether_addr(ndev->dev_addr)) { 1627 if (!is_valid_ether_addr(ndev->dev_addr)) {
1629 /* try reading from mac */ 1628 /* try reading from mac */
1630 1629
1631 mac_src = "chip"; 1630 mac_src = "chip";
1632 for (i = 0; i < 6; i++) 1631 for (i = 0; i < 6; i++)
1633 ndev->dev_addr[i] = ior(db, i+DM9000_PAR); 1632 ndev->dev_addr[i] = ior(db, i+DM9000_PAR);