net: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
index 150cd3f..78cce0c 100644
--- a/net/irda/irlmp_event.c
+++ b/net/irda/irlmp_event.c
@@ -120,7 +120,7 @@
IRLMP_STATE state)
{
/*
- IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __FUNCTION__, irlmp_state[state]);
+ IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __func__, irlmp_state[state]);
*/
self->lap_state = state;
}
@@ -130,7 +130,7 @@
{
/*
IRDA_ASSERT(self != NULL, return;);
- IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __FUNCTION__, irlsap_state[state]);
+ IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __func__, irlsap_state[state]);
*/
self->lsap_state = state;
}
@@ -143,7 +143,7 @@
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n",
- __FUNCTION__, irlmp_event[event], irlsap_state[ self->lsap_state]);
+ __func__, irlmp_event[event], irlsap_state[ self->lsap_state]);
return (*lsap_state[self->lsap_state]) (self, event, skb);
}
@@ -160,7 +160,7 @@
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
- IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __FUNCTION__,
+ IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __func__,
irlmp_event[event],
irlmp_state[self->lap_state]);
@@ -169,7 +169,7 @@
void irlmp_discovery_timer_expired(void *data)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
/* We always cleanup the log (active & passive discovery) */
irlmp_do_expiry();
@@ -184,7 +184,7 @@
{
struct lsap_cb *self = (struct lsap_cb *) data;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -196,7 +196,7 @@
{
struct lap_cb *self = (struct lap_cb *) data;
- IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(2, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
@@ -256,7 +256,7 @@
static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self->irlap != NULL, return;);
switch (event) {
@@ -276,7 +276,7 @@
irlap_connect_response(self->irlap, skb);
break;
case LM_LAP_CONNECT_REQUEST:
- IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __func__);
irlmp_next_lap_state(self, LAP_U_CONNECT);
@@ -285,13 +285,13 @@
break;
case LM_LAP_DISCONNECT_INDICATION:
IRDA_DEBUG(4, "%s(), Error LM_LAP_DISCONNECT_INDICATION\n",
- __FUNCTION__);
+ __func__);
irlmp_next_lap_state(self, LAP_STANDBY);
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n",
- __FUNCTION__, irlmp_event[event]);
+ __func__, irlmp_event[event]);
break;
}
}
@@ -306,7 +306,7 @@
static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(2, "%s(), event=%s\n", __FUNCTION__, irlmp_event[event]);
+ IRDA_DEBUG(2, "%s(), event=%s\n", __func__, irlmp_event[event]);
switch (event) {
case LM_LAP_CONNECT_INDICATION:
@@ -326,7 +326,7 @@
* the lsaps may already have gone. This avoid getting stuck
* forever in LAP_ACTIVE state - Jean II */
if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
- IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__);
irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
}
break;
@@ -344,12 +344,12 @@
* the lsaps may already have gone. This avoid getting stuck
* forever in LAP_ACTIVE state - Jean II */
if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
- IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__);
irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
}
break;
case LM_LAP_DISCONNECT_INDICATION:
- IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __func__);
irlmp_next_lap_state(self, LAP_STANDBY);
/* Send disconnect event to all LSAPs using this link */
@@ -357,7 +357,7 @@
LM_LAP_DISCONNECT_INDICATION);
break;
case LM_LAP_DISCONNECT_REQUEST:
- IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __func__);
/* One of the LSAP did timeout or was closed, if it was
* the last one, try to get out of here - Jean II */
@@ -367,7 +367,7 @@
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n",
- __FUNCTION__, irlmp_event[event]);
+ __func__, irlmp_event[event]);
break;
}
}
@@ -381,11 +381,11 @@
static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb)
{
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) {
case LM_LAP_CONNECT_REQUEST:
- IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __func__);
/*
* IrLAP may have a pending disconnect. We tried to close
@@ -468,7 +468,7 @@
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s\n",
- __FUNCTION__, irlmp_event[event]);
+ __func__, irlmp_event[event]);
break;
}
}
@@ -490,7 +490,7 @@
{
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -505,11 +505,11 @@
break;
#endif /* CONFIG_IRDA_ULTRA */
case LM_CONNECT_REQUEST:
- IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __func__);
if (self->conn_skb) {
IRDA_WARNING("%s: busy with another request!\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
/* Don't forget to refcount it (see irlmp_connect_request()) */
@@ -526,7 +526,7 @@
case LM_CONNECT_INDICATION:
if (self->conn_skb) {
IRDA_WARNING("%s: busy with another request!\n",
- __FUNCTION__);
+ __func__);
return -EBUSY;
}
/* Don't forget to refcount it (see irlap_driver_rcv()) */
@@ -552,7 +552,7 @@
break;
default:
IRDA_DEBUG(1, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
@@ -570,7 +570,7 @@
struct lsap_cb *lsap;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -603,7 +603,7 @@
case LM_WATCHDOG_TIMEOUT:
/* May happen, who knows...
* Jean II */
- IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
/* Disconnect, get out... - Jean II */
self->lap = NULL;
@@ -614,7 +614,7 @@
/* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
* are *not* yet bound to the IrLAP link. Jean II */
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
@@ -632,7 +632,7 @@
struct sk_buff *tx_skb;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -643,16 +643,16 @@
break;
case LM_CONNECT_RESPONSE:
IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
- "no indication issued yet\n", __FUNCTION__);
+ "no indication issued yet\n", __func__);
/* Keep state */
break;
case LM_DISCONNECT_REQUEST:
IRDA_DEBUG(0, "%s(), LM_DISCONNECT_REQUEST, "
- "not yet bound to IrLAP connection\n", __FUNCTION__);
+ "not yet bound to IrLAP connection\n", __func__);
/* Keep state */
break;
case LM_LAP_CONNECT_CONFIRM:
- IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __func__);
irlmp_next_lsap_state(self, LSAP_CONNECT);
tx_skb = self->conn_skb;
@@ -666,7 +666,7 @@
/* Will happen in some rare cases because of a race condition.
* Just make sure we don't stay there forever...
* Jean II */
- IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
/* Go back to disconnected mode, keep the socket waiting */
self->lap = NULL;
@@ -680,7 +680,7 @@
/* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
* are *not* yet bound to the IrLAP link. Jean II */
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
@@ -698,7 +698,7 @@
LM_REASON reason;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -722,12 +722,12 @@
break;
case LM_CONNECT_REQUEST:
IRDA_DEBUG(0, "%s(), LM_CONNECT_REQUEST, "
- "error, LSAP already connected\n", __FUNCTION__);
+ "error, LSAP already connected\n", __func__);
/* Keep state */
break;
case LM_CONNECT_RESPONSE:
IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
- "error, LSAP already connected\n", __FUNCTION__);
+ "error, LSAP already connected\n", __func__);
/* Keep state */
break;
case LM_DISCONNECT_REQUEST:
@@ -740,7 +740,7 @@
/* Try to close the LAP connection if its still there */
if (self->lap) {
IRDA_DEBUG(4, "%s(), trying to close IrLAP\n",
- __FUNCTION__);
+ __func__);
irlmp_do_lap_event(self->lap,
LM_LAP_DISCONNECT_REQUEST,
NULL);
@@ -764,14 +764,14 @@
reason = skb->data[3];
/* Try to close the LAP connection */
- IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
irlmp_disconnect_indication(self, reason, skb);
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
@@ -793,7 +793,7 @@
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
switch (event) {
case LM_CONNECT_CONFIRM:
@@ -814,7 +814,7 @@
reason = skb->data[3];
/* Try to close the LAP connection */
- IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
irlmp_disconnect_indication(self, reason, skb);
@@ -832,7 +832,7 @@
irlmp_disconnect_indication(self, reason, skb);
break;
case LM_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
IRDA_ASSERT(self->lap != NULL, return -1;);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
@@ -842,7 +842,7 @@
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;
@@ -863,7 +863,7 @@
LM_REASON reason;
int ret = 0;
- IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+ IRDA_DEBUG(4, "%s()\n", __func__);
IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(irlmp != NULL, return -1;);
@@ -883,7 +883,7 @@
irlmp_next_lsap_state(self, LSAP_SETUP);
break;
case LM_WATCHDOG_TIMEOUT:
- IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __FUNCTION__);
+ IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __func__);
IRDA_ASSERT(self->lap != NULL, return -1;);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
@@ -902,7 +902,7 @@
break;
default:
IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
- __FUNCTION__, irlmp_event[event], self->slsap_sel);
+ __func__, irlmp_event[event], self->slsap_sel);
break;
}
return ret;