diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-08-20 19:52:04 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 18:59:00 -0400 |
commit | b39d66a81fb4f5ab555f86a2e49f3714f8369a3d (patch) | |
tree | 20ffb096fe2781545ac3f77f07ebbb347234e111 /drivers/net/enc28j60.c | |
parent | b514f6b6da3aedcf4eb6f0c69e910ae89ef4632f (diff) |
drivers/net: replace __FUNCTION__ with __func__
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/enc28j60.c')
-rw-r--r-- | drivers/net/enc28j60.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index aa0bf6e1c69..e1b441effbb 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c | |||
@@ -110,7 +110,7 @@ spi_read_buf(struct enc28j60_net *priv, int len, u8 *data) | |||
110 | } | 110 | } |
111 | if (ret && netif_msg_drv(priv)) | 111 | if (ret && netif_msg_drv(priv)) |
112 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", | 112 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", |
113 | __FUNCTION__, ret); | 113 | __func__, ret); |
114 | 114 | ||
115 | return ret; | 115 | return ret; |
116 | } | 116 | } |
@@ -131,7 +131,7 @@ static int spi_write_buf(struct enc28j60_net *priv, int len, | |||
131 | ret = spi_write(priv->spi, priv->spi_transfer_buf, len + 1); | 131 | ret = spi_write(priv->spi, priv->spi_transfer_buf, len + 1); |
132 | if (ret && netif_msg_drv(priv)) | 132 | if (ret && netif_msg_drv(priv)) |
133 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", | 133 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", |
134 | __FUNCTION__, ret); | 134 | __func__, ret); |
135 | } | 135 | } |
136 | return ret; | 136 | return ret; |
137 | } | 137 | } |
@@ -156,7 +156,7 @@ static u8 spi_read_op(struct enc28j60_net *priv, u8 op, | |||
156 | ret = spi_write_then_read(priv->spi, tx_buf, 1, rx_buf, slen); | 156 | ret = spi_write_then_read(priv->spi, tx_buf, 1, rx_buf, slen); |
157 | if (ret) | 157 | if (ret) |
158 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", | 158 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", |
159 | __FUNCTION__, ret); | 159 | __func__, ret); |
160 | else | 160 | else |
161 | val = rx_buf[slen - 1]; | 161 | val = rx_buf[slen - 1]; |
162 | 162 | ||
@@ -176,14 +176,14 @@ static int spi_write_op(struct enc28j60_net *priv, u8 op, | |||
176 | ret = spi_write(priv->spi, priv->spi_transfer_buf, 2); | 176 | ret = spi_write(priv->spi, priv->spi_transfer_buf, 2); |
177 | if (ret && netif_msg_drv(priv)) | 177 | if (ret && netif_msg_drv(priv)) |
178 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", | 178 | printk(KERN_DEBUG DRV_NAME ": %s() failed: ret = %d\n", |
179 | __FUNCTION__, ret); | 179 | __func__, ret); |
180 | return ret; | 180 | return ret; |
181 | } | 181 | } |
182 | 182 | ||
183 | static void enc28j60_soft_reset(struct enc28j60_net *priv) | 183 | static void enc28j60_soft_reset(struct enc28j60_net *priv) |
184 | { | 184 | { |
185 | if (netif_msg_hw(priv)) | 185 | if (netif_msg_hw(priv)) |
186 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__); | 186 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__); |
187 | 187 | ||
188 | spi_write_op(priv, ENC28J60_SOFT_RESET, 0, ENC28J60_SOFT_RESET); | 188 | spi_write_op(priv, ENC28J60_SOFT_RESET, 0, ENC28J60_SOFT_RESET); |
189 | /* Errata workaround #1, CLKRDY check is unreliable, | 189 | /* Errata workaround #1, CLKRDY check is unreliable, |
@@ -357,7 +357,7 @@ static void enc28j60_mem_read(struct enc28j60_net *priv, | |||
357 | reg = nolock_regw_read(priv, ERDPTL); | 357 | reg = nolock_regw_read(priv, ERDPTL); |
358 | if (reg != addr) | 358 | if (reg != addr) |
359 | printk(KERN_DEBUG DRV_NAME ": %s() error writing ERDPT " | 359 | printk(KERN_DEBUG DRV_NAME ": %s() error writing ERDPT " |
360 | "(0x%04x - 0x%04x)\n", __FUNCTION__, reg, addr); | 360 | "(0x%04x - 0x%04x)\n", __func__, reg, addr); |
361 | } | 361 | } |
362 | #endif | 362 | #endif |
363 | spi_read_buf(priv, len, data); | 363 | spi_read_buf(priv, len, data); |
@@ -380,7 +380,7 @@ enc28j60_packet_write(struct enc28j60_net *priv, int len, const u8 *data) | |||
380 | if (reg != TXSTART_INIT) | 380 | if (reg != TXSTART_INIT) |
381 | printk(KERN_DEBUG DRV_NAME | 381 | printk(KERN_DEBUG DRV_NAME |
382 | ": %s() ERWPT:0x%04x != 0x%04x\n", | 382 | ": %s() ERWPT:0x%04x != 0x%04x\n", |
383 | __FUNCTION__, reg, TXSTART_INIT); | 383 | __func__, reg, TXSTART_INIT); |
384 | } | 384 | } |
385 | #endif | 385 | #endif |
386 | /* Set the TXND pointer to correspond to the packet size given */ | 386 | /* Set the TXND pointer to correspond to the packet size given */ |
@@ -390,13 +390,13 @@ enc28j60_packet_write(struct enc28j60_net *priv, int len, const u8 *data) | |||
390 | if (netif_msg_hw(priv)) | 390 | if (netif_msg_hw(priv)) |
391 | printk(KERN_DEBUG DRV_NAME | 391 | printk(KERN_DEBUG DRV_NAME |
392 | ": %s() after control byte ERWPT:0x%04x\n", | 392 | ": %s() after control byte ERWPT:0x%04x\n", |
393 | __FUNCTION__, nolock_regw_read(priv, EWRPTL)); | 393 | __func__, nolock_regw_read(priv, EWRPTL)); |
394 | /* copy the packet into the transmit buffer */ | 394 | /* copy the packet into the transmit buffer */ |
395 | spi_write_buf(priv, len, data); | 395 | spi_write_buf(priv, len, data); |
396 | if (netif_msg_hw(priv)) | 396 | if (netif_msg_hw(priv)) |
397 | printk(KERN_DEBUG DRV_NAME | 397 | printk(KERN_DEBUG DRV_NAME |
398 | ": %s() after write packet ERWPT:0x%04x, len=%d\n", | 398 | ": %s() after write packet ERWPT:0x%04x, len=%d\n", |
399 | __FUNCTION__, nolock_regw_read(priv, EWRPTL), len); | 399 | __func__, nolock_regw_read(priv, EWRPTL), len); |
400 | mutex_unlock(&priv->lock); | 400 | mutex_unlock(&priv->lock); |
401 | } | 401 | } |
402 | 402 | ||
@@ -495,7 +495,7 @@ static int enc28j60_set_hw_macaddr(struct net_device *ndev) | |||
495 | if (netif_msg_drv(priv)) | 495 | if (netif_msg_drv(priv)) |
496 | printk(KERN_DEBUG DRV_NAME | 496 | printk(KERN_DEBUG DRV_NAME |
497 | ": %s() Hardware must be disabled to set " | 497 | ": %s() Hardware must be disabled to set " |
498 | "Mac address\n", __FUNCTION__); | 498 | "Mac address\n", __func__); |
499 | ret = -EBUSY; | 499 | ret = -EBUSY; |
500 | } | 500 | } |
501 | mutex_unlock(&priv->lock); | 501 | mutex_unlock(&priv->lock); |
@@ -575,7 +575,7 @@ static void nolock_rxfifo_init(struct enc28j60_net *priv, u16 start, u16 end) | |||
575 | if (start > 0x1FFF || end > 0x1FFF || start > end) { | 575 | if (start > 0x1FFF || end > 0x1FFF || start > end) { |
576 | if (netif_msg_drv(priv)) | 576 | if (netif_msg_drv(priv)) |
577 | printk(KERN_ERR DRV_NAME ": %s(%d, %d) RXFIFO " | 577 | printk(KERN_ERR DRV_NAME ": %s(%d, %d) RXFIFO " |
578 | "bad parameters!\n", __FUNCTION__, start, end); | 578 | "bad parameters!\n", __func__, start, end); |
579 | return; | 579 | return; |
580 | } | 580 | } |
581 | /* set receive buffer start + end */ | 581 | /* set receive buffer start + end */ |
@@ -591,7 +591,7 @@ static void nolock_txfifo_init(struct enc28j60_net *priv, u16 start, u16 end) | |||
591 | if (start > 0x1FFF || end > 0x1FFF || start > end) { | 591 | if (start > 0x1FFF || end > 0x1FFF || start > end) { |
592 | if (netif_msg_drv(priv)) | 592 | if (netif_msg_drv(priv)) |
593 | printk(KERN_ERR DRV_NAME ": %s(%d, %d) TXFIFO " | 593 | printk(KERN_ERR DRV_NAME ": %s(%d, %d) TXFIFO " |
594 | "bad parameters!\n", __FUNCTION__, start, end); | 594 | "bad parameters!\n", __func__, start, end); |
595 | return; | 595 | return; |
596 | } | 596 | } |
597 | /* set transmit buffer start + end */ | 597 | /* set transmit buffer start + end */ |
@@ -630,7 +630,7 @@ static int enc28j60_hw_init(struct enc28j60_net *priv) | |||
630 | u8 reg; | 630 | u8 reg; |
631 | 631 | ||
632 | if (netif_msg_drv(priv)) | 632 | if (netif_msg_drv(priv)) |
633 | printk(KERN_DEBUG DRV_NAME ": %s() - %s\n", __FUNCTION__, | 633 | printk(KERN_DEBUG DRV_NAME ": %s() - %s\n", __func__, |
634 | priv->full_duplex ? "FullDuplex" : "HalfDuplex"); | 634 | priv->full_duplex ? "FullDuplex" : "HalfDuplex"); |
635 | 635 | ||
636 | mutex_lock(&priv->lock); | 636 | mutex_lock(&priv->lock); |
@@ -661,7 +661,7 @@ static int enc28j60_hw_init(struct enc28j60_net *priv) | |||
661 | if (reg == 0x00 || reg == 0xff) { | 661 | if (reg == 0x00 || reg == 0xff) { |
662 | if (netif_msg_drv(priv)) | 662 | if (netif_msg_drv(priv)) |
663 | printk(KERN_DEBUG DRV_NAME ": %s() Invalid RevId %d\n", | 663 | printk(KERN_DEBUG DRV_NAME ": %s() Invalid RevId %d\n", |
664 | __FUNCTION__, reg); | 664 | __func__, reg); |
665 | return 0; | 665 | return 0; |
666 | } | 666 | } |
667 | 667 | ||
@@ -724,7 +724,7 @@ static void enc28j60_hw_enable(struct enc28j60_net *priv) | |||
724 | /* enable interrupts */ | 724 | /* enable interrupts */ |
725 | if (netif_msg_hw(priv)) | 725 | if (netif_msg_hw(priv)) |
726 | printk(KERN_DEBUG DRV_NAME ": %s() enabling interrupts.\n", | 726 | printk(KERN_DEBUG DRV_NAME ": %s() enabling interrupts.\n", |
727 | __FUNCTION__); | 727 | __func__); |
728 | 728 | ||
729 | enc28j60_phy_write(priv, PHIE, PHIE_PGEIE | PHIE_PLNKIE); | 729 | enc28j60_phy_write(priv, PHIE, PHIE_PGEIE | PHIE_PLNKIE); |
730 | 730 | ||
@@ -888,7 +888,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) | |||
888 | if (netif_msg_rx_err(priv)) | 888 | if (netif_msg_rx_err(priv)) |
889 | dev_err(&ndev->dev, | 889 | dev_err(&ndev->dev, |
890 | "%s() Invalid packet address!! 0x%04x\n", | 890 | "%s() Invalid packet address!! 0x%04x\n", |
891 | __FUNCTION__, priv->next_pk_ptr); | 891 | __func__, priv->next_pk_ptr); |
892 | /* packet address corrupted: reset RX logic */ | 892 | /* packet address corrupted: reset RX logic */ |
893 | mutex_lock(&priv->lock); | 893 | mutex_lock(&priv->lock); |
894 | nolock_reg_bfclr(priv, ECON1, ECON1_RXEN); | 894 | nolock_reg_bfclr(priv, ECON1, ECON1_RXEN); |
@@ -917,7 +917,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) | |||
917 | rxstat |= rsv[4]; | 917 | rxstat |= rsv[4]; |
918 | 918 | ||
919 | if (netif_msg_rx_status(priv)) | 919 | if (netif_msg_rx_status(priv)) |
920 | enc28j60_dump_rsv(priv, __FUNCTION__, next_packet, len, rxstat); | 920 | enc28j60_dump_rsv(priv, __func__, next_packet, len, rxstat); |
921 | 921 | ||
922 | if (!RSV_GETBIT(rxstat, RSV_RXOK)) { | 922 | if (!RSV_GETBIT(rxstat, RSV_RXOK)) { |
923 | if (netif_msg_rx_err(priv)) | 923 | if (netif_msg_rx_err(priv)) |
@@ -941,7 +941,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) | |||
941 | enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv), | 941 | enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv), |
942 | len, skb_put(skb, len)); | 942 | len, skb_put(skb, len)); |
943 | if (netif_msg_pktdata(priv)) | 943 | if (netif_msg_pktdata(priv)) |
944 | dump_packet(__FUNCTION__, skb->len, skb->data); | 944 | dump_packet(__func__, skb->len, skb->data); |
945 | skb->protocol = eth_type_trans(skb, ndev); | 945 | skb->protocol = eth_type_trans(skb, ndev); |
946 | /* update statistics */ | 946 | /* update statistics */ |
947 | ndev->stats.rx_packets++; | 947 | ndev->stats.rx_packets++; |
@@ -958,7 +958,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) | |||
958 | erxrdpt = erxrdpt_workaround(next_packet, RXSTART_INIT, RXEND_INIT); | 958 | erxrdpt = erxrdpt_workaround(next_packet, RXSTART_INIT, RXEND_INIT); |
959 | if (netif_msg_hw(priv)) | 959 | if (netif_msg_hw(priv)) |
960 | printk(KERN_DEBUG DRV_NAME ": %s() ERXRDPT:0x%04x\n", | 960 | printk(KERN_DEBUG DRV_NAME ": %s() ERXRDPT:0x%04x\n", |
961 | __FUNCTION__, erxrdpt); | 961 | __func__, erxrdpt); |
962 | 962 | ||
963 | mutex_lock(&priv->lock); | 963 | mutex_lock(&priv->lock); |
964 | nolock_regw_write(priv, ERXRDPTL, erxrdpt); | 964 | nolock_regw_write(priv, ERXRDPTL, erxrdpt); |
@@ -968,7 +968,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) | |||
968 | reg = nolock_regw_read(priv, ERXRDPTL); | 968 | reg = nolock_regw_read(priv, ERXRDPTL); |
969 | if (reg != erxrdpt) | 969 | if (reg != erxrdpt) |
970 | printk(KERN_DEBUG DRV_NAME ": %s() ERXRDPT verify " | 970 | printk(KERN_DEBUG DRV_NAME ": %s() ERXRDPT verify " |
971 | "error (0x%04x - 0x%04x)\n", __FUNCTION__, | 971 | "error (0x%04x - 0x%04x)\n", __func__, |
972 | reg, erxrdpt); | 972 | reg, erxrdpt); |
973 | } | 973 | } |
974 | #endif | 974 | #endif |
@@ -1006,7 +1006,7 @@ static int enc28j60_get_free_rxfifo(struct enc28j60_net *priv) | |||
1006 | mutex_unlock(&priv->lock); | 1006 | mutex_unlock(&priv->lock); |
1007 | if (netif_msg_rx_status(priv)) | 1007 | if (netif_msg_rx_status(priv)) |
1008 | printk(KERN_DEBUG DRV_NAME ": %s() free_space = %d\n", | 1008 | printk(KERN_DEBUG DRV_NAME ": %s() free_space = %d\n", |
1009 | __FUNCTION__, free_space); | 1009 | __func__, free_space); |
1010 | return free_space; | 1010 | return free_space; |
1011 | } | 1011 | } |
1012 | 1012 | ||
@@ -1022,7 +1022,7 @@ static void enc28j60_check_link_status(struct net_device *ndev) | |||
1022 | reg = enc28j60_phy_read(priv, PHSTAT2); | 1022 | reg = enc28j60_phy_read(priv, PHSTAT2); |
1023 | if (netif_msg_hw(priv)) | 1023 | if (netif_msg_hw(priv)) |
1024 | printk(KERN_DEBUG DRV_NAME ": %s() PHSTAT1: %04x, " | 1024 | printk(KERN_DEBUG DRV_NAME ": %s() PHSTAT1: %04x, " |
1025 | "PHSTAT2: %04x\n", __FUNCTION__, | 1025 | "PHSTAT2: %04x\n", __func__, |
1026 | enc28j60_phy_read(priv, PHSTAT1), reg); | 1026 | enc28j60_phy_read(priv, PHSTAT1), reg); |
1027 | duplex = reg & PHSTAT2_DPXSTAT; | 1027 | duplex = reg & PHSTAT2_DPXSTAT; |
1028 | 1028 | ||
@@ -1095,7 +1095,7 @@ static void enc28j60_irq_work_handler(struct work_struct *work) | |||
1095 | int intflags, loop; | 1095 | int intflags, loop; |
1096 | 1096 | ||
1097 | if (netif_msg_intr(priv)) | 1097 | if (netif_msg_intr(priv)) |
1098 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__); | 1098 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__); |
1099 | /* disable further interrupts */ | 1099 | /* disable further interrupts */ |
1100 | locked_reg_bfclr(priv, EIE, EIE_INTIE); | 1100 | locked_reg_bfclr(priv, EIE, EIE_INTIE); |
1101 | 1101 | ||
@@ -1198,7 +1198,7 @@ static void enc28j60_irq_work_handler(struct work_struct *work) | |||
1198 | /* re-enable interrupts */ | 1198 | /* re-enable interrupts */ |
1199 | locked_reg_bfset(priv, EIE, EIE_INTIE); | 1199 | locked_reg_bfset(priv, EIE, EIE_INTIE); |
1200 | if (netif_msg_intr(priv)) | 1200 | if (netif_msg_intr(priv)) |
1201 | printk(KERN_DEBUG DRV_NAME ": %s() exit\n", __FUNCTION__); | 1201 | printk(KERN_DEBUG DRV_NAME ": %s() exit\n", __func__); |
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | /* | 1204 | /* |
@@ -1213,7 +1213,7 @@ static void enc28j60_hw_tx(struct enc28j60_net *priv) | |||
1213 | ": Tx Packet Len:%d\n", priv->tx_skb->len); | 1213 | ": Tx Packet Len:%d\n", priv->tx_skb->len); |
1214 | 1214 | ||
1215 | if (netif_msg_pktdata(priv)) | 1215 | if (netif_msg_pktdata(priv)) |
1216 | dump_packet(__FUNCTION__, | 1216 | dump_packet(__func__, |
1217 | priv->tx_skb->len, priv->tx_skb->data); | 1217 | priv->tx_skb->len, priv->tx_skb->data); |
1218 | enc28j60_packet_write(priv, priv->tx_skb->len, priv->tx_skb->data); | 1218 | enc28j60_packet_write(priv, priv->tx_skb->len, priv->tx_skb->data); |
1219 | 1219 | ||
@@ -1254,7 +1254,7 @@ static int enc28j60_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1254 | struct enc28j60_net *priv = netdev_priv(dev); | 1254 | struct enc28j60_net *priv = netdev_priv(dev); |
1255 | 1255 | ||
1256 | if (netif_msg_tx_queued(priv)) | 1256 | if (netif_msg_tx_queued(priv)) |
1257 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__); | 1257 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__); |
1258 | 1258 | ||
1259 | /* If some error occurs while trying to transmit this | 1259 | /* If some error occurs while trying to transmit this |
1260 | * packet, you should return '1' from this function. | 1260 | * packet, you should return '1' from this function. |
@@ -1325,7 +1325,7 @@ static int enc28j60_net_open(struct net_device *dev) | |||
1325 | struct enc28j60_net *priv = netdev_priv(dev); | 1325 | struct enc28j60_net *priv = netdev_priv(dev); |
1326 | 1326 | ||
1327 | if (netif_msg_drv(priv)) | 1327 | if (netif_msg_drv(priv)) |
1328 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__); | 1328 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__); |
1329 | 1329 | ||
1330 | if (!is_valid_ether_addr(dev->dev_addr)) { | 1330 | if (!is_valid_ether_addr(dev->dev_addr)) { |
1331 | if (netif_msg_ifup(priv)) { | 1331 | if (netif_msg_ifup(priv)) { |
@@ -1363,7 +1363,7 @@ static int enc28j60_net_close(struct net_device *dev) | |||
1363 | struct enc28j60_net *priv = netdev_priv(dev); | 1363 | struct enc28j60_net *priv = netdev_priv(dev); |
1364 | 1364 | ||
1365 | if (netif_msg_drv(priv)) | 1365 | if (netif_msg_drv(priv)) |
1366 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__); | 1366 | printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__); |
1367 | 1367 | ||
1368 | enc28j60_hw_disable(priv); | 1368 | enc28j60_hw_disable(priv); |
1369 | enc28j60_lowpower(priv, true); | 1369 | enc28j60_lowpower(priv, true); |