diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-08-09 12:00:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-11 15:19:53 -0400 |
commit | f865346407ebb14dd5b6a759a356552856c714cf (patch) | |
tree | 604be374c14b7507c463ca06fc2cba426f51d02b | |
parent | 0d5501c1c828fb97d02af50aa9d2b1a5498b94e4 (diff) |
ethernet: amd: Remove typedef local_info_t
The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for local_info_t.
Also, the name of the struct is changed to drop the _t, to make the
name look less typedef-like.
The following Coccinelle semantic patch detects the case:
@tn@
identifier i;
type td;
@@
-typedef
struct i { ... }
-td
;
@@
type tn.td;
identifier tn.i;
@@
-td
+ struct i
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/xircom/xirc2ps_cs.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/net/ethernet/xircom/xirc2ps_cs.c b/drivers/net/ethernet/xircom/xirc2ps_cs.c index 7c81ffb861e8..d56f8693202b 100644 --- a/drivers/net/ethernet/xircom/xirc2ps_cs.c +++ b/drivers/net/ethernet/xircom/xirc2ps_cs.c | |||
@@ -266,7 +266,7 @@ static void xirc2ps_detach(struct pcmcia_device *p_dev); | |||
266 | 266 | ||
267 | static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id); | 267 | static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id); |
268 | 268 | ||
269 | typedef struct local_info_t { | 269 | struct local_info { |
270 | struct net_device *dev; | 270 | struct net_device *dev; |
271 | struct pcmcia_device *p_dev; | 271 | struct pcmcia_device *p_dev; |
272 | 272 | ||
@@ -281,7 +281,7 @@ typedef struct local_info_t { | |||
281 | unsigned last_ptr_value; /* last packets transmitted value */ | 281 | unsigned last_ptr_value; /* last packets transmitted value */ |
282 | const char *manf_str; | 282 | const char *manf_str; |
283 | struct work_struct tx_timeout_task; | 283 | struct work_struct tx_timeout_task; |
284 | } local_info_t; | 284 | }; |
285 | 285 | ||
286 | /**************** | 286 | /**************** |
287 | * Some more prototypes | 287 | * Some more prototypes |
@@ -475,12 +475,12 @@ static int | |||
475 | xirc2ps_probe(struct pcmcia_device *link) | 475 | xirc2ps_probe(struct pcmcia_device *link) |
476 | { | 476 | { |
477 | struct net_device *dev; | 477 | struct net_device *dev; |
478 | local_info_t *local; | 478 | struct local_info *local; |
479 | 479 | ||
480 | dev_dbg(&link->dev, "attach()\n"); | 480 | dev_dbg(&link->dev, "attach()\n"); |
481 | 481 | ||
482 | /* Allocate the device structure */ | 482 | /* Allocate the device structure */ |
483 | dev = alloc_etherdev(sizeof(local_info_t)); | 483 | dev = alloc_etherdev(sizeof(struct local_info)); |
484 | if (!dev) | 484 | if (!dev) |
485 | return -ENOMEM; | 485 | return -ENOMEM; |
486 | local = netdev_priv(dev); | 486 | local = netdev_priv(dev); |
@@ -536,7 +536,7 @@ static int | |||
536 | set_card_type(struct pcmcia_device *link) | 536 | set_card_type(struct pcmcia_device *link) |
537 | { | 537 | { |
538 | struct net_device *dev = link->priv; | 538 | struct net_device *dev = link->priv; |
539 | local_info_t *local = netdev_priv(dev); | 539 | struct local_info *local = netdev_priv(dev); |
540 | u8 *buf; | 540 | u8 *buf; |
541 | unsigned int cisrev, mediaid, prodid; | 541 | unsigned int cisrev, mediaid, prodid; |
542 | size_t len; | 542 | size_t len; |
@@ -690,7 +690,7 @@ static int | |||
690 | xirc2ps_config(struct pcmcia_device * link) | 690 | xirc2ps_config(struct pcmcia_device * link) |
691 | { | 691 | { |
692 | struct net_device *dev = link->priv; | 692 | struct net_device *dev = link->priv; |
693 | local_info_t *local = netdev_priv(dev); | 693 | struct local_info *local = netdev_priv(dev); |
694 | unsigned int ioaddr; | 694 | unsigned int ioaddr; |
695 | int err; | 695 | int err; |
696 | u8 *buf; | 696 | u8 *buf; |
@@ -931,7 +931,7 @@ xirc2ps_release(struct pcmcia_device *link) | |||
931 | 931 | ||
932 | if (link->resource[2]->end) { | 932 | if (link->resource[2]->end) { |
933 | struct net_device *dev = link->priv; | 933 | struct net_device *dev = link->priv; |
934 | local_info_t *local = netdev_priv(dev); | 934 | struct local_info *local = netdev_priv(dev); |
935 | if (local->dingo) | 935 | if (local->dingo) |
936 | iounmap(local->dingo_ccr - 0x0800); | 936 | iounmap(local->dingo_ccr - 0x0800); |
937 | } | 937 | } |
@@ -975,7 +975,7 @@ static irqreturn_t | |||
975 | xirc2ps_interrupt(int irq, void *dev_id) | 975 | xirc2ps_interrupt(int irq, void *dev_id) |
976 | { | 976 | { |
977 | struct net_device *dev = (struct net_device *)dev_id; | 977 | struct net_device *dev = (struct net_device *)dev_id; |
978 | local_info_t *lp = netdev_priv(dev); | 978 | struct local_info *lp = netdev_priv(dev); |
979 | unsigned int ioaddr; | 979 | unsigned int ioaddr; |
980 | u_char saved_page; | 980 | u_char saved_page; |
981 | unsigned bytes_rcvd; | 981 | unsigned bytes_rcvd; |
@@ -1194,8 +1194,8 @@ xirc2ps_interrupt(int irq, void *dev_id) | |||
1194 | static void | 1194 | static void |
1195 | xirc2ps_tx_timeout_task(struct work_struct *work) | 1195 | xirc2ps_tx_timeout_task(struct work_struct *work) |
1196 | { | 1196 | { |
1197 | local_info_t *local = | 1197 | struct local_info *local = |
1198 | container_of(work, local_info_t, tx_timeout_task); | 1198 | container_of(work, struct local_info, tx_timeout_task); |
1199 | struct net_device *dev = local->dev; | 1199 | struct net_device *dev = local->dev; |
1200 | /* reset the card */ | 1200 | /* reset the card */ |
1201 | do_reset(dev,1); | 1201 | do_reset(dev,1); |
@@ -1206,7 +1206,7 @@ xirc2ps_tx_timeout_task(struct work_struct *work) | |||
1206 | static void | 1206 | static void |
1207 | xirc_tx_timeout(struct net_device *dev) | 1207 | xirc_tx_timeout(struct net_device *dev) |
1208 | { | 1208 | { |
1209 | local_info_t *lp = netdev_priv(dev); | 1209 | struct local_info *lp = netdev_priv(dev); |
1210 | dev->stats.tx_errors++; | 1210 | dev->stats.tx_errors++; |
1211 | netdev_notice(dev, "transmit timed out\n"); | 1211 | netdev_notice(dev, "transmit timed out\n"); |
1212 | schedule_work(&lp->tx_timeout_task); | 1212 | schedule_work(&lp->tx_timeout_task); |
@@ -1215,7 +1215,7 @@ xirc_tx_timeout(struct net_device *dev) | |||
1215 | static netdev_tx_t | 1215 | static netdev_tx_t |
1216 | do_start_xmit(struct sk_buff *skb, struct net_device *dev) | 1216 | do_start_xmit(struct sk_buff *skb, struct net_device *dev) |
1217 | { | 1217 | { |
1218 | local_info_t *lp = netdev_priv(dev); | 1218 | struct local_info *lp = netdev_priv(dev); |
1219 | unsigned int ioaddr = dev->base_addr; | 1219 | unsigned int ioaddr = dev->base_addr; |
1220 | int okay; | 1220 | int okay; |
1221 | unsigned freespace; | 1221 | unsigned freespace; |
@@ -1300,7 +1300,7 @@ static void set_address(struct set_address_info *sa_info, char *addr) | |||
1300 | static void set_addresses(struct net_device *dev) | 1300 | static void set_addresses(struct net_device *dev) |
1301 | { | 1301 | { |
1302 | unsigned int ioaddr = dev->base_addr; | 1302 | unsigned int ioaddr = dev->base_addr; |
1303 | local_info_t *lp = netdev_priv(dev); | 1303 | struct local_info *lp = netdev_priv(dev); |
1304 | struct netdev_hw_addr *ha; | 1304 | struct netdev_hw_addr *ha; |
1305 | struct set_address_info sa_info; | 1305 | struct set_address_info sa_info; |
1306 | int i; | 1306 | int i; |
@@ -1362,7 +1362,7 @@ set_multicast_list(struct net_device *dev) | |||
1362 | static int | 1362 | static int |
1363 | do_config(struct net_device *dev, struct ifmap *map) | 1363 | do_config(struct net_device *dev, struct ifmap *map) |
1364 | { | 1364 | { |
1365 | local_info_t *local = netdev_priv(dev); | 1365 | struct local_info *local = netdev_priv(dev); |
1366 | 1366 | ||
1367 | pr_debug("do_config(%p)\n", dev); | 1367 | pr_debug("do_config(%p)\n", dev); |
1368 | if (map->port != 255 && map->port != dev->if_port) { | 1368 | if (map->port != 255 && map->port != dev->if_port) { |
@@ -1387,7 +1387,7 @@ do_config(struct net_device *dev, struct ifmap *map) | |||
1387 | static int | 1387 | static int |
1388 | do_open(struct net_device *dev) | 1388 | do_open(struct net_device *dev) |
1389 | { | 1389 | { |
1390 | local_info_t *lp = netdev_priv(dev); | 1390 | struct local_info *lp = netdev_priv(dev); |
1391 | struct pcmcia_device *link = lp->p_dev; | 1391 | struct pcmcia_device *link = lp->p_dev; |
1392 | 1392 | ||
1393 | dev_dbg(&link->dev, "do_open(%p)\n", dev); | 1393 | dev_dbg(&link->dev, "do_open(%p)\n", dev); |
@@ -1421,7 +1421,7 @@ static const struct ethtool_ops netdev_ethtool_ops = { | |||
1421 | static int | 1421 | static int |
1422 | do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 1422 | do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |
1423 | { | 1423 | { |
1424 | local_info_t *local = netdev_priv(dev); | 1424 | struct local_info *local = netdev_priv(dev); |
1425 | unsigned int ioaddr = dev->base_addr; | 1425 | unsigned int ioaddr = dev->base_addr; |
1426 | struct mii_ioctl_data *data = if_mii(rq); | 1426 | struct mii_ioctl_data *data = if_mii(rq); |
1427 | 1427 | ||
@@ -1453,7 +1453,7 @@ do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1453 | static void | 1453 | static void |
1454 | hardreset(struct net_device *dev) | 1454 | hardreset(struct net_device *dev) |
1455 | { | 1455 | { |
1456 | local_info_t *local = netdev_priv(dev); | 1456 | struct local_info *local = netdev_priv(dev); |
1457 | unsigned int ioaddr = dev->base_addr; | 1457 | unsigned int ioaddr = dev->base_addr; |
1458 | 1458 | ||
1459 | SelectPage(4); | 1459 | SelectPage(4); |
@@ -1470,7 +1470,7 @@ hardreset(struct net_device *dev) | |||
1470 | static void | 1470 | static void |
1471 | do_reset(struct net_device *dev, int full) | 1471 | do_reset(struct net_device *dev, int full) |
1472 | { | 1472 | { |
1473 | local_info_t *local = netdev_priv(dev); | 1473 | struct local_info *local = netdev_priv(dev); |
1474 | unsigned int ioaddr = dev->base_addr; | 1474 | unsigned int ioaddr = dev->base_addr; |
1475 | unsigned value; | 1475 | unsigned value; |
1476 | 1476 | ||
@@ -1631,7 +1631,7 @@ do_reset(struct net_device *dev, int full) | |||
1631 | static int | 1631 | static int |
1632 | init_mii(struct net_device *dev) | 1632 | init_mii(struct net_device *dev) |
1633 | { | 1633 | { |
1634 | local_info_t *local = netdev_priv(dev); | 1634 | struct local_info *local = netdev_priv(dev); |
1635 | unsigned int ioaddr = dev->base_addr; | 1635 | unsigned int ioaddr = dev->base_addr; |
1636 | unsigned control, status, linkpartner; | 1636 | unsigned control, status, linkpartner; |
1637 | int i; | 1637 | int i; |
@@ -1715,7 +1715,7 @@ static int | |||
1715 | do_stop(struct net_device *dev) | 1715 | do_stop(struct net_device *dev) |
1716 | { | 1716 | { |
1717 | unsigned int ioaddr = dev->base_addr; | 1717 | unsigned int ioaddr = dev->base_addr; |
1718 | local_info_t *lp = netdev_priv(dev); | 1718 | struct local_info *lp = netdev_priv(dev); |
1719 | struct pcmcia_device *link = lp->p_dev; | 1719 | struct pcmcia_device *link = lp->p_dev; |
1720 | 1720 | ||
1721 | dev_dbg(&link->dev, "do_stop(%p)\n", dev); | 1721 | dev_dbg(&link->dev, "do_stop(%p)\n", dev); |