aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-05 23:47:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-05 23:47:47 -0500
commit0dc47877a3de00ceadea0005189656ae8dc52669 (patch)
tree7440a87385fe318cb42f0ae161be195f5e967d82 /net
parent6387c4bed539539b05fa773cf2ff26529dc3074c (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_dev.c12
-rw-r--r--net/8021q/vlanproc.c2
-rw-r--r--net/9p/error.c2
-rw-r--r--net/bridge/br_sysfs_br.c6
-rw-r--r--net/core/sock.c2
-rw-r--r--net/dccp/dccp.h6
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_priv.h2
-rw-r--r--net/ipv4/af_inet.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_tcp.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_udp.c2
-rw-r--r--net/ipv4/ipvs/ip_vs_sync.c4
-rw-r--r--net/ipv4/netfilter/arp_tables.c2
-rw-r--r--net/ipv4/netfilter/ip_tables.c2
-rw-r--r--net/ipv4/tcp_input.c2
-rw-r--r--net/ipv4/udplite_ipv4.c4
-rw-r--r--net/ipv6/addrconf.c4
-rw-r--r--net/ipv6/addrlabel.c14
-rw-r--r--net/ipv6/ip6_tunnel.c2
-rw-r--r--net/ipv6/mip6.c20
-rw-r--r--net/ipv6/ndisc.c14
-rw-r--r--net/ipv6/netfilter/ip6_tables.c2
-rw-r--r--net/ipv6/netfilter/ip6t_REJECT.c2
-rw-r--r--net/ipv6/route.c4
-rw-r--r--net/ipv6/tcp_ipv6.c8
-rw-r--r--net/irda/af_irda.c178
-rw-r--r--net/irda/discovery.c4
-rw-r--r--net/irda/ircomm/ircomm_core.c46
-rw-r--r--net/irda/ircomm/ircomm_event.c12
-rw-r--r--net/irda/ircomm/ircomm_lmp.c30
-rw-r--r--net/irda/ircomm/ircomm_param.c32
-rw-r--r--net/irda/ircomm/ircomm_ttp.c26
-rw-r--r--net/irda/ircomm/ircomm_tty.c90
-rw-r--r--net/irda/ircomm/ircomm_tty_attach.c78
-rw-r--r--net/irda/ircomm/ircomm_tty_ioctl.c18
-rw-r--r--net/irda/irda_device.c18
-rw-r--r--net/irda/iriap.c76
-rw-r--r--net/irda/iriap_event.c38
-rw-r--r--net/irda/irias_object.c44
-rw-r--r--net/irda/irlan/irlan_client.c48
-rw-r--r--net/irda/irlan/irlan_client_event.c64
-rw-r--r--net/irda/irlan/irlan_common.c72
-rw-r--r--net/irda/irlan/irlan_eth.c18
-rw-r--r--net/irda/irlan/irlan_event.c4
-rw-r--r--net/irda/irlan/irlan_filter.c4
-rw-r--r--net/irda/irlan/irlan_provider.c30
-rw-r--r--net/irda/irlan/irlan_provider_event.c16
-rw-r--r--net/irda/irlap.c56
-rw-r--r--net/irda/irlap_event.c122
-rw-r--r--net/irda/irlap_frame.c74
-rw-r--r--net/irda/irlmp.c112
-rw-r--r--net/irda/irlmp_event.c94
-rw-r--r--net/irda/irlmp_frame.c36
-rw-r--r--net/irda/irmod.c2
-rw-r--r--net/irda/irnet/irnet.h10
-rw-r--r--net/irda/irnetlink.c4
-rw-r--r--net/irda/irqueue.c8
-rw-r--r--net/irda/irttp.c108
-rw-r--r--net/irda/parameters.c42
-rw-r--r--net/irda/qos.c24
-rw-r--r--net/irda/wrapper.c18
-rw-r--r--net/llc/af_llc.c16
-rw-r--r--net/llc/llc_c_ac.c2
-rw-r--r--net/llc/llc_c_ev.c8
-rw-r--r--net/llc/llc_conn.c24
-rw-r--r--net/llc/llc_input.c4
-rw-r--r--net/mac80211/ieee80211_iface.c2
-rw-r--r--net/rxrpc/ar-internal.h8
-rw-r--r--net/sctp/associola.c8
-rw-r--r--net/sctp/chunk.c2
-rw-r--r--net/sctp/input.c2
-rw-r--r--net/sctp/ipv6.c8
-rw-r--r--net/sctp/output.c14
-rw-r--r--net/sctp/outqueue.c14
-rw-r--r--net/sctp/protocol.c4
-rw-r--r--net/sctp/sm_sideeffect.c6
-rw-r--r--net/sctp/sm_statefuns.c10
-rw-r--r--net/sctp/socket.c14
-rw-r--r--net/sctp/transport.c10
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c2
-rw-r--r--net/sunrpc/clnt.c44
-rw-r--r--net/sunrpc/rpc_pipe.c12
-rw-r--r--net/sunrpc/rpcb_clnt.c20
-rw-r--r--net/sunrpc/xprtsock.c2
-rw-r--r--net/unix/af_unix.c2
84 files changed, 1008 insertions, 1008 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 77f04e49a1a0..556b2893b56b 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -171,7 +171,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
171 skb->dev = __find_vlan_dev(dev, vid); 171 skb->dev = __find_vlan_dev(dev, vid);
172 if (!skb->dev) { 172 if (!skb->dev) {
173 pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n", 173 pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n",
174 __FUNCTION__, (unsigned int)vid, dev->name); 174 __func__, (unsigned int)vid, dev->name);
175 goto err_unlock; 175 goto err_unlock;
176 } 176 }
177 177
@@ -187,7 +187,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
187 ntohs(vhdr->h_vlan_TCI)); 187 ntohs(vhdr->h_vlan_TCI));
188 188
189 pr_debug("%s: priority: %u for TCI: %hu\n", 189 pr_debug("%s: priority: %u for TCI: %hu\n",
190 __FUNCTION__, skb->priority, ntohs(vhdr->h_vlan_TCI)); 190 __func__, skb->priority, ntohs(vhdr->h_vlan_TCI));
191 191
192 switch (skb->pkt_type) { 192 switch (skb->pkt_type) {
193 case PACKET_BROADCAST: /* Yeah, stats collect these together.. */ 193 case PACKET_BROADCAST: /* Yeah, stats collect these together.. */
@@ -268,7 +268,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
268 struct net_device *vdev = dev; 268 struct net_device *vdev = dev;
269 269
270 pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n", 270 pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n",
271 __FUNCTION__, skb, type, len, vlan_dev_info(dev)->vlan_id, 271 __func__, skb, type, len, vlan_dev_info(dev)->vlan_id,
272 daddr); 272 daddr);
273 273
274 /* build vlan header only if re_order_header flag is NOT set. This 274 /* build vlan header only if re_order_header flag is NOT set. This
@@ -340,7 +340,7 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
340 return -ENOMEM; 340 return -ENOMEM;
341 } 341 }
342 vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++; 342 vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++;
343 pr_debug("%s: %s: had to grow skb\n", __FUNCTION__, vdev->name); 343 pr_debug("%s: %s: had to grow skb\n", __func__, vdev->name);
344 } 344 }
345 345
346 if (build_vlan_header) { 346 if (build_vlan_header) {
@@ -382,7 +382,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
382 vlan_dev_info(dev)->cnt_encap_on_xmit++; 382 vlan_dev_info(dev)->cnt_encap_on_xmit++;
383 383
384 pr_debug("%s: proto to encap: 0x%hx\n", 384 pr_debug("%s: proto to encap: 0x%hx\n",
385 __FUNCTION__, htons(veth->h_vlan_proto)); 385 __func__, htons(veth->h_vlan_proto));
386 /* Construct the second two bytes. This field looks something 386 /* Construct the second two bytes. This field looks something
387 * like: 387 * like:
388 * usr_priority: 3 bits (high bits) 388 * usr_priority: 3 bits (high bits)
@@ -403,7 +403,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
403 } 403 }
404 404
405 pr_debug("%s: about to send skb: %p to dev: %s\n", 405 pr_debug("%s: about to send skb: %p to dev: %s\n",
406 __FUNCTION__, skb, skb->dev->name); 406 __func__, skb, skb->dev->name);
407 pr_debug(" " MAC_FMT " " MAC_FMT " %4hx %4hx %4hx\n", 407 pr_debug(" " MAC_FMT " " MAC_FMT " %4hx %4hx %4hx\n",
408 veth->h_dest[0], veth->h_dest[1], veth->h_dest[2], 408 veth->h_dest[0], veth->h_dest[1], veth->h_dest[2],
409 veth->h_dest[3], veth->h_dest[4], veth->h_dest[5], 409 veth->h_dest[3], veth->h_dest[4], veth->h_dest[5],
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 146cfb0e9882..3b8657a0b837 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -168,7 +168,7 @@ int __init vlan_proc_init(void)
168 return 0; 168 return 0;
169 169
170err: 170err:
171 pr_err("%s: can't create entry in proc filesystem!\n", __FUNCTION__); 171 pr_err("%s: can't create entry in proc filesystem!\n", __func__);
172 vlan_proc_cleanup(); 172 vlan_proc_cleanup();
173 return -ENOBUFS; 173 return -ENOBUFS;
174} 174}
diff --git a/net/9p/error.c b/net/9p/error.c
index ab2458b6c903..64104b9cb422 100644
--- a/net/9p/error.c
+++ b/net/9p/error.c
@@ -230,7 +230,7 @@ int p9_errstr2errno(char *errstr, int len)
230 if (errno == 0) { 230 if (errno == 0) {
231 /* TODO: if error isn't found, add it dynamically */ 231 /* TODO: if error isn't found, add it dynamically */
232 errstr[len] = 0; 232 errstr[len] = 0;
233 printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__, 233 printk(KERN_ERR "%s: errstr :%s: not found\n", __func__,
234 errstr); 234 errstr);
235 errno = 1; 235 errno = 1;
236 } 236 }
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index 9cf0538d1717..27d6a511c8c1 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -415,21 +415,21 @@ int br_sysfs_addbr(struct net_device *dev)
415 err = sysfs_create_group(brobj, &bridge_group); 415 err = sysfs_create_group(brobj, &bridge_group);
416 if (err) { 416 if (err) {
417 pr_info("%s: can't create group %s/%s\n", 417 pr_info("%s: can't create group %s/%s\n",
418 __FUNCTION__, dev->name, bridge_group.name); 418 __func__, dev->name, bridge_group.name);
419 goto out1; 419 goto out1;
420 } 420 }
421 421
422 err = sysfs_create_bin_file(brobj, &bridge_forward); 422 err = sysfs_create_bin_file(brobj, &bridge_forward);
423 if (err) { 423 if (err) {
424 pr_info("%s: can't create attribute file %s/%s\n", 424 pr_info("%s: can't create attribute file %s/%s\n",
425 __FUNCTION__, dev->name, bridge_forward.attr.name); 425 __func__, dev->name, bridge_forward.attr.name);
426 goto out2; 426 goto out2;
427 } 427 }
428 428
429 br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj); 429 br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj);
430 if (!br->ifobj) { 430 if (!br->ifobj) {
431 pr_info("%s: can't add kobject (directory) %s/%s\n", 431 pr_info("%s: can't add kobject (directory) %s/%s\n",
432 __FUNCTION__, dev->name, SYSFS_BRIDGE_PORT_SUBDIR); 432 __func__, dev->name, SYSFS_BRIDGE_PORT_SUBDIR);
433 goto out3; 433 goto out3;
434 } 434 }
435 return 0; 435 return 0;
diff --git a/net/core/sock.c b/net/core/sock.c
index 0ca069738021..bb5236aee643 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -981,7 +981,7 @@ void sk_free(struct sock *sk)
981 981
982 if (atomic_read(&sk->sk_omem_alloc)) 982 if (atomic_read(&sk->sk_omem_alloc))
983 printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n", 983 printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n",
984 __FUNCTION__, atomic_read(&sk->sk_omem_alloc)); 984 __func__, atomic_read(&sk->sk_omem_alloc));
985 985
986 put_net(sk->sk_net); 986 put_net(sk->sk_net);
987 sk_prot_free(sk->sk_prot_creator, sk); 987 sk_prot_free(sk->sk_prot_creator, sk);
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 287a62bc2e0f..e1b7c9c6a623 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -23,9 +23,9 @@
23 * DCCP - specific warning and debugging macros. 23 * DCCP - specific warning and debugging macros.
24 */ 24 */
25#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \ 25#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \
26 __FUNCTION__, ##a) 26 __func__, ##a)
27#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \ 27#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
28 __FILE__, __LINE__, __FUNCTION__) 28 __FILE__, __LINE__, __func__)
29#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0) 29#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
30#define DCCP_BUG_ON(cond) do { if (unlikely((cond) != 0)) \ 30#define DCCP_BUG_ON(cond) do { if (unlikely((cond) != 0)) \
31 DCCP_BUG("\"%s\" holds (exception!)", \ 31 DCCP_BUG("\"%s\" holds (exception!)", \
@@ -36,7 +36,7 @@
36 printk(fmt, ##args); \ 36 printk(fmt, ##args); \
37 } while(0) 37 } while(0)
38#define DCCP_PR_DEBUG(enable, fmt, a...) DCCP_PRINTK(enable, KERN_DEBUG \ 38#define DCCP_PR_DEBUG(enable, fmt, a...) DCCP_PRINTK(enable, KERN_DEBUG \
39 "%s: " fmt, __FUNCTION__, ##a) 39 "%s: " fmt, __func__, ##a)
40 40
41#ifdef CONFIG_IP_DCCP_DEBUG 41#ifdef CONFIG_IP_DCCP_DEBUG
42extern int dccp_debug; 42extern int dccp_debug;
diff --git a/net/ieee80211/softmac/ieee80211softmac_priv.h b/net/ieee80211/softmac/ieee80211softmac_priv.h
index c43b189634df..f9232c8f6bdc 100644
--- a/net/ieee80211/softmac/ieee80211softmac_priv.h
+++ b/net/ieee80211/softmac/ieee80211softmac_priv.h
@@ -43,7 +43,7 @@
43 do { \ 43 do { \
44 if (unlikely(!(expr))) { \ 44 if (unlikely(!(expr))) { \
45 printkl(KERN_ERR PFX "ASSERTION FAILED (%s) at: %s:%d:%s()\n", #expr, \ 45 printkl(KERN_ERR PFX "ASSERTION FAILED (%s) at: %s:%d:%s()\n", #expr, \
46 __FILE__, __LINE__, __FUNCTION__); \ 46 __FILE__, __LINE__, __func__); \
47 } \ 47 } \
48 } while (0) 48 } while (0)
49#else 49#else
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 67260c0eaaa8..25871c6c7444 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1060,7 +1060,7 @@ static int inet_sk_reselect_saddr(struct sock *sk)
1060 if (sysctl_ip_dynaddr > 1) { 1060 if (sysctl_ip_dynaddr > 1) {
1061 printk(KERN_INFO "%s(): shifting inet->" 1061 printk(KERN_INFO "%s(): shifting inet->"
1062 "saddr from %d.%d.%d.%d to %d.%d.%d.%d\n", 1062 "saddr from %d.%d.%d.%d to %d.%d.%d.%d\n",
1063 __FUNCTION__, 1063 __func__,
1064 NIPQUAD(old_saddr), 1064 NIPQUAD(old_saddr),
1065 NIPQUAD(new_saddr)); 1065 NIPQUAD(new_saddr));
1066 } 1066 }
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c
index 12dc0d640b6d..620e40ff79a9 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -550,7 +550,7 @@ tcp_app_conn_bind(struct ip_vs_conn *cp)
550 550
551 IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->" 551 IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
552 "%u.%u.%u.%u:%u to app %s on port %u\n", 552 "%u.%u.%u.%u:%u to app %s on port %u\n",
553 __FUNCTION__, 553 __func__,
554 NIPQUAD(cp->caddr), ntohs(cp->cport), 554 NIPQUAD(cp->caddr), ntohs(cp->cport),
555 NIPQUAD(cp->vaddr), ntohs(cp->vport), 555 NIPQUAD(cp->vaddr), ntohs(cp->vport),
556 inc->name, ntohs(inc->port)); 556 inc->name, ntohs(inc->port));
diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c
index 1fa7b330b9ac..1caa2908373f 100644
--- a/net/ipv4/ipvs/ip_vs_proto_udp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_udp.c
@@ -344,7 +344,7 @@ static int udp_app_conn_bind(struct ip_vs_conn *cp)
344 344
345 IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->" 345 IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
346 "%u.%u.%u.%u:%u to app %s on port %u\n", 346 "%u.%u.%u.%u:%u to app %s on port %u\n",
347 __FUNCTION__, 347 __func__,
348 NIPQUAD(cp->caddr), ntohs(cp->cport), 348 NIPQUAD(cp->caddr), ntohs(cp->cport),
349 NIPQUAD(cp->vaddr), ntohs(cp->vport), 349 NIPQUAD(cp->vaddr), ntohs(cp->vport),
350 inc->name, ntohs(inc->port)); 350 inc->name, ntohs(inc->port));
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
index 948378d0a755..69c56663cc9a 100644
--- a/net/ipv4/ipvs/ip_vs_sync.c
+++ b/net/ipv4/ipvs/ip_vs_sync.c
@@ -916,7 +916,7 @@ int start_sync_thread(int state, char *mcast_ifn, __u8 syncid)
916 if (!tinfo) 916 if (!tinfo)
917 return -ENOMEM; 917 return -ENOMEM;
918 918
919 IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current)); 919 IP_VS_DBG(7, "%s: pid %d\n", __func__, task_pid_nr(current));
920 IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n", 920 IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n",
921 sizeof(struct ip_vs_sync_conn)); 921 sizeof(struct ip_vs_sync_conn));
922 922
@@ -956,7 +956,7 @@ int stop_sync_thread(int state)
956 (state == IP_VS_STATE_BACKUP && !sync_backup_pid)) 956 (state == IP_VS_STATE_BACKUP && !sync_backup_pid))
957 return -ESRCH; 957 return -ESRCH;
958 958
959 IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current)); 959 IP_VS_DBG(7, "%s: pid %d\n", __func__, task_pid_nr(current));
960 IP_VS_INFO("stopping sync thread %d ...\n", 960 IP_VS_INFO("stopping sync thread %d ...\n",
961 (state == IP_VS_STATE_MASTER) ? 961 (state == IP_VS_STATE_MASTER) ?
962 sync_master_pid : sync_backup_pid); 962 sync_master_pid : sync_backup_pid);
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 9b5904486184..756bc0e1a7c6 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("arptables core");
52do { \ 52do { \
53 if (!(x)) \ 53 if (!(x)) \
54 printk("ARP_NF_ASSERT: %s:%s:%u\n", \ 54 printk("ARP_NF_ASSERT: %s:%s:%u\n", \
55 __FUNCTION__, __FILE__, __LINE__); \ 55 __func__, __FILE__, __LINE__); \
56} while(0) 56} while(0)
57#else 57#else
58#define ARP_NF_ASSERT(x) 58#define ARP_NF_ASSERT(x)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 600737f122d2..85a75e186b4b 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -53,7 +53,7 @@ MODULE_DESCRIPTION("IPv4 packet filter");
53do { \ 53do { \
54 if (!(x)) \ 54 if (!(x)) \
55 printk("IP_NF_ASSERT: %s:%s:%u\n", \ 55 printk("IP_NF_ASSERT: %s:%s:%u\n", \
56 __FUNCTION__, __FILE__, __LINE__); \ 56 __func__, __FILE__, __LINE__); \
57} while(0) 57} while(0)
58#else 58#else
59#define IP_NF_ASSERT(x) 59#define IP_NF_ASSERT(x)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c4679f343675..9cf446427cc2 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3561,7 +3561,7 @@ static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
3561 * cases we should never reach this piece of code. 3561 * cases we should never reach this piece of code.
3562 */ 3562 */
3563 printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n", 3563 printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n",
3564 __FUNCTION__, sk->sk_state); 3564 __func__, sk->sk_state);
3565 break; 3565 break;
3566 } 3566 }
3567 3567
diff --git a/net/ipv4/udplite_ipv4.c b/net/ipv4/udplite_ipv4.c
index 001b881ca36f..d49c6d68c8a9 100644
--- a/net/ipv4/udplite_ipv4.c
+++ b/net/ipv4/udplite_ipv4.c
@@ -106,14 +106,14 @@ void __init udplite4_register(void)
106 106
107#ifdef CONFIG_PROC_FS 107#ifdef CONFIG_PROC_FS
108 if (udp_proc_register(&udplite4_seq_afinfo)) /* udplite4_proc_init() */ 108 if (udp_proc_register(&udplite4_seq_afinfo)) /* udplite4_proc_init() */
109 printk(KERN_ERR "%s: Cannot register /proc!\n", __FUNCTION__); 109 printk(KERN_ERR "%s: Cannot register /proc!\n", __func__);
110#endif 110#endif
111 return; 111 return;
112 112
113out_unregister_proto: 113out_unregister_proto:
114 proto_unregister(&udplite_prot); 114 proto_unregister(&udplite_prot);
115out_register_err: 115out_register_err:
116 printk(KERN_CRIT "%s: Cannot add UDP-Lite protocol.\n", __FUNCTION__); 116 printk(KERN_CRIT "%s: Cannot add UDP-Lite protocol.\n", __func__);
117} 117}
118 118
119EXPORT_SYMBOL(udplite_hash); 119EXPORT_SYMBOL(udplite_hash);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2ad07c7dc553..4b86d388bf63 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -349,7 +349,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
349 if (snmp6_alloc_dev(ndev) < 0) { 349 if (snmp6_alloc_dev(ndev) < 0) {
350 ADBG((KERN_WARNING 350 ADBG((KERN_WARNING
351 "%s(): cannot allocate memory for statistics; dev=%s.\n", 351 "%s(): cannot allocate memory for statistics; dev=%s.\n",
352 __FUNCTION__, dev->name)); 352 __func__, dev->name));
353 neigh_parms_release(&nd_tbl, ndev->nd_parms); 353 neigh_parms_release(&nd_tbl, ndev->nd_parms);
354 ndev->dead = 1; 354 ndev->dead = 1;
355 in6_dev_finish_destroy(ndev); 355 in6_dev_finish_destroy(ndev);
@@ -359,7 +359,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
359 if (snmp6_register_dev(ndev) < 0) { 359 if (snmp6_register_dev(ndev) < 0) {
360 ADBG((KERN_WARNING 360 ADBG((KERN_WARNING
361 "%s(): cannot create /proc/net/dev_snmp6/%s\n", 361 "%s(): cannot create /proc/net/dev_snmp6/%s\n",
362 __FUNCTION__, dev->name)); 362 __func__, dev->name));
363 neigh_parms_release(&nd_tbl, ndev->nd_parms); 363 neigh_parms_release(&nd_tbl, ndev->nd_parms);
364 ndev->dead = 1; 364 ndev->dead = 1;
365 in6_dev_finish_destroy(ndev); 365 in6_dev_finish_destroy(ndev);
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index 3a8b3f52da35..de371b5997fe 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -166,7 +166,7 @@ u32 ipv6_addr_label(const struct in6_addr *addr, int type, int ifindex)
166 rcu_read_unlock(); 166 rcu_read_unlock();
167 167
168 ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n", 168 ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n",
169 __FUNCTION__, 169 __func__,
170 NIP6(*addr), type, ifindex, 170 NIP6(*addr), type, ifindex,
171 label); 171 label);
172 172
@@ -182,7 +182,7 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(const struct in6_addr *prefix,
182 int addrtype; 182 int addrtype;
183 183
184 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n", 184 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n",
185 __FUNCTION__, 185 __func__,
186 NIP6(*prefix), prefixlen, 186 NIP6(*prefix), prefixlen,
187 ifindex, 187 ifindex,
188 (unsigned int)label); 188 (unsigned int)label);
@@ -226,7 +226,7 @@ static int __ip6addrlbl_add(struct ip6addrlbl_entry *newp, int replace)
226 int ret = 0; 226 int ret = 0;
227 227
228 ADDRLABEL(KERN_DEBUG "%s(newp=%p, replace=%d)\n", 228 ADDRLABEL(KERN_DEBUG "%s(newp=%p, replace=%d)\n",
229 __FUNCTION__, 229 __func__,
230 newp, replace); 230 newp, replace);
231 231
232 if (hlist_empty(&ip6addrlbl_table.head)) { 232 if (hlist_empty(&ip6addrlbl_table.head)) {
@@ -268,7 +268,7 @@ static int ip6addrlbl_add(const struct in6_addr *prefix, int prefixlen,
268 int ret = 0; 268 int ret = 0;
269 269
270 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n", 270 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n",
271 __FUNCTION__, 271 __func__,
272 NIP6(*prefix), prefixlen, 272 NIP6(*prefix), prefixlen,
273 ifindex, 273 ifindex,
274 (unsigned int)label, 274 (unsigned int)label,
@@ -294,7 +294,7 @@ static int __ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen,
294 int ret = -ESRCH; 294 int ret = -ESRCH;
295 295
296 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n", 296 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
297 __FUNCTION__, 297 __func__,
298 NIP6(*prefix), prefixlen, 298 NIP6(*prefix), prefixlen,
299 ifindex); 299 ifindex);
300 300
@@ -318,7 +318,7 @@ static int ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen,
318 int ret; 318 int ret;
319 319
320 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n", 320 ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
321 __FUNCTION__, 321 __func__,
322 NIP6(*prefix), prefixlen, 322 NIP6(*prefix), prefixlen,
323 ifindex); 323 ifindex);
324 324
@@ -335,7 +335,7 @@ static __init int ip6addrlbl_init(void)
335 int err = 0; 335 int err = 0;
336 int i; 336 int i;
337 337
338 ADDRLABEL(KERN_DEBUG "%s()\n", __FUNCTION__); 338 ADDRLABEL(KERN_DEBUG "%s()\n", __func__);
339 339
340 for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) { 340 for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) {
341 int ret = ip6addrlbl_add(ip6addrlbl_init_table[i].prefix, 341 int ret = ip6addrlbl_add(ip6addrlbl_init_table[i].prefix,
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 1e1ad1ed87e6..61517fe0c57c 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -60,7 +60,7 @@ MODULE_LICENSE("GPL");
60#define IPV6_TLV_TEL_DST_SIZE 8 60#define IPV6_TLV_TEL_DST_SIZE 8
61 61
62#ifdef IP6_TNL_DEBUG 62#ifdef IP6_TNL_DEBUG
63#define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __FUNCTION__) 63#define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __func__)
64#else 64#else
65#define IP6_TNL_TRACE(x...) do {;} while(0) 65#define IP6_TNL_TRACE(x...) do {;} while(0)
66#endif 66#endif
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c
index cd8a5bda13cd..42403c626c27 100644
--- a/net/ipv6/mip6.c
+++ b/net/ipv6/mip6.c
@@ -304,13 +304,13 @@ static int mip6_destopt_offset(struct xfrm_state *x, struct sk_buff *skb,
304static int mip6_destopt_init_state(struct xfrm_state *x) 304static int mip6_destopt_init_state(struct xfrm_state *x)
305{ 305{
306 if (x->id.spi) { 306 if (x->id.spi) {
307 printk(KERN_INFO "%s: spi is not 0: %u\n", __FUNCTION__, 307 printk(KERN_INFO "%s: spi is not 0: %u\n", __func__,
308 x->id.spi); 308 x->id.spi);
309 return -EINVAL; 309 return -EINVAL;
310 } 310 }
311 if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { 311 if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
312 printk(KERN_INFO "%s: state's mode is not %u: %u\n", 312 printk(KERN_INFO "%s: state's mode is not %u: %u\n",
313 __FUNCTION__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); 313 __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
314 return -EINVAL; 314 return -EINVAL;
315 } 315 }
316 316
@@ -439,13 +439,13 @@ static int mip6_rthdr_offset(struct xfrm_state *x, struct sk_buff *skb,
439static int mip6_rthdr_init_state(struct xfrm_state *x) 439static int mip6_rthdr_init_state(struct xfrm_state *x)
440{ 440{
441 if (x->id.spi) { 441 if (x->id.spi) {
442 printk(KERN_INFO "%s: spi is not 0: %u\n", __FUNCTION__, 442 printk(KERN_INFO "%s: spi is not 0: %u\n", __func__,
443 x->id.spi); 443 x->id.spi);
444 return -EINVAL; 444 return -EINVAL;
445 } 445 }
446 if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) { 446 if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
447 printk(KERN_INFO "%s: state's mode is not %u: %u\n", 447 printk(KERN_INFO "%s: state's mode is not %u: %u\n",
448 __FUNCTION__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode); 448 __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
449 return -EINVAL; 449 return -EINVAL;
450 } 450 }
451 451
@@ -480,15 +480,15 @@ static int __init mip6_init(void)
480 printk(KERN_INFO "Mobile IPv6\n"); 480 printk(KERN_INFO "Mobile IPv6\n");
481 481
482 if (xfrm_register_type(&mip6_destopt_type, AF_INET6) < 0) { 482 if (xfrm_register_type(&mip6_destopt_type, AF_INET6) < 0) {
483 printk(KERN_INFO "%s: can't add xfrm type(destopt)\n", __FUNCTION__); 483 printk(KERN_INFO "%s: can't add xfrm type(destopt)\n", __func__);
484 goto mip6_destopt_xfrm_fail; 484 goto mip6_destopt_xfrm_fail;
485 } 485 }
486 if (xfrm_register_type(&mip6_rthdr_type, AF_INET6) < 0) { 486 if (xfrm_register_type(&mip6_rthdr_type, AF_INET6) < 0) {
487 printk(KERN_INFO "%s: can't add xfrm type(rthdr)\n", __FUNCTION__); 487 printk(KERN_INFO "%s: can't add xfrm type(rthdr)\n", __func__);
488 goto mip6_rthdr_xfrm_fail; 488 goto mip6_rthdr_xfrm_fail;
489 } 489 }
490 if (rawv6_mh_filter_register(mip6_mh_filter) < 0) { 490 if (rawv6_mh_filter_register(mip6_mh_filter) < 0) {
491 printk(KERN_INFO "%s: can't add rawv6 mh filter\n", __FUNCTION__); 491 printk(KERN_INFO "%s: can't add rawv6 mh filter\n", __func__);
492 goto mip6_rawv6_mh_fail; 492 goto mip6_rawv6_mh_fail;
493 } 493 }
494 494
@@ -506,11 +506,11 @@ static int __init mip6_init(void)
506static void __exit mip6_fini(void) 506static void __exit mip6_fini(void)
507{ 507{
508 if (rawv6_mh_filter_unregister(mip6_mh_filter) < 0) 508 if (rawv6_mh_filter_unregister(mip6_mh_filter) < 0)
509 printk(KERN_INFO "%s: can't remove rawv6 mh filter\n", __FUNCTION__); 509 printk(KERN_INFO "%s: can't remove rawv6 mh filter\n", __func__);
510 if (xfrm_unregister_type(&mip6_rthdr_type, AF_INET6) < 0) 510 if (xfrm_unregister_type(&mip6_rthdr_type, AF_INET6) < 0)
511 printk(KERN_INFO "%s: can't remove xfrm type(rthdr)\n", __FUNCTION__); 511 printk(KERN_INFO "%s: can't remove xfrm type(rthdr)\n", __func__);
512 if (xfrm_unregister_type(&mip6_destopt_type, AF_INET6) < 0) 512 if (xfrm_unregister_type(&mip6_destopt_type, AF_INET6) < 0)
513 printk(KERN_INFO "%s: can't remove xfrm type(destopt)\n", __FUNCTION__); 513 printk(KERN_INFO "%s: can't remove xfrm type(destopt)\n", __func__);
514} 514}
515 515
516module_init(mip6_init); 516module_init(mip6_init);
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b5b4fd173e98..e0d023360a88 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -270,7 +270,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
270 if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) { 270 if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) {
271 ND_PRINTK2(KERN_WARNING 271 ND_PRINTK2(KERN_WARNING
272 "%s(): duplicated ND6 option found: type=%d\n", 272 "%s(): duplicated ND6 option found: type=%d\n",
273 __FUNCTION__, 273 __func__,
274 nd_opt->nd_opt_type); 274 nd_opt->nd_opt_type);
275 } else { 275 } else {
276 ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt; 276 ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
@@ -301,7 +301,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
301 */ 301 */
302 ND_PRINTK2(KERN_NOTICE 302 ND_PRINTK2(KERN_NOTICE
303 "%s(): ignored unsupported option; type=%d, len=%d\n", 303 "%s(): ignored unsupported option; type=%d, len=%d\n",
304 __FUNCTION__, 304 __func__,
305 nd_opt->nd_opt_type, nd_opt->nd_opt_len); 305 nd_opt->nd_opt_type, nd_opt->nd_opt_len);
306 } 306 }
307 } 307 }
@@ -484,7 +484,7 @@ static void __ndisc_send(struct net_device *dev,
484 if (!skb) { 484 if (!skb) {
485 ND_PRINTK0(KERN_ERR 485 ND_PRINTK0(KERN_ERR
486 "ICMPv6 ND: %s() failed to allocate an skb.\n", 486 "ICMPv6 ND: %s() failed to allocate an skb.\n",
487 __FUNCTION__); 487 __func__);
488 dst_release(dst); 488 dst_release(dst);
489 return; 489 return;
490 } 490 }
@@ -647,7 +647,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
647 ND_PRINTK1(KERN_DEBUG 647 ND_PRINTK1(KERN_DEBUG
648 "%s(): trying to ucast probe in NUD_INVALID: " 648 "%s(): trying to ucast probe in NUD_INVALID: "
649 NIP6_FMT "\n", 649 NIP6_FMT "\n",
650 __FUNCTION__, 650 __func__,
651 NIP6(*target)); 651 NIP6(*target));
652 } 652 }
653 ndisc_send_ns(dev, neigh, target, target, saddr); 653 ndisc_send_ns(dev, neigh, target, target, saddr);
@@ -1149,7 +1149,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
1149 if (rt == NULL) { 1149 if (rt == NULL) {
1150 ND_PRINTK0(KERN_ERR 1150 ND_PRINTK0(KERN_ERR
1151 "ICMPv6 RA: %s() failed to add default route.\n", 1151 "ICMPv6 RA: %s() failed to add default route.\n",
1152 __FUNCTION__); 1152 __func__);
1153 in6_dev_put(in6_dev); 1153 in6_dev_put(in6_dev);
1154 return; 1154 return;
1155 } 1155 }
@@ -1158,7 +1158,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
1158 if (neigh == NULL) { 1158 if (neigh == NULL) {
1159 ND_PRINTK0(KERN_ERR 1159 ND_PRINTK0(KERN_ERR
1160 "ICMPv6 RA: %s() got default router without neighbour.\n", 1160 "ICMPv6 RA: %s() got default router without neighbour.\n",
1161 __FUNCTION__); 1161 __func__);
1162 dst_release(&rt->u.dst); 1162 dst_release(&rt->u.dst);
1163 in6_dev_put(in6_dev); 1163 in6_dev_put(in6_dev);
1164 return; 1164 return;
@@ -1471,7 +1471,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1471 if (buff == NULL) { 1471 if (buff == NULL) {
1472 ND_PRINTK0(KERN_ERR 1472 ND_PRINTK0(KERN_ERR
1473 "ICMPv6 Redirect: %s() failed to allocate an skb.\n", 1473 "ICMPv6 Redirect: %s() failed to allocate an skb.\n",
1474 __FUNCTION__); 1474 __func__);
1475 dst_release(dst); 1475 dst_release(dst);
1476 return; 1476 return;
1477 } 1477 }
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index bf9bb6e55bb5..af1ec7ba757c 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -55,7 +55,7 @@ MODULE_DESCRIPTION("IPv6 packet filter");
55do { \ 55do { \
56 if (!(x)) \ 56 if (!(x)) \
57 printk("IP_NF_ASSERT: %s:%s:%u\n", \ 57 printk("IP_NF_ASSERT: %s:%s:%u\n", \
58 __FUNCTION__, __FILE__, __LINE__); \ 58 __func__, __FILE__, __LINE__); \
59} while(0) 59} while(0)
60#else 60#else
61#define IP_NF_ASSERT(x) 61#define IP_NF_ASSERT(x)
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index 831708aeab37..baf829075f6f 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -177,7 +177,7 @@ reject_tg6(struct sk_buff *skb, const struct net_device *in,
177{ 177{
178 const struct ip6t_reject_info *reject = targinfo; 178 const struct ip6t_reject_info *reject = targinfo;
179 179
180 pr_debug("%s: medium point\n", __FUNCTION__); 180 pr_debug("%s: medium point\n", __func__);
181 /* WARNING: This code causes reentry within ip6tables. 181 /* WARNING: This code causes reentry within ip6tables.
182 This means that the ip6tables jump stack is now crap. We 182 This means that the ip6tables jump stack is now crap. We
183 must return an absolute verdict. --RR */ 183 must return an absolute verdict. --RR */
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f31d7dc11e72..15e9a86f28c8 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -410,7 +410,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict)
410 struct net *net; 410 struct net *net;
411 411
412 RT6_TRACE("%s(fn->leaf=%p, oif=%d)\n", 412 RT6_TRACE("%s(fn->leaf=%p, oif=%d)\n",
413 __FUNCTION__, fn->leaf, oif); 413 __func__, fn->leaf, oif);
414 414
415 rt0 = fn->rr_ptr; 415 rt0 = fn->rr_ptr;
416 if (!rt0) 416 if (!rt0)
@@ -431,7 +431,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict)
431 } 431 }
432 432
433 RT6_TRACE("%s() => %p\n", 433 RT6_TRACE("%s() => %p\n",
434 __FUNCTION__, match); 434 __func__, match);
435 435
436 net = rt0->rt6i_dev->nd_net; 436 net = rt0->rt6i_dev->nd_net;
437 return (match ? match : net->ipv6.ip6_null_entry); 437 return (match ? match : net->ipv6.ip6_null_entry);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index aacbb7688bf9..b47cce8fea44 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -753,7 +753,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
753 753
754 hp = tcp_get_md5sig_pool(); 754 hp = tcp_get_md5sig_pool();
755 if (!hp) { 755 if (!hp) {
756 printk(KERN_WARNING "%s(): hash pool not found...\n", __FUNCTION__); 756 printk(KERN_WARNING "%s(): hash pool not found...\n", __func__);
757 goto clear_hash_noput; 757 goto clear_hash_noput;
758 } 758 }
759 bp = &hp->md5_blk.ip6; 759 bp = &hp->md5_blk.ip6;
@@ -793,17 +793,17 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
793 /* Now store the hash into the packet */ 793 /* Now store the hash into the packet */
794 err = crypto_hash_init(desc); 794 err = crypto_hash_init(desc);
795 if (err) { 795 if (err) {
796 printk(KERN_WARNING "%s(): hash_init failed\n", __FUNCTION__); 796 printk(KERN_WARNING "%s(): hash_init failed\n", __func__);
797 goto clear_hash; 797 goto clear_hash;
798 } 798 }
799 err = crypto_hash_update(desc, sg, nbytes); 799 err = crypto_hash_update(desc, sg, nbytes);
800 if (err) { 800 if (err) {
801 printk(KERN_WARNING "%s(): hash_update failed\n", __FUNCTION__); 801 printk(KERN_WARNING "%s(): hash_update failed\n", __func__);
802 goto clear_hash; 802 goto clear_hash;
803 } 803 }
804 err = crypto_hash_final(desc, md5_hash); 804 err = crypto_hash_final(desc, md5_hash);
805 if (err) { 805 if (err) {
806 printk(KERN_WARNING "%s(): hash_final failed\n", __FUNCTION__); 806 printk(KERN_WARNING "%s(): hash_final failed\n", __func__);
807 goto clear_hash; 807 goto clear_hash;
808 } 808 }
809 809
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 240b0cbfb532..6f21a53cb3e7 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -85,14 +85,14 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb)
85 struct sock *sk; 85 struct sock *sk;
86 int err; 86 int err;
87 87
88 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 88 IRDA_DEBUG(3, "%s()\n", __func__);
89 89
90 self = instance; 90 self = instance;
91 sk = instance; 91 sk = instance;
92 92
93 err = sock_queue_rcv_skb(sk, skb); 93 err = sock_queue_rcv_skb(sk, skb);
94 if (err) { 94 if (err) {
95 IRDA_DEBUG(1, "%s(), error: no more mem!\n", __FUNCTION__); 95 IRDA_DEBUG(1, "%s(), error: no more mem!\n", __func__);
96 self->rx_flow = FLOW_STOP; 96 self->rx_flow = FLOW_STOP;
97 97
98 /* When we return error, TTP will need to requeue the skb */ 98 /* When we return error, TTP will need to requeue the skb */
@@ -116,7 +116,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
116 116
117 self = instance; 117 self = instance;
118 118
119 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 119 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
120 120
121 /* Don't care about it, but let's not leak it */ 121 /* Don't care about it, but let's not leak it */
122 if(skb) 122 if(skb)
@@ -125,7 +125,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
125 sk = instance; 125 sk = instance;
126 if (sk == NULL) { 126 if (sk == NULL) {
127 IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n", 127 IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n",
128 __FUNCTION__, self); 128 __func__, self);
129 return; 129 return;
130 } 130 }
131 131
@@ -181,7 +181,7 @@ static void irda_connect_confirm(void *instance, void *sap,
181 181
182 self = instance; 182 self = instance;
183 183
184 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 184 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
185 185
186 sk = instance; 186 sk = instance;
187 if (sk == NULL) { 187 if (sk == NULL) {
@@ -203,7 +203,7 @@ static void irda_connect_confirm(void *instance, void *sap,
203 case SOCK_STREAM: 203 case SOCK_STREAM:
204 if (max_sdu_size != 0) { 204 if (max_sdu_size != 0) {
205 IRDA_ERROR("%s: max_sdu_size must be 0\n", 205 IRDA_ERROR("%s: max_sdu_size must be 0\n",
206 __FUNCTION__); 206 __func__);
207 return; 207 return;
208 } 208 }
209 self->max_data_size = irttp_get_max_seg_size(self->tsap); 209 self->max_data_size = irttp_get_max_seg_size(self->tsap);
@@ -211,7 +211,7 @@ static void irda_connect_confirm(void *instance, void *sap,
211 case SOCK_SEQPACKET: 211 case SOCK_SEQPACKET:
212 if (max_sdu_size == 0) { 212 if (max_sdu_size == 0) {
213 IRDA_ERROR("%s: max_sdu_size cannot be 0\n", 213 IRDA_ERROR("%s: max_sdu_size cannot be 0\n",
214 __FUNCTION__); 214 __func__);
215 return; 215 return;
216 } 216 }
217 self->max_data_size = max_sdu_size; 217 self->max_data_size = max_sdu_size;
@@ -220,7 +220,7 @@ static void irda_connect_confirm(void *instance, void *sap,
220 self->max_data_size = irttp_get_max_seg_size(self->tsap); 220 self->max_data_size = irttp_get_max_seg_size(self->tsap);
221 } 221 }
222 222
223 IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__, 223 IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__,
224 self->max_data_size); 224 self->max_data_size);
225 225
226 memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); 226 memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
@@ -245,7 +245,7 @@ static void irda_connect_indication(void *instance, void *sap,
245 245
246 self = instance; 246 self = instance;
247 247
248 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 248 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
249 249
250 sk = instance; 250 sk = instance;
251 if (sk == NULL) { 251 if (sk == NULL) {
@@ -264,7 +264,7 @@ static void irda_connect_indication(void *instance, void *sap,
264 case SOCK_STREAM: 264 case SOCK_STREAM:
265 if (max_sdu_size != 0) { 265 if (max_sdu_size != 0) {
266 IRDA_ERROR("%s: max_sdu_size must be 0\n", 266 IRDA_ERROR("%s: max_sdu_size must be 0\n",
267 __FUNCTION__); 267 __func__);
268 kfree_skb(skb); 268 kfree_skb(skb);
269 return; 269 return;
270 } 270 }
@@ -273,7 +273,7 @@ static void irda_connect_indication(void *instance, void *sap,
273 case SOCK_SEQPACKET: 273 case SOCK_SEQPACKET:
274 if (max_sdu_size == 0) { 274 if (max_sdu_size == 0) {
275 IRDA_ERROR("%s: max_sdu_size cannot be 0\n", 275 IRDA_ERROR("%s: max_sdu_size cannot be 0\n",
276 __FUNCTION__); 276 __func__);
277 kfree_skb(skb); 277 kfree_skb(skb);
278 return; 278 return;
279 } 279 }
@@ -283,7 +283,7 @@ static void irda_connect_indication(void *instance, void *sap,
283 self->max_data_size = irttp_get_max_seg_size(self->tsap); 283 self->max_data_size = irttp_get_max_seg_size(self->tsap);
284 } 284 }
285 285
286 IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__, 286 IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__,
287 self->max_data_size); 287 self->max_data_size);
288 288
289 memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); 289 memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
@@ -302,13 +302,13 @@ static void irda_connect_response(struct irda_sock *self)
302{ 302{
303 struct sk_buff *skb; 303 struct sk_buff *skb;
304 304
305 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 305 IRDA_DEBUG(2, "%s()\n", __func__);
306 306
307 skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, 307 skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER,
308 GFP_ATOMIC); 308 GFP_ATOMIC);
309 if (skb == NULL) { 309 if (skb == NULL) {
310 IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", 310 IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n",
311 __FUNCTION__); 311 __func__);
312 return; 312 return;
313 } 313 }
314 314
@@ -329,7 +329,7 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
329 struct irda_sock *self; 329 struct irda_sock *self;
330 struct sock *sk; 330 struct sock *sk;
331 331
332 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 332 IRDA_DEBUG(2, "%s()\n", __func__);
333 333
334 self = instance; 334 self = instance;
335 sk = instance; 335 sk = instance;
@@ -338,17 +338,17 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
338 switch (flow) { 338 switch (flow) {
339 case FLOW_STOP: 339 case FLOW_STOP:
340 IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n", 340 IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n",
341 __FUNCTION__); 341 __func__);
342 self->tx_flow = flow; 342 self->tx_flow = flow;
343 break; 343 break;
344 case FLOW_START: 344 case FLOW_START:
345 self->tx_flow = flow; 345 self->tx_flow = flow;
346 IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n", 346 IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n",
347 __FUNCTION__); 347 __func__);
348 wake_up_interruptible(sk->sk_sleep); 348 wake_up_interruptible(sk->sk_sleep);
349 break; 349 break;
350 default: 350 default:
351 IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __FUNCTION__); 351 IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __func__);
352 /* Unknown flow command, better stop */ 352 /* Unknown flow command, better stop */
353 self->tx_flow = flow; 353 self->tx_flow = flow;
354 break; 354 break;
@@ -370,11 +370,11 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
370 370
371 self = (struct irda_sock *) priv; 371 self = (struct irda_sock *) priv;
372 if (!self) { 372 if (!self) {
373 IRDA_WARNING("%s: lost myself!\n", __FUNCTION__); 373 IRDA_WARNING("%s: lost myself!\n", __func__);
374 return; 374 return;
375 } 375 }
376 376
377 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 377 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
378 378
379 /* We probably don't need to make any more queries */ 379 /* We probably don't need to make any more queries */
380 iriap_close(self->iriap); 380 iriap_close(self->iriap);
@@ -382,7 +382,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
382 382
383 /* Check if request succeeded */ 383 /* Check if request succeeded */
384 if (result != IAS_SUCCESS) { 384 if (result != IAS_SUCCESS) {
385 IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __FUNCTION__, 385 IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __func__,
386 result); 386 result);
387 387
388 self->errno = result; /* We really need it later */ 388 self->errno = result; /* We really need it later */
@@ -415,11 +415,11 @@ static void irda_selective_discovery_indication(discinfo_t *discovery,
415{ 415{
416 struct irda_sock *self; 416 struct irda_sock *self;
417 417
418 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 418 IRDA_DEBUG(2, "%s()\n", __func__);
419 419
420 self = (struct irda_sock *) priv; 420 self = (struct irda_sock *) priv;
421 if (!self) { 421 if (!self) {
422 IRDA_WARNING("%s: lost myself!\n", __FUNCTION__); 422 IRDA_WARNING("%s: lost myself!\n", __func__);
423 return; 423 return;
424 } 424 }
425 425
@@ -442,7 +442,7 @@ static void irda_discovery_timeout(u_long priv)
442{ 442{
443 struct irda_sock *self; 443 struct irda_sock *self;
444 444
445 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 445 IRDA_DEBUG(2, "%s()\n", __func__);
446 446
447 self = (struct irda_sock *) priv; 447 self = (struct irda_sock *) priv;
448 BUG_ON(self == NULL); 448 BUG_ON(self == NULL);
@@ -467,7 +467,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
467 notify_t notify; 467 notify_t notify;
468 468
469 if (self->tsap) { 469 if (self->tsap) {
470 IRDA_WARNING("%s: busy!\n", __FUNCTION__); 470 IRDA_WARNING("%s: busy!\n", __func__);
471 return -EBUSY; 471 return -EBUSY;
472 } 472 }
473 473
@@ -486,7 +486,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
486 &notify); 486 &notify);
487 if (self->tsap == NULL) { 487 if (self->tsap == NULL) {
488 IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n", 488 IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n",
489 __FUNCTION__); 489 __func__);
490 return -ENOMEM; 490 return -ENOMEM;
491 } 491 }
492 /* Remember which TSAP selector we actually got */ 492 /* Remember which TSAP selector we actually got */
@@ -507,7 +507,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
507 notify_t notify; 507 notify_t notify;
508 508
509 if (self->lsap) { 509 if (self->lsap) {
510 IRDA_WARNING("%s(), busy!\n", __FUNCTION__); 510 IRDA_WARNING("%s(), busy!\n", __func__);
511 return -EBUSY; 511 return -EBUSY;
512 } 512 }
513 513
@@ -519,7 +519,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
519 519
520 self->lsap = irlmp_open_lsap(LSAP_CONNLESS, &notify, pid); 520 self->lsap = irlmp_open_lsap(LSAP_CONNLESS, &notify, pid);
521 if (self->lsap == NULL) { 521 if (self->lsap == NULL) {
522 IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __FUNCTION__); 522 IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __func__);
523 return -ENOMEM; 523 return -ENOMEM;
524 } 524 }
525 525
@@ -540,11 +540,11 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
540 */ 540 */
541static int irda_find_lsap_sel(struct irda_sock *self, char *name) 541static int irda_find_lsap_sel(struct irda_sock *self, char *name)
542{ 542{
543 IRDA_DEBUG(2, "%s(%p, %s)\n", __FUNCTION__, self, name); 543 IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name);
544 544
545 if (self->iriap) { 545 if (self->iriap) {
546 IRDA_WARNING("%s(): busy with a previous query\n", 546 IRDA_WARNING("%s(): busy with a previous query\n",
547 __FUNCTION__); 547 __func__);
548 return -EBUSY; 548 return -EBUSY;
549 } 549 }
550 550
@@ -580,7 +580,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
580 switch (self->ias_result->type) { 580 switch (self->ias_result->type) {
581 case IAS_INTEGER: 581 case IAS_INTEGER:
582 IRDA_DEBUG(4, "%s() int=%d\n", 582 IRDA_DEBUG(4, "%s() int=%d\n",
583 __FUNCTION__, self->ias_result->t.integer); 583 __func__, self->ias_result->t.integer);
584 584
585 if (self->ias_result->t.integer != -1) 585 if (self->ias_result->t.integer != -1)
586 self->dtsap_sel = self->ias_result->t.integer; 586 self->dtsap_sel = self->ias_result->t.integer;
@@ -589,7 +589,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
589 break; 589 break;
590 default: 590 default:
591 self->dtsap_sel = 0; 591 self->dtsap_sel = 0;
592 IRDA_DEBUG(0, "%s(), bad type!\n", __FUNCTION__); 592 IRDA_DEBUG(0, "%s(), bad type!\n", __func__);
593 break; 593 break;
594 } 594 }
595 if (self->ias_result) 595 if (self->ias_result)
@@ -627,7 +627,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
627 __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */ 627 __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */
628 __u8 dtsap_sel = 0x0; /* TSAP associated with it */ 628 __u8 dtsap_sel = 0x0; /* TSAP associated with it */
629 629
630 IRDA_DEBUG(2, "%s(), name=%s\n", __FUNCTION__, name); 630 IRDA_DEBUG(2, "%s(), name=%s\n", __func__, name);
631 631
632 /* Ask lmp for the current discovery log 632 /* Ask lmp for the current discovery log
633 * Note : we have to use irlmp_get_discoveries(), as opposed 633 * Note : we have to use irlmp_get_discoveries(), as opposed
@@ -649,7 +649,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
649 self->daddr = discoveries[i].daddr; 649 self->daddr = discoveries[i].daddr;
650 self->saddr = 0x0; 650 self->saddr = 0x0;
651 IRDA_DEBUG(1, "%s(), trying daddr = %08x\n", 651 IRDA_DEBUG(1, "%s(), trying daddr = %08x\n",
652 __FUNCTION__, self->daddr); 652 __func__, self->daddr);
653 653
654 /* Query remote LM-IAS for this service */ 654 /* Query remote LM-IAS for this service */
655 err = irda_find_lsap_sel(self, name); 655 err = irda_find_lsap_sel(self, name);
@@ -658,7 +658,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
658 /* We found the requested service */ 658 /* We found the requested service */
659 if(daddr != DEV_ADDR_ANY) { 659 if(daddr != DEV_ADDR_ANY) {
660 IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n", 660 IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n",
661 __FUNCTION__, name); 661 __func__, name);
662 self->daddr = DEV_ADDR_ANY; 662 self->daddr = DEV_ADDR_ANY;
663 kfree(discoveries); 663 kfree(discoveries);
664 return(-ENOTUNIQ); 664 return(-ENOTUNIQ);
@@ -672,7 +672,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
672 break; 672 break;
673 default: 673 default:
674 /* Something bad did happen :-( */ 674 /* Something bad did happen :-( */
675 IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __FUNCTION__); 675 IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__);
676 self->daddr = DEV_ADDR_ANY; 676 self->daddr = DEV_ADDR_ANY;
677 kfree(discoveries); 677 kfree(discoveries);
678 return(-EHOSTUNREACH); 678 return(-EHOSTUNREACH);
@@ -685,7 +685,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
685 /* Check out what we found */ 685 /* Check out what we found */
686 if(daddr == DEV_ADDR_ANY) { 686 if(daddr == DEV_ADDR_ANY) {
687 IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", 687 IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n",
688 __FUNCTION__, name); 688 __func__, name);
689 self->daddr = DEV_ADDR_ANY; 689 self->daddr = DEV_ADDR_ANY;
690 return(-EADDRNOTAVAIL); 690 return(-EADDRNOTAVAIL);
691 } 691 }
@@ -696,7 +696,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
696 self->dtsap_sel = dtsap_sel; 696 self->dtsap_sel = dtsap_sel;
697 697
698 IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n", 698 IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n",
699 __FUNCTION__, name, self->daddr); 699 __func__, name, self->daddr);
700 700
701 return 0; 701 return 0;
702} 702}
@@ -727,8 +727,8 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
727 saddr.sir_addr = self->saddr; 727 saddr.sir_addr = self->saddr;
728 } 728 }
729 729
730 IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __FUNCTION__, saddr.sir_lsap_sel); 730 IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel);
731 IRDA_DEBUG(1, "%s(), addr = %08x\n", __FUNCTION__, saddr.sir_addr); 731 IRDA_DEBUG(1, "%s(), addr = %08x\n", __func__, saddr.sir_addr);
732 732
733 /* uaddr_len come to us uninitialised */ 733 /* uaddr_len come to us uninitialised */
734 *uaddr_len = sizeof (struct sockaddr_irda); 734 *uaddr_len = sizeof (struct sockaddr_irda);
@@ -747,7 +747,7 @@ static int irda_listen(struct socket *sock, int backlog)
747{ 747{
748 struct sock *sk = sock->sk; 748 struct sock *sk = sock->sk;
749 749
750 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 750 IRDA_DEBUG(2, "%s()\n", __func__);
751 751
752 if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) && 752 if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) &&
753 (sk->sk_type != SOCK_DGRAM)) 753 (sk->sk_type != SOCK_DGRAM))
@@ -776,7 +776,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
776 struct irda_sock *self = irda_sk(sk); 776 struct irda_sock *self = irda_sk(sk);
777 int err; 777 int err;
778 778
779 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 779 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
780 780
781 if (addr_len != sizeof(struct sockaddr_irda)) 781 if (addr_len != sizeof(struct sockaddr_irda))
782 return -EINVAL; 782 return -EINVAL;
@@ -787,7 +787,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
787 (sk->sk_protocol == IRDAPROTO_ULTRA)) { 787 (sk->sk_protocol == IRDAPROTO_ULTRA)) {
788 self->pid = addr->sir_lsap_sel; 788 self->pid = addr->sir_lsap_sel;
789 if (self->pid & 0x80) { 789 if (self->pid & 0x80) {
790 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__); 790 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__);
791 return -EOPNOTSUPP; 791 return -EOPNOTSUPP;
792 } 792 }
793 err = irda_open_lsap(self, self->pid); 793 err = irda_open_lsap(self, self->pid);
@@ -835,7 +835,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
835 struct sk_buff *skb; 835 struct sk_buff *skb;
836 int err; 836 int err;
837 837
838 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 838 IRDA_DEBUG(2, "%s()\n", __func__);
839 839
840 err = irda_create(sk->sk_net, newsock, sk->sk_protocol); 840 err = irda_create(sk->sk_net, newsock, sk->sk_protocol);
841 if (err) 841 if (err)
@@ -893,7 +893,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
893 /* Now attach up the new socket */ 893 /* Now attach up the new socket */
894 new->tsap = irttp_dup(self->tsap, new); 894 new->tsap = irttp_dup(self->tsap, new);
895 if (!new->tsap) { 895 if (!new->tsap) {
896 IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__); 896 IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
897 kfree_skb(skb); 897 kfree_skb(skb);
898 return -1; 898 return -1;
899 } 899 }
@@ -954,7 +954,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
954 struct irda_sock *self = irda_sk(sk); 954 struct irda_sock *self = irda_sk(sk);
955 int err; 955 int err;
956 956
957 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 957 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
958 958
959 /* Don't allow connect for Ultra sockets */ 959 /* Don't allow connect for Ultra sockets */
960 if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) 960 if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA))
@@ -984,13 +984,13 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
984 /* Try to find one suitable */ 984 /* Try to find one suitable */
985 err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name); 985 err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name);
986 if (err) { 986 if (err) {
987 IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __FUNCTION__); 987 IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __func__);
988 return err; 988 return err;
989 } 989 }
990 } else { 990 } else {
991 /* Use the one provided by the user */ 991 /* Use the one provided by the user */
992 self->daddr = addr->sir_addr; 992 self->daddr = addr->sir_addr;
993 IRDA_DEBUG(1, "%s(), daddr = %08x\n", __FUNCTION__, self->daddr); 993 IRDA_DEBUG(1, "%s(), daddr = %08x\n", __func__, self->daddr);
994 994
995 /* If we don't have a valid service name, we assume the 995 /* If we don't have a valid service name, we assume the
996 * user want to connect on a specific LSAP. Prevent 996 * user want to connect on a specific LSAP. Prevent
@@ -1000,7 +1000,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
1000 /* Query remote LM-IAS using service name */ 1000 /* Query remote LM-IAS using service name */
1001 err = irda_find_lsap_sel(self, addr->sir_name); 1001 err = irda_find_lsap_sel(self, addr->sir_name);
1002 if (err) { 1002 if (err) {
1003 IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__); 1003 IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
1004 return err; 1004 return err;
1005 } 1005 }
1006 } else { 1006 } else {
@@ -1025,7 +1025,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
1025 self->saddr, self->daddr, NULL, 1025 self->saddr, self->daddr, NULL,
1026 self->max_sdu_size_rx, NULL); 1026 self->max_sdu_size_rx, NULL);
1027 if (err) { 1027 if (err) {
1028 IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__); 1028 IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
1029 return err; 1029 return err;
1030 } 1030 }
1031 1031
@@ -1068,7 +1068,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
1068 struct sock *sk; 1068 struct sock *sk;
1069 struct irda_sock *self; 1069 struct irda_sock *self;
1070 1070
1071 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 1071 IRDA_DEBUG(2, "%s()\n", __func__);
1072 1072
1073 if (net != &init_net) 1073 if (net != &init_net)
1074 return -EAFNOSUPPORT; 1074 return -EAFNOSUPPORT;
@@ -1089,7 +1089,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
1089 return -ENOMEM; 1089 return -ENOMEM;
1090 1090
1091 self = irda_sk(sk); 1091 self = irda_sk(sk);
1092 IRDA_DEBUG(2, "%s() : self is %p\n", __FUNCTION__, self); 1092 IRDA_DEBUG(2, "%s() : self is %p\n", __func__, self);
1093 1093
1094 init_waitqueue_head(&self->query_wait); 1094 init_waitqueue_head(&self->query_wait);
1095 1095
@@ -1149,7 +1149,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
1149 */ 1149 */
1150static void irda_destroy_socket(struct irda_sock *self) 1150static void irda_destroy_socket(struct irda_sock *self)
1151{ 1151{
1152 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 1152 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
1153 1153
1154 /* Unregister with IrLMP */ 1154 /* Unregister with IrLMP */
1155 irlmp_unregister_client(self->ckey); 1155 irlmp_unregister_client(self->ckey);
@@ -1186,7 +1186,7 @@ static int irda_release(struct socket *sock)
1186{ 1186{
1187 struct sock *sk = sock->sk; 1187 struct sock *sk = sock->sk;
1188 1188
1189 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 1189 IRDA_DEBUG(2, "%s()\n", __func__);
1190 1190
1191 if (sk == NULL) 1191 if (sk == NULL)
1192 return 0; 1192 return 0;
@@ -1254,7 +1254,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
1254 struct sk_buff *skb; 1254 struct sk_buff *skb;
1255 int err = -EPIPE; 1255 int err = -EPIPE;
1256 1256
1257 IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len); 1257 IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
1258 1258
1259 /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ 1259 /* Note : socket.c set MSG_EOR on SEQPACKET sockets */
1260 if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | 1260 if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT |
@@ -1282,7 +1282,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
1282 /* Check that we don't send out too big frames */ 1282 /* Check that we don't send out too big frames */
1283 if (len > self->max_data_size) { 1283 if (len > self->max_data_size) {
1284 IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n", 1284 IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n",
1285 __FUNCTION__, len, self->max_data_size); 1285 __func__, len, self->max_data_size);
1286 len = self->max_data_size; 1286 len = self->max_data_size;
1287 } 1287 }
1288 1288
@@ -1306,7 +1306,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
1306 */ 1306 */
1307 err = irttp_data_request(self->tsap, skb); 1307 err = irttp_data_request(self->tsap, skb);
1308 if (err) { 1308 if (err) {
1309 IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err); 1309 IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
1310 goto out_err; 1310 goto out_err;
1311 } 1311 }
1312 /* Tell client how much data we actually sent */ 1312 /* Tell client how much data we actually sent */
@@ -1332,7 +1332,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1332 size_t copied; 1332 size_t copied;
1333 int err; 1333 int err;
1334 1334
1335 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1335 IRDA_DEBUG(4, "%s()\n", __func__);
1336 1336
1337 if ((err = sock_error(sk)) < 0) 1337 if ((err = sock_error(sk)) < 0)
1338 return err; 1338 return err;
@@ -1347,7 +1347,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1347 1347
1348 if (copied > size) { 1348 if (copied > size) {
1349 IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", 1349 IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n",
1350 __FUNCTION__, copied, size); 1350 __func__, copied, size);
1351 copied = size; 1351 copied = size;
1352 msg->msg_flags |= MSG_TRUNC; 1352 msg->msg_flags |= MSG_TRUNC;
1353 } 1353 }
@@ -1363,7 +1363,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1363 */ 1363 */
1364 if (self->rx_flow == FLOW_STOP) { 1364 if (self->rx_flow == FLOW_STOP) {
1365 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { 1365 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
1366 IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__); 1366 IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__);
1367 self->rx_flow = FLOW_START; 1367 self->rx_flow = FLOW_START;
1368 irttp_flow_request(self->tsap, FLOW_START); 1368 irttp_flow_request(self->tsap, FLOW_START);
1369 } 1369 }
@@ -1385,7 +1385,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1385 int target, err; 1385 int target, err;
1386 long timeo; 1386 long timeo;
1387 1387
1388 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 1388 IRDA_DEBUG(3, "%s()\n", __func__);
1389 1389
1390 if ((err = sock_error(sk)) < 0) 1390 if ((err = sock_error(sk)) < 0)
1391 return err; 1391 return err;
@@ -1459,14 +1459,14 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1459 /* put the skb back if we didn't use it up.. */ 1459 /* put the skb back if we didn't use it up.. */
1460 if (skb->len) { 1460 if (skb->len) {
1461 IRDA_DEBUG(1, "%s(), back on q!\n", 1461 IRDA_DEBUG(1, "%s(), back on q!\n",
1462 __FUNCTION__); 1462 __func__);
1463 skb_queue_head(&sk->sk_receive_queue, skb); 1463 skb_queue_head(&sk->sk_receive_queue, skb);
1464 break; 1464 break;
1465 } 1465 }
1466 1466
1467 kfree_skb(skb); 1467 kfree_skb(skb);
1468 } else { 1468 } else {
1469 IRDA_DEBUG(0, "%s() questionable!?\n", __FUNCTION__); 1469 IRDA_DEBUG(0, "%s() questionable!?\n", __func__);
1470 1470
1471 /* put message back and return */ 1471 /* put message back and return */
1472 skb_queue_head(&sk->sk_receive_queue, skb); 1472 skb_queue_head(&sk->sk_receive_queue, skb);
@@ -1482,7 +1482,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1482 */ 1482 */
1483 if (self->rx_flow == FLOW_STOP) { 1483 if (self->rx_flow == FLOW_STOP) {
1484 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { 1484 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
1485 IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__); 1485 IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__);
1486 self->rx_flow = FLOW_START; 1486 self->rx_flow = FLOW_START;
1487 irttp_flow_request(self->tsap, FLOW_START); 1487 irttp_flow_request(self->tsap, FLOW_START);
1488 } 1488 }
@@ -1506,7 +1506,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1506 struct sk_buff *skb; 1506 struct sk_buff *skb;
1507 int err; 1507 int err;
1508 1508
1509 IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len); 1509 IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
1510 1510
1511 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) 1511 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
1512 return -EINVAL; 1512 return -EINVAL;
@@ -1528,7 +1528,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1528 if (len > self->max_data_size) { 1528 if (len > self->max_data_size) {
1529 IRDA_DEBUG(0, "%s(), Warning to much data! " 1529 IRDA_DEBUG(0, "%s(), Warning to much data! "
1530 "Chopping frame from %zd to %d bytes!\n", 1530 "Chopping frame from %zd to %d bytes!\n",
1531 __FUNCTION__, len, self->max_data_size); 1531 __func__, len, self->max_data_size);
1532 len = self->max_data_size; 1532 len = self->max_data_size;
1533 } 1533 }
1534 1534
@@ -1540,7 +1540,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1540 skb_reserve(skb, self->max_header_size); 1540 skb_reserve(skb, self->max_header_size);
1541 skb_reset_transport_header(skb); 1541 skb_reset_transport_header(skb);
1542 1542
1543 IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__); 1543 IRDA_DEBUG(4, "%s(), appending user data\n", __func__);
1544 skb_put(skb, len); 1544 skb_put(skb, len);
1545 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); 1545 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
1546 if (err) { 1546 if (err) {
@@ -1554,7 +1554,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1554 */ 1554 */
1555 err = irttp_udata_request(self->tsap, skb); 1555 err = irttp_udata_request(self->tsap, skb);
1556 if (err) { 1556 if (err) {
1557 IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err); 1557 IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
1558 return err; 1558 return err;
1559 } 1559 }
1560 return len; 1560 return len;
@@ -1577,7 +1577,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1577 struct sk_buff *skb; 1577 struct sk_buff *skb;
1578 int err; 1578 int err;
1579 1579
1580 IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len); 1580 IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
1581 1581
1582 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) 1582 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
1583 return -EINVAL; 1583 return -EINVAL;
@@ -1600,7 +1600,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1600 1600
1601 pid = addr->sir_lsap_sel; 1601 pid = addr->sir_lsap_sel;
1602 if (pid & 0x80) { 1602 if (pid & 0x80) {
1603 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__); 1603 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__);
1604 return -EOPNOTSUPP; 1604 return -EOPNOTSUPP;
1605 } 1605 }
1606 } else { 1606 } else {
@@ -1609,7 +1609,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1609 if ((self->lsap == NULL) || 1609 if ((self->lsap == NULL) ||
1610 (sk->sk_state != TCP_ESTABLISHED)) { 1610 (sk->sk_state != TCP_ESTABLISHED)) {
1611 IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n", 1611 IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n",
1612 __FUNCTION__); 1612 __func__);
1613 return -ENOTCONN; 1613 return -ENOTCONN;
1614 } 1614 }
1615 /* Use PID from socket */ 1615 /* Use PID from socket */
@@ -1623,7 +1623,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1623 if (len > self->max_data_size) { 1623 if (len > self->max_data_size) {
1624 IRDA_DEBUG(0, "%s(), Warning to much data! " 1624 IRDA_DEBUG(0, "%s(), Warning to much data! "
1625 "Chopping frame from %zd to %d bytes!\n", 1625 "Chopping frame from %zd to %d bytes!\n",
1626 __FUNCTION__, len, self->max_data_size); 1626 __func__, len, self->max_data_size);
1627 len = self->max_data_size; 1627 len = self->max_data_size;
1628 } 1628 }
1629 1629
@@ -1635,7 +1635,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1635 skb_reserve(skb, self->max_header_size); 1635 skb_reserve(skb, self->max_header_size);
1636 skb_reset_transport_header(skb); 1636 skb_reset_transport_header(skb);
1637 1637
1638 IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__); 1638 IRDA_DEBUG(4, "%s(), appending user data\n", __func__);
1639 skb_put(skb, len); 1639 skb_put(skb, len);
1640 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); 1640 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
1641 if (err) { 1641 if (err) {
@@ -1646,7 +1646,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1646 err = irlmp_connless_data_request((bound ? self->lsap : NULL), 1646 err = irlmp_connless_data_request((bound ? self->lsap : NULL),
1647 skb, pid); 1647 skb, pid);
1648 if (err) { 1648 if (err) {
1649 IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err); 1649 IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
1650 return err; 1650 return err;
1651 } 1651 }
1652 return len; 1652 return len;
@@ -1661,7 +1661,7 @@ static int irda_shutdown(struct socket *sock, int how)
1661 struct sock *sk = sock->sk; 1661 struct sock *sk = sock->sk;
1662 struct irda_sock *self = irda_sk(sk); 1662 struct irda_sock *self = irda_sk(sk);
1663 1663
1664 IRDA_DEBUG(1, "%s(%p)\n", __FUNCTION__, self); 1664 IRDA_DEBUG(1, "%s(%p)\n", __func__, self);
1665 1665
1666 sk->sk_state = TCP_CLOSE; 1666 sk->sk_state = TCP_CLOSE;
1667 sk->sk_shutdown |= SEND_SHUTDOWN; 1667 sk->sk_shutdown |= SEND_SHUTDOWN;
@@ -1696,7 +1696,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
1696 struct irda_sock *self = irda_sk(sk); 1696 struct irda_sock *self = irda_sk(sk);
1697 unsigned int mask; 1697 unsigned int mask;
1698 1698
1699 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1699 IRDA_DEBUG(4, "%s()\n", __func__);
1700 1700
1701 poll_wait(file, sk->sk_sleep, wait); 1701 poll_wait(file, sk->sk_sleep, wait);
1702 mask = 0; 1702 mask = 0;
@@ -1705,7 +1705,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
1705 if (sk->sk_err) 1705 if (sk->sk_err)
1706 mask |= POLLERR; 1706 mask |= POLLERR;
1707 if (sk->sk_shutdown & RCV_SHUTDOWN) { 1707 if (sk->sk_shutdown & RCV_SHUTDOWN) {
1708 IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__); 1708 IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__);
1709 mask |= POLLHUP; 1709 mask |= POLLHUP;
1710 } 1710 }
1711 1711
@@ -1719,7 +1719,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
1719 switch (sk->sk_type) { 1719 switch (sk->sk_type) {
1720 case SOCK_STREAM: 1720 case SOCK_STREAM:
1721 if (sk->sk_state == TCP_CLOSE) { 1721 if (sk->sk_state == TCP_CLOSE) {
1722 IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__); 1722 IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__);
1723 mask |= POLLHUP; 1723 mask |= POLLHUP;
1724 } 1724 }
1725 1725
@@ -1755,7 +1755,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1755{ 1755{
1756 struct sock *sk = sock->sk; 1756 struct sock *sk = sock->sk;
1757 1757
1758 IRDA_DEBUG(4, "%s(), cmd=%#x\n", __FUNCTION__, cmd); 1758 IRDA_DEBUG(4, "%s(), cmd=%#x\n", __func__, cmd);
1759 1759
1760 switch (cmd) { 1760 switch (cmd) {
1761 case TIOCOUTQ: { 1761 case TIOCOUTQ: {
@@ -1796,7 +1796,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1796 case SIOCSIFMETRIC: 1796 case SIOCSIFMETRIC:
1797 return -EINVAL; 1797 return -EINVAL;
1798 default: 1798 default:
1799 IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__); 1799 IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __func__);
1800 return -ENOIOCTLCMD; 1800 return -ENOIOCTLCMD;
1801 } 1801 }
1802 1802
@@ -1833,7 +1833,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
1833 struct ias_attrib * ias_attr; /* Attribute in IAS object */ 1833 struct ias_attrib * ias_attr; /* Attribute in IAS object */
1834 int opt, free_ias = 0; 1834 int opt, free_ias = 0;
1835 1835
1836 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 1836 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
1837 1837
1838 if (level != SOL_IRLMP) 1838 if (level != SOL_IRLMP)
1839 return -ENOPROTOOPT; 1839 return -ENOPROTOOPT;
@@ -2012,7 +2012,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
2012 2012
2013 /* Check is the user space own the object */ 2013 /* Check is the user space own the object */
2014 if(ias_attr->value->owner != IAS_USER_ATTR) { 2014 if(ias_attr->value->owner != IAS_USER_ATTR) {
2015 IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __FUNCTION__); 2015 IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __func__);
2016 kfree(ias_opt); 2016 kfree(ias_opt);
2017 return -EPERM; 2017 return -EPERM;
2018 } 2018 }
@@ -2031,11 +2031,11 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
2031 /* Only possible for a seqpacket service (TTP with SAR) */ 2031 /* Only possible for a seqpacket service (TTP with SAR) */
2032 if (sk->sk_type != SOCK_SEQPACKET) { 2032 if (sk->sk_type != SOCK_SEQPACKET) {
2033 IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n", 2033 IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n",
2034 __FUNCTION__, opt); 2034 __func__, opt);
2035 self->max_sdu_size_rx = opt; 2035 self->max_sdu_size_rx = opt;
2036 } else { 2036 } else {
2037 IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n", 2037 IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n",
2038 __FUNCTION__); 2038 __func__);
2039 return -ENOPROTOOPT; 2039 return -ENOPROTOOPT;
2040 } 2040 }
2041 break; 2041 break;
@@ -2149,7 +2149,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
2149 int err; 2149 int err;
2150 int offset, total; 2150 int offset, total;
2151 2151
2152 IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); 2152 IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
2153 2153
2154 if (level != SOL_IRLMP) 2154 if (level != SOL_IRLMP)
2155 return -ENOPROTOOPT; 2155 return -ENOPROTOOPT;
@@ -2310,7 +2310,7 @@ bed:
2310 /* Check that we can proceed with IAP */ 2310 /* Check that we can proceed with IAP */
2311 if (self->iriap) { 2311 if (self->iriap) {
2312 IRDA_WARNING("%s: busy with a previous query\n", 2312 IRDA_WARNING("%s: busy with a previous query\n",
2313 __FUNCTION__); 2313 __func__);
2314 kfree(ias_opt); 2314 kfree(ias_opt);
2315 return -EBUSY; 2315 return -EBUSY;
2316 } 2316 }
@@ -2406,7 +2406,7 @@ bed:
2406 if (!self->cachedaddr) { 2406 if (!self->cachedaddr) {
2407 int ret = 0; 2407 int ret = 0;
2408 2408
2409 IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __FUNCTION__); 2409 IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __func__);
2410 2410
2411 /* Set watchdog timer to expire in <val> ms. */ 2411 /* Set watchdog timer to expire in <val> ms. */
2412 self->errno = 0; 2412 self->errno = 0;
@@ -2424,14 +2424,14 @@ bed:
2424 if(timer_pending(&(self->watchdog))) 2424 if(timer_pending(&(self->watchdog)))
2425 del_timer(&(self->watchdog)); 2425 del_timer(&(self->watchdog));
2426 2426
2427 IRDA_DEBUG(1, "%s(), ...waking up !\n", __FUNCTION__); 2427 IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__);
2428 2428
2429 if (ret != 0) 2429 if (ret != 0)
2430 return ret; 2430 return ret;
2431 } 2431 }
2432 else 2432 else
2433 IRDA_DEBUG(1, "%s(), found immediately !\n", 2433 IRDA_DEBUG(1, "%s(), found immediately !\n",
2434 __FUNCTION__); 2434 __func__);
2435 2435
2436 /* Tell IrLMP that we have been notified */ 2436 /* Tell IrLMP that we have been notified */
2437 irlmp_update_client(self->ckey, self->mask.word, 2437 irlmp_update_client(self->ckey, self->mask.word,
diff --git a/net/irda/discovery.c b/net/irda/discovery.c
index 80c33f408e3f..bfacef8b76f4 100644
--- a/net/irda/discovery.c
+++ b/net/irda/discovery.c
@@ -110,7 +110,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
110{ 110{
111 discovery_t *discovery; 111 discovery_t *discovery;
112 112
113 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 113 IRDA_DEBUG(4, "%s()\n", __func__);
114 114
115 /* 115 /*
116 * If log is missing this means that IrLAP was unable to perform the 116 * If log is missing this means that IrLAP was unable to perform the
@@ -157,7 +157,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force)
157 int i = 0; /* How many we expired */ 157 int i = 0; /* How many we expired */
158 158
159 IRDA_ASSERT(log != NULL, return;); 159 IRDA_ASSERT(log != NULL, return;);
160 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 160 IRDA_DEBUG(4, "%s()\n", __func__);
161 161
162 spin_lock_irqsave(&log->hb_spinlock, flags); 162 spin_lock_irqsave(&log->hb_spinlock, flags);
163 163
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index 6eef1f2a7553..018c92941aba 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -70,7 +70,7 @@ static int __init ircomm_init(void)
70{ 70{
71 ircomm = hashbin_new(HB_LOCK); 71 ircomm = hashbin_new(HB_LOCK);
72 if (ircomm == NULL) { 72 if (ircomm == NULL) {
73 IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); 73 IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
74 return -ENOMEM; 74 return -ENOMEM;
75 } 75 }
76 76
@@ -91,7 +91,7 @@ static int __init ircomm_init(void)
91 91
92static void __exit ircomm_cleanup(void) 92static void __exit ircomm_cleanup(void)
93{ 93{
94 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 94 IRDA_DEBUG(2, "%s()\n", __func__ );
95 95
96 hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); 96 hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
97 97
@@ -111,7 +111,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
111 struct ircomm_cb *self = NULL; 111 struct ircomm_cb *self = NULL;
112 int ret; 112 int ret;
113 113
114 IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ , 114 IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ ,
115 service_type); 115 service_type);
116 116
117 IRDA_ASSERT(ircomm != NULL, return NULL;); 117 IRDA_ASSERT(ircomm != NULL, return NULL;);
@@ -155,7 +155,7 @@ EXPORT_SYMBOL(ircomm_open);
155 */ 155 */
156static int __ircomm_close(struct ircomm_cb *self) 156static int __ircomm_close(struct ircomm_cb *self)
157{ 157{
158 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 158 IRDA_DEBUG(2, "%s()\n", __func__ );
159 159
160 /* Disconnect link if any */ 160 /* Disconnect link if any */
161 ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); 161 ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
@@ -191,7 +191,7 @@ int ircomm_close(struct ircomm_cb *self)
191 IRDA_ASSERT(self != NULL, return -EIO;); 191 IRDA_ASSERT(self != NULL, return -EIO;);
192 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); 192 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
193 193
194 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 194 IRDA_DEBUG(0, "%s()\n", __func__ );
195 195
196 entry = hashbin_remove(ircomm, self->line, NULL); 196 entry = hashbin_remove(ircomm, self->line, NULL);
197 197
@@ -216,7 +216,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
216 struct ircomm_info info; 216 struct ircomm_info info;
217 int ret; 217 int ret;
218 218
219 IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ ); 219 IRDA_DEBUG(2 , "%s()\n", __func__ );
220 220
221 IRDA_ASSERT(self != NULL, return -1;); 221 IRDA_ASSERT(self != NULL, return -1;);
222 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 222 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -245,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
245{ 245{
246 int clen = 0; 246 int clen = 0;
247 247
248 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 248 IRDA_DEBUG(2, "%s()\n", __func__ );
249 249
250 /* Check if the packet contains data on the control channel */ 250 /* Check if the packet contains data on the control channel */
251 if (skb->len > 0) 251 if (skb->len > 0)
@@ -261,7 +261,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
261 info->qos, info->max_data_size, 261 info->qos, info->max_data_size,
262 info->max_header_size, skb); 262 info->max_header_size, skb);
263 else { 263 else {
264 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 264 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
265 } 265 }
266} 266}
267 267
@@ -278,7 +278,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
278 IRDA_ASSERT(self != NULL, return -1;); 278 IRDA_ASSERT(self != NULL, return -1;);
279 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 279 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
280 280
281 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 281 IRDA_DEBUG(4, "%s()\n", __func__ );
282 282
283 ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); 283 ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
284 284
@@ -296,7 +296,7 @@ EXPORT_SYMBOL(ircomm_connect_response);
296void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, 296void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
297 struct ircomm_info *info) 297 struct ircomm_info *info)
298{ 298{
299 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 299 IRDA_DEBUG(4, "%s()\n", __func__ );
300 300
301 if (self->notify.connect_confirm ) 301 if (self->notify.connect_confirm )
302 self->notify.connect_confirm(self->notify.instance, 302 self->notify.connect_confirm(self->notify.instance,
@@ -304,7 +304,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
304 info->max_data_size, 304 info->max_data_size,
305 info->max_header_size, skb); 305 info->max_header_size, skb);
306 else { 306 else {
307 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 307 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
308 } 308 }
309} 309}
310 310
@@ -318,7 +318,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
318{ 318{
319 int ret; 319 int ret;
320 320
321 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 321 IRDA_DEBUG(4, "%s()\n", __func__ );
322 322
323 IRDA_ASSERT(self != NULL, return -EFAULT;); 323 IRDA_ASSERT(self != NULL, return -EFAULT;);
324 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); 324 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -339,14 +339,14 @@ EXPORT_SYMBOL(ircomm_data_request);
339 */ 339 */
340void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) 340void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
341{ 341{
342 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 342 IRDA_DEBUG(4, "%s()\n", __func__ );
343 343
344 IRDA_ASSERT(skb->len > 0, return;); 344 IRDA_ASSERT(skb->len > 0, return;);
345 345
346 if (self->notify.data_indication) 346 if (self->notify.data_indication)
347 self->notify.data_indication(self->notify.instance, self, skb); 347 self->notify.data_indication(self->notify.instance, self, skb);
348 else { 348 else {
349 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 349 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
350 } 350 }
351} 351}
352 352
@@ -372,7 +372,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
372 */ 372 */
373 if (unlikely(skb->len < (clen + 1))) { 373 if (unlikely(skb->len < (clen + 1))) {
374 IRDA_DEBUG(2, "%s() throwing away illegal frame\n", 374 IRDA_DEBUG(2, "%s() throwing away illegal frame\n",
375 __FUNCTION__ ); 375 __func__ );
376 return; 376 return;
377 } 377 }
378 378
@@ -391,7 +391,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
391 ircomm_data_indication(self, skb); 391 ircomm_data_indication(self, skb);
392 else { 392 else {
393 IRDA_DEBUG(4, "%s(), data was control info only!\n", 393 IRDA_DEBUG(4, "%s(), data was control info only!\n",
394 __FUNCTION__ ); 394 __func__ );
395 } 395 }
396} 396}
397 397
@@ -405,7 +405,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
405{ 405{
406 int ret; 406 int ret;
407 407
408 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 408 IRDA_DEBUG(2, "%s()\n", __func__ );
409 409
410 IRDA_ASSERT(self != NULL, return -EFAULT;); 410 IRDA_ASSERT(self != NULL, return -EFAULT;);
411 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); 411 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -427,7 +427,7 @@ EXPORT_SYMBOL(ircomm_control_request);
427static void ircomm_control_indication(struct ircomm_cb *self, 427static void ircomm_control_indication(struct ircomm_cb *self,
428 struct sk_buff *skb, int clen) 428 struct sk_buff *skb, int clen)
429{ 429{
430 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 430 IRDA_DEBUG(2, "%s()\n", __func__ );
431 431
432 /* Use udata for delivering data on the control channel */ 432 /* Use udata for delivering data on the control channel */
433 if (self->notify.udata_indication) { 433 if (self->notify.udata_indication) {
@@ -448,7 +448,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
448 * see ircomm_tty_control_indication(). */ 448 * see ircomm_tty_control_indication(). */
449 dev_kfree_skb(ctrl_skb); 449 dev_kfree_skb(ctrl_skb);
450 } else { 450 } else {
451 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 451 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
452 } 452 }
453} 453}
454 454
@@ -463,7 +463,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
463 struct ircomm_info info; 463 struct ircomm_info info;
464 int ret; 464 int ret;
465 465
466 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 466 IRDA_DEBUG(2, "%s()\n", __func__ );
467 467
468 IRDA_ASSERT(self != NULL, return -1;); 468 IRDA_ASSERT(self != NULL, return -1;);
469 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 469 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -484,7 +484,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request);
484void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, 484void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
485 struct ircomm_info *info) 485 struct ircomm_info *info)
486{ 486{
487 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 487 IRDA_DEBUG(2, "%s()\n", __func__ );
488 488
489 IRDA_ASSERT(info != NULL, return;); 489 IRDA_ASSERT(info != NULL, return;);
490 490
@@ -492,7 +492,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
492 self->notify.disconnect_indication(self->notify.instance, self, 492 self->notify.disconnect_indication(self->notify.instance, self,
493 info->reason, skb); 493 info->reason, skb);
494 } else { 494 } else {
495 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 495 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
496 } 496 }
497} 497}
498 498
@@ -504,7 +504,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
504 */ 504 */
505void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) 505void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
506{ 506{
507 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 507 IRDA_DEBUG(2, "%s()\n", __func__ );
508 508
509 IRDA_ASSERT(self != NULL, return;); 509 IRDA_ASSERT(self != NULL, return;);
510 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 510 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
diff --git a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c
index 8ba4e59ece16..c35b3ef5c2f0 100644
--- a/net/irda/ircomm/ircomm_event.c
+++ b/net/irda/ircomm/ircomm_event.c
@@ -108,7 +108,7 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event,
108 ircomm_connect_indication(self, skb, info); 108 ircomm_connect_indication(self, skb, info);
109 break; 109 break;
110 default: 110 default:
111 IRDA_DEBUG(4, "%s(), unknown event: %s\n", __FUNCTION__ , 111 IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ ,
112 ircomm_event[event]); 112 ircomm_event[event]);
113 ret = -EINVAL; 113 ret = -EINVAL;
114 } 114 }
@@ -138,7 +138,7 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event,
138 ircomm_disconnect_indication(self, skb, info); 138 ircomm_disconnect_indication(self, skb, info);
139 break; 139 break;
140 default: 140 default:
141 IRDA_DEBUG(0, "%s(), unknown event: %s\n", __FUNCTION__ , 141 IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ ,
142 ircomm_event[event]); 142 ircomm_event[event]);
143 ret = -EINVAL; 143 ret = -EINVAL;
144 } 144 }
@@ -171,7 +171,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
171 ircomm_disconnect_indication(self, skb, info); 171 ircomm_disconnect_indication(self, skb, info);
172 break; 172 break;
173 default: 173 default:
174 IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ , 174 IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
175 ircomm_event[event]); 175 ircomm_event[event]);
176 ret = -EINVAL; 176 ret = -EINVAL;
177 } 177 }
@@ -213,7 +213,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
213 ret = self->issue.disconnect_request(self, skb, info); 213 ret = self->issue.disconnect_request(self, skb, info);
214 break; 214 break;
215 default: 215 default:
216 IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ , 216 IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
217 ircomm_event[event]); 217 ircomm_event[event]);
218 ret = -EINVAL; 218 ret = -EINVAL;
219 } 219 }
@@ -229,7 +229,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
229int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, 229int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
230 struct sk_buff *skb, struct ircomm_info *info) 230 struct sk_buff *skb, struct ircomm_info *info)
231{ 231{
232 IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __FUNCTION__ , 232 IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __func__ ,
233 ircomm_state[self->state], ircomm_event[event]); 233 ircomm_state[self->state], ircomm_event[event]);
234 234
235 return (*state[self->state])(self, event, skb, info); 235 return (*state[self->state])(self, event, skb, info);
@@ -245,6 +245,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state)
245{ 245{
246 self->state = state; 246 self->state = state;
247 247
248 IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __FUNCTION__ , 248 IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __func__ ,
249 ircomm_state[self->state], self->service_type); 249 ircomm_state[self->state], self->service_type);
250} 250}
diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c
index 55860ee4e39e..67c99d20857f 100644
--- a/net/irda/ircomm/ircomm_lmp.c
+++ b/net/irda/ircomm/ircomm_lmp.c
@@ -53,7 +53,7 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self,
53{ 53{
54 int ret = 0; 54 int ret = 0;
55 55
56 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 56 IRDA_DEBUG(0, "%s()\n", __func__ );
57 57
58 /* Don't forget to refcount it - should be NULL anyway */ 58 /* Don't forget to refcount it - should be NULL anyway */
59 if(userdata) 59 if(userdata)
@@ -76,7 +76,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self,
76 struct sk_buff *tx_skb; 76 struct sk_buff *tx_skb;
77 int ret; 77 int ret;
78 78
79 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 79 IRDA_DEBUG(0, "%s()\n", __func__ );
80 80
81 /* Any userdata supplied? */ 81 /* Any userdata supplied? */
82 if (userdata == NULL) { 82 if (userdata == NULL) {
@@ -111,7 +111,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self,
111 struct sk_buff *tx_skb; 111 struct sk_buff *tx_skb;
112 int ret; 112 int ret;
113 113
114 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 114 IRDA_DEBUG(0, "%s()\n", __func__ );
115 115
116 if (!userdata) { 116 if (!userdata) {
117 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); 117 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
@@ -148,13 +148,13 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
148 148
149 cb = (struct irda_skb_cb *) skb->cb; 149 cb = (struct irda_skb_cb *) skb->cb;
150 150
151 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 151 IRDA_DEBUG(2, "%s()\n", __func__ );
152 152
153 line = cb->line; 153 line = cb->line;
154 154
155 self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); 155 self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
156 if (!self) { 156 if (!self) {
157 IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ ); 157 IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ );
158 return; 158 return;
159 } 159 }
160 160
@@ -164,7 +164,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
164 self->pkt_count--; 164 self->pkt_count--;
165 165
166 if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { 166 if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) {
167 IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __FUNCTION__ ); 167 IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __func__ );
168 self->flow_status = FLOW_START; 168 self->flow_status = FLOW_START;
169 if (self->notify.flow_indication) 169 if (self->notify.flow_indication)
170 self->notify.flow_indication(self->notify.instance, 170 self->notify.flow_indication(self->notify.instance,
@@ -191,7 +191,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
191 191
192 cb->line = self->line; 192 cb->line = self->line;
193 193
194 IRDA_DEBUG(4, "%s(), sending frame\n", __FUNCTION__ ); 194 IRDA_DEBUG(4, "%s(), sending frame\n", __func__ );
195 195
196 /* Don't forget to refcount it - see ircomm_tty_do_softint() */ 196 /* Don't forget to refcount it - see ircomm_tty_do_softint() */
197 skb_get(skb); 197 skb_get(skb);
@@ -199,7 +199,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
199 skb->destructor = ircomm_lmp_flow_control; 199 skb->destructor = ircomm_lmp_flow_control;
200 200
201 if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { 201 if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
202 IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __FUNCTION__ ); 202 IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __func__ );
203 self->flow_status = FLOW_STOP; 203 self->flow_status = FLOW_STOP;
204 if (self->notify.flow_indication) 204 if (self->notify.flow_indication)
205 self->notify.flow_indication(self->notify.instance, 205 self->notify.flow_indication(self->notify.instance,
@@ -207,7 +207,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
207 } 207 }
208 ret = irlmp_data_request(self->lsap, skb); 208 ret = irlmp_data_request(self->lsap, skb);
209 if (ret) { 209 if (ret) {
210 IRDA_ERROR("%s(), failed\n", __FUNCTION__); 210 IRDA_ERROR("%s(), failed\n", __func__);
211 /* irlmp_data_request already free the packet */ 211 /* irlmp_data_request already free the packet */
212 } 212 }
213 213
@@ -225,7 +225,7 @@ static int ircomm_lmp_data_indication(void *instance, void *sap,
225{ 225{
226 struct ircomm_cb *self = (struct ircomm_cb *) instance; 226 struct ircomm_cb *self = (struct ircomm_cb *) instance;
227 227
228 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 228 IRDA_DEBUG(4, "%s()\n", __func__ );
229 229
230 IRDA_ASSERT(self != NULL, return -1;); 230 IRDA_ASSERT(self != NULL, return -1;);
231 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 231 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -255,7 +255,7 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap,
255 struct ircomm_cb *self = (struct ircomm_cb *) instance; 255 struct ircomm_cb *self = (struct ircomm_cb *) instance;
256 struct ircomm_info info; 256 struct ircomm_info info;
257 257
258 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 258 IRDA_DEBUG(0, "%s()\n", __func__ );
259 259
260 IRDA_ASSERT(self != NULL, return;); 260 IRDA_ASSERT(self != NULL, return;);
261 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 261 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -288,7 +288,7 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap,
288 struct ircomm_cb *self = (struct ircomm_cb *)instance; 288 struct ircomm_cb *self = (struct ircomm_cb *)instance;
289 struct ircomm_info info; 289 struct ircomm_info info;
290 290
291 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 291 IRDA_DEBUG(0, "%s()\n", __func__ );
292 292
293 IRDA_ASSERT(self != NULL, return;); 293 IRDA_ASSERT(self != NULL, return;);
294 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 294 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -318,7 +318,7 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap,
318 struct ircomm_cb *self = (struct ircomm_cb *) instance; 318 struct ircomm_cb *self = (struct ircomm_cb *) instance;
319 struct ircomm_info info; 319 struct ircomm_info info;
320 320
321 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 321 IRDA_DEBUG(0, "%s()\n", __func__ );
322 322
323 IRDA_ASSERT(self != NULL, return;); 323 IRDA_ASSERT(self != NULL, return;);
324 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 324 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -341,7 +341,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
341{ 341{
342 notify_t notify; 342 notify_t notify;
343 343
344 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 344 IRDA_DEBUG(0, "%s()\n", __func__ );
345 345
346 /* Register callbacks */ 346 /* Register callbacks */
347 irda_notify_init(&notify); 347 irda_notify_init(&notify);
@@ -354,7 +354,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
354 354
355 self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0); 355 self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
356 if (!self->lsap) { 356 if (!self->lsap) {
357 IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ ); 357 IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ );
358 return -1; 358 return -1;
359 } 359 }
360 self->slsap_sel = self->lsap->slsap_sel; 360 self->slsap_sel = self->lsap->slsap_sel;
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
index 598dcbe4a501..d57aefd9fe77 100644
--- a/net/irda/ircomm/ircomm_param.c
+++ b/net/irda/ircomm/ircomm_param.c
@@ -103,7 +103,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
103 struct sk_buff *skb; 103 struct sk_buff *skb;
104 int count; 104 int count;
105 105
106 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 106 IRDA_DEBUG(2, "%s()\n", __func__ );
107 107
108 IRDA_ASSERT(self != NULL, return -1;); 108 IRDA_ASSERT(self != NULL, return -1;);
109 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 109 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
@@ -136,7 +136,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
136 count = irda_param_insert(self, pi, skb_tail_pointer(skb), 136 count = irda_param_insert(self, pi, skb_tail_pointer(skb),
137 skb_tailroom(skb), &ircomm_param_info); 137 skb_tailroom(skb), &ircomm_param_info);
138 if (count < 0) { 138 if (count < 0) {
139 IRDA_WARNING("%s(), no room for parameter!\n", __FUNCTION__); 139 IRDA_WARNING("%s(), no room for parameter!\n", __func__);
140 spin_unlock_irqrestore(&self->spinlock, flags); 140 spin_unlock_irqrestore(&self->spinlock, flags);
141 return -1; 141 return -1;
142 } 142 }
@@ -144,7 +144,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
144 144
145 spin_unlock_irqrestore(&self->spinlock, flags); 145 spin_unlock_irqrestore(&self->spinlock, flags);
146 146
147 IRDA_DEBUG(2, "%s(), skb->len=%d\n", __FUNCTION__ , skb->len); 147 IRDA_DEBUG(2, "%s(), skb->len=%d\n", __func__ , skb->len);
148 148
149 if (flush) { 149 if (flush) {
150 /* ircomm_tty_do_softint will take care of the rest */ 150 /* ircomm_tty_do_softint will take care of the rest */
@@ -179,10 +179,10 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
179 service_type &= self->service_type; 179 service_type &= self->service_type;
180 if (!service_type) { 180 if (!service_type) {
181 IRDA_DEBUG(2, 181 IRDA_DEBUG(2,
182 "%s(), No common service type to use!\n", __FUNCTION__ ); 182 "%s(), No common service type to use!\n", __func__ );
183 return -1; 183 return -1;
184 } 184 }
185 IRDA_DEBUG(0, "%s(), services in common=%02x\n", __FUNCTION__ , 185 IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ ,
186 service_type); 186 service_type);
187 187
188 /* 188 /*
@@ -197,7 +197,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
197 else if (service_type & IRCOMM_3_WIRE_RAW) 197 else if (service_type & IRCOMM_3_WIRE_RAW)
198 self->settings.service_type = IRCOMM_3_WIRE_RAW; 198 self->settings.service_type = IRCOMM_3_WIRE_RAW;
199 199
200 IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __FUNCTION__ , 200 IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __func__ ,
201 self->settings.service_type); 201 self->settings.service_type);
202 202
203 /* 203 /*
@@ -240,7 +240,7 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get)
240 else { 240 else {
241 self->settings.port_type = (__u8) param->pv.i; 241 self->settings.port_type = (__u8) param->pv.i;
242 242
243 IRDA_DEBUG(0, "%s(), port type=%d\n", __FUNCTION__ , 243 IRDA_DEBUG(0, "%s(), port type=%d\n", __func__ ,
244 self->settings.port_type); 244 self->settings.port_type);
245 } 245 }
246 return 0; 246 return 0;
@@ -260,9 +260,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get)
260 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 260 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
261 261
262 if (get) { 262 if (get) {
263 IRDA_DEBUG(0, "%s(), not imp!\n", __FUNCTION__ ); 263 IRDA_DEBUG(0, "%s(), not imp!\n", __func__ );
264 } else { 264 } else {
265 IRDA_DEBUG(0, "%s(), port-name=%s\n", __FUNCTION__ , param->pv.c); 265 IRDA_DEBUG(0, "%s(), port-name=%s\n", __func__ , param->pv.c);
266 strncpy(self->settings.port_name, param->pv.c, 32); 266 strncpy(self->settings.port_name, param->pv.c, 32);
267 } 267 }
268 268
@@ -287,7 +287,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get)
287 else 287 else
288 self->settings.data_rate = param->pv.i; 288 self->settings.data_rate = param->pv.i;
289 289
290 IRDA_DEBUG(2, "%s(), data rate = %d\n", __FUNCTION__ , param->pv.i); 290 IRDA_DEBUG(2, "%s(), data rate = %d\n", __func__ , param->pv.i);
291 291
292 return 0; 292 return 0;
293} 293}
@@ -333,7 +333,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param,
333 else 333 else
334 self->settings.flow_control = (__u8) param->pv.i; 334 self->settings.flow_control = (__u8) param->pv.i;
335 335
336 IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i); 336 IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __func__ , (__u8) param->pv.i);
337 337
338 return 0; 338 return 0;
339} 339}
@@ -359,7 +359,7 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get)
359 self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; 359 self->settings.xonxoff[1] = (__u16) param->pv.i >> 8;
360 } 360 }
361 361
362 IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __FUNCTION__ , 362 IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ ,
363 param->pv.i & 0xff, param->pv.i >> 8); 363 param->pv.i & 0xff, param->pv.i >> 8);
364 364
365 return 0; 365 return 0;
@@ -386,7 +386,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
386 self->settings.enqack[1] = (__u16) param->pv.i >> 8; 386 self->settings.enqack[1] = (__u16) param->pv.i >> 8;
387 } 387 }
388 388
389 IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __FUNCTION__ , 389 IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ ,
390 param->pv.i & 0xff, param->pv.i >> 8); 390 param->pv.i & 0xff, param->pv.i >> 8);
391 391
392 return 0; 392 return 0;
@@ -401,7 +401,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
401static int ircomm_param_line_status(void *instance, irda_param_t *param, 401static int ircomm_param_line_status(void *instance, irda_param_t *param,
402 int get) 402 int get)
403{ 403{
404 IRDA_DEBUG(2, "%s(), not impl.\n", __FUNCTION__ ); 404 IRDA_DEBUG(2, "%s(), not impl.\n", __func__ );
405 405
406 return 0; 406 return 0;
407} 407}
@@ -462,7 +462,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
462 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 462 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
463 __u8 dce; 463 __u8 dce;
464 464
465 IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i); 465 IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __func__ , (__u8) param->pv.i);
466 466
467 dce = (__u8) param->pv.i; 467 dce = (__u8) param->pv.i;
468 468
@@ -474,7 +474,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
474 /* Check if any of the settings have changed */ 474 /* Check if any of the settings have changed */
475 if (dce & 0x0f) { 475 if (dce & 0x0f) {
476 if (dce & IRCOMM_DELTA_CTS) { 476 if (dce & IRCOMM_DELTA_CTS) {
477 IRDA_DEBUG(2, "%s(), CTS \n", __FUNCTION__ ); 477 IRDA_DEBUG(2, "%s(), CTS \n", __func__ );
478 } 478 }
479 } 479 }
480 480
diff --git a/net/irda/ircomm/ircomm_ttp.c b/net/irda/ircomm/ircomm_ttp.c
index 712eafd0cc76..6e6509f22f60 100644
--- a/net/irda/ircomm/ircomm_ttp.c
+++ b/net/irda/ircomm/ircomm_ttp.c
@@ -78,7 +78,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
78{ 78{
79 notify_t notify; 79 notify_t notify;
80 80
81 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 81 IRDA_DEBUG(4, "%s()\n", __func__ );
82 82
83 /* Register callbacks */ 83 /* Register callbacks */
84 irda_notify_init(&notify); 84 irda_notify_init(&notify);
@@ -93,7 +93,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
93 self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, 93 self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT,
94 &notify); 94 &notify);
95 if (!self->tsap) { 95 if (!self->tsap) {
96 IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __FUNCTION__ ); 96 IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ );
97 return -1; 97 return -1;
98 } 98 }
99 self->slsap_sel = self->tsap->stsap_sel; 99 self->slsap_sel = self->tsap->stsap_sel;
@@ -121,7 +121,7 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self,
121{ 121{
122 int ret = 0; 122 int ret = 0;
123 123
124 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 124 IRDA_DEBUG(4, "%s()\n", __func__ );
125 125
126 /* Don't forget to refcount it - should be NULL anyway */ 126 /* Don't forget to refcount it - should be NULL anyway */
127 if(userdata) 127 if(userdata)
@@ -145,7 +145,7 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self,
145{ 145{
146 int ret; 146 int ret;
147 147
148 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 148 IRDA_DEBUG(4, "%s()\n", __func__ );
149 149
150 /* Don't forget to refcount it - should be NULL anyway */ 150 /* Don't forget to refcount it - should be NULL anyway */
151 if(userdata) 151 if(userdata)
@@ -173,7 +173,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
173 173
174 IRDA_ASSERT(skb != NULL, return -1;); 174 IRDA_ASSERT(skb != NULL, return -1;);
175 175
176 IRDA_DEBUG(2, "%s(), clen=%d\n", __FUNCTION__ , clen); 176 IRDA_DEBUG(2, "%s(), clen=%d\n", __func__ , clen);
177 177
178 /* 178 /*
179 * Insert clen field, currently we either send data only, or control 179 * Insert clen field, currently we either send data only, or control
@@ -190,7 +190,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
190 190
191 ret = irttp_data_request(self->tsap, skb); 191 ret = irttp_data_request(self->tsap, skb);
192 if (ret) { 192 if (ret) {
193 IRDA_ERROR("%s(), failed\n", __FUNCTION__); 193 IRDA_ERROR("%s(), failed\n", __func__);
194 /* irttp_data_request already free the packet */ 194 /* irttp_data_request already free the packet */
195 } 195 }
196 196
@@ -208,7 +208,7 @@ static int ircomm_ttp_data_indication(void *instance, void *sap,
208{ 208{
209 struct ircomm_cb *self = (struct ircomm_cb *) instance; 209 struct ircomm_cb *self = (struct ircomm_cb *) instance;
210 210
211 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 211 IRDA_DEBUG(4, "%s()\n", __func__ );
212 212
213 IRDA_ASSERT(self != NULL, return -1;); 213 IRDA_ASSERT(self != NULL, return -1;);
214 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 214 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -231,7 +231,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
231 struct ircomm_cb *self = (struct ircomm_cb *) instance; 231 struct ircomm_cb *self = (struct ircomm_cb *) instance;
232 struct ircomm_info info; 232 struct ircomm_info info;
233 233
234 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 234 IRDA_DEBUG(4, "%s()\n", __func__ );
235 235
236 IRDA_ASSERT(self != NULL, return;); 236 IRDA_ASSERT(self != NULL, return;);
237 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 237 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -240,7 +240,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
240 240
241 if (max_sdu_size != TTP_SAR_DISABLE) { 241 if (max_sdu_size != TTP_SAR_DISABLE) {
242 IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", 242 IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
243 __FUNCTION__); 243 __func__);
244 goto out; 244 goto out;
245 } 245 }
246 246
@@ -272,7 +272,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
272 struct ircomm_cb *self = (struct ircomm_cb *)instance; 272 struct ircomm_cb *self = (struct ircomm_cb *)instance;
273 struct ircomm_info info; 273 struct ircomm_info info;
274 274
275 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 275 IRDA_DEBUG(4, "%s()\n", __func__ );
276 276
277 IRDA_ASSERT(self != NULL, return;); 277 IRDA_ASSERT(self != NULL, return;);
278 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 278 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -281,7 +281,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
281 281
282 if (max_sdu_size != TTP_SAR_DISABLE) { 282 if (max_sdu_size != TTP_SAR_DISABLE) {
283 IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", 283 IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
284 __FUNCTION__); 284 __func__);
285 goto out; 285 goto out;
286 } 286 }
287 287
@@ -331,7 +331,7 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap,
331 struct ircomm_cb *self = (struct ircomm_cb *) instance; 331 struct ircomm_cb *self = (struct ircomm_cb *) instance;
332 struct ircomm_info info; 332 struct ircomm_info info;
333 333
334 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 334 IRDA_DEBUG(2, "%s()\n", __func__ );
335 335
336 IRDA_ASSERT(self != NULL, return;); 336 IRDA_ASSERT(self != NULL, return;);
337 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 337 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -356,7 +356,7 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap,
356{ 356{
357 struct ircomm_cb *self = (struct ircomm_cb *) instance; 357 struct ircomm_cb *self = (struct ircomm_cb *) instance;
358 358
359 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 359 IRDA_DEBUG(4, "%s()\n", __func__ );
360 360
361 IRDA_ASSERT(self != NULL, return;); 361 IRDA_ASSERT(self != NULL, return;);
362 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 362 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index be627e1f04d8..d2620410cb0a 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -115,7 +115,7 @@ static int __init ircomm_tty_init(void)
115 return -ENOMEM; 115 return -ENOMEM;
116 ircomm_tty = hashbin_new(HB_LOCK); 116 ircomm_tty = hashbin_new(HB_LOCK);
117 if (ircomm_tty == NULL) { 117 if (ircomm_tty == NULL) {
118 IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); 118 IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
119 put_tty_driver(driver); 119 put_tty_driver(driver);
120 return -ENOMEM; 120 return -ENOMEM;
121 } 121 }
@@ -133,7 +133,7 @@ static int __init ircomm_tty_init(void)
133 tty_set_operations(driver, &ops); 133 tty_set_operations(driver, &ops);
134 if (tty_register_driver(driver)) { 134 if (tty_register_driver(driver)) {
135 IRDA_ERROR("%s(): Couldn't register serial driver\n", 135 IRDA_ERROR("%s(): Couldn't register serial driver\n",
136 __FUNCTION__); 136 __func__);
137 put_tty_driver(driver); 137 put_tty_driver(driver);
138 return -1; 138 return -1;
139 } 139 }
@@ -142,7 +142,7 @@ static int __init ircomm_tty_init(void)
142 142
143static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) 143static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
144{ 144{
145 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 145 IRDA_DEBUG(0, "%s()\n", __func__ );
146 146
147 IRDA_ASSERT(self != NULL, return;); 147 IRDA_ASSERT(self != NULL, return;);
148 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 148 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -163,12 +163,12 @@ static void __exit ircomm_tty_cleanup(void)
163{ 163{
164 int ret; 164 int ret;
165 165
166 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 166 IRDA_DEBUG(4, "%s()\n", __func__ );
167 167
168 ret = tty_unregister_driver(driver); 168 ret = tty_unregister_driver(driver);
169 if (ret) { 169 if (ret) {
170 IRDA_ERROR("%s(), failed to unregister driver\n", 170 IRDA_ERROR("%s(), failed to unregister driver\n",
171 __FUNCTION__); 171 __func__);
172 return; 172 return;
173 } 173 }
174 174
@@ -187,14 +187,14 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
187 notify_t notify; 187 notify_t notify;
188 int ret = -ENODEV; 188 int ret = -ENODEV;
189 189
190 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 190 IRDA_DEBUG(2, "%s()\n", __func__ );
191 191
192 IRDA_ASSERT(self != NULL, return -1;); 192 IRDA_ASSERT(self != NULL, return -1;);
193 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 193 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
194 194
195 /* Check if already open */ 195 /* Check if already open */
196 if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) { 196 if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) {
197 IRDA_DEBUG(2, "%s(), already open so break out!\n", __FUNCTION__ ); 197 IRDA_DEBUG(2, "%s(), already open so break out!\n", __func__ );
198 return 0; 198 return 0;
199 } 199 }
200 200
@@ -224,7 +224,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
224 /* Connect IrCOMM link with remote device */ 224 /* Connect IrCOMM link with remote device */
225 ret = ircomm_tty_attach_cable(self); 225 ret = ircomm_tty_attach_cable(self);
226 if (ret < 0) { 226 if (ret < 0) {
227 IRDA_ERROR("%s(), error attaching cable!\n", __FUNCTION__); 227 IRDA_ERROR("%s(), error attaching cable!\n", __func__);
228 goto err; 228 goto err;
229 } 229 }
230 230
@@ -249,7 +249,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
249 unsigned long flags; 249 unsigned long flags;
250 struct tty_struct *tty; 250 struct tty_struct *tty;
251 251
252 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 252 IRDA_DEBUG(2, "%s()\n", __func__ );
253 253
254 tty = self->tty; 254 tty = self->tty;
255 255
@@ -260,12 +260,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
260 if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){ 260 if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){
261 /* nonblock mode is set or port is not enabled */ 261 /* nonblock mode is set or port is not enabled */
262 self->flags |= ASYNC_NORMAL_ACTIVE; 262 self->flags |= ASYNC_NORMAL_ACTIVE;
263 IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __FUNCTION__ ); 263 IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __func__ );
264 return 0; 264 return 0;
265 } 265 }
266 266
267 if (tty->termios->c_cflag & CLOCAL) { 267 if (tty->termios->c_cflag & CLOCAL) {
268 IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __FUNCTION__ ); 268 IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __func__ );
269 do_clocal = 1; 269 do_clocal = 1;
270 } 270 }
271 271
@@ -368,7 +368,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
368 unsigned long flags; 368 unsigned long flags;
369 int ret; 369 int ret;
370 370
371 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 371 IRDA_DEBUG(2, "%s()\n", __func__ );
372 372
373 line = tty->index; 373 line = tty->index;
374 if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) { 374 if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
@@ -381,7 +381,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
381 /* No, so make new instance */ 381 /* No, so make new instance */
382 self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); 382 self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
383 if (self == NULL) { 383 if (self == NULL) {
384 IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); 384 IRDA_ERROR("%s(), kmalloc failed!\n", __func__);
385 return -ENOMEM; 385 return -ENOMEM;
386 } 386 }
387 387
@@ -420,7 +420,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
420 self->tty = tty; 420 self->tty = tty;
421 spin_unlock_irqrestore(&self->spinlock, flags); 421 spin_unlock_irqrestore(&self->spinlock, flags);
422 422
423 IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver->name, 423 IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name,
424 self->line, self->open_count); 424 self->line, self->open_count);
425 425
426 /* Not really used by us, but lets do it anyway */ 426 /* Not really used by us, but lets do it anyway */
@@ -442,7 +442,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
442 442
443 if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) { 443 if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) {
444 IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n", 444 IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n",
445 __FUNCTION__); 445 __func__);
446 return -ERESTARTSYS; 446 return -ERESTARTSYS;
447 } 447 }
448 448
@@ -460,9 +460,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
460 self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ 460 self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
461 /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ 461 /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
462 self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ 462 self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */
463 IRDA_DEBUG(2, "%s(), IrCOMM device\n", __FUNCTION__ ); 463 IRDA_DEBUG(2, "%s(), IrCOMM device\n", __func__ );
464 } else { 464 } else {
465 IRDA_DEBUG(2, "%s(), IrLPT device\n", __FUNCTION__ ); 465 IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ );
466 self->service_type = IRCOMM_3_WIRE_RAW; 466 self->service_type = IRCOMM_3_WIRE_RAW;
467 self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ 467 self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */
468 } 468 }
@@ -474,7 +474,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
474 ret = ircomm_tty_block_til_ready(self, filp); 474 ret = ircomm_tty_block_til_ready(self, filp);
475 if (ret) { 475 if (ret) {
476 IRDA_DEBUG(2, 476 IRDA_DEBUG(2,
477 "%s(), returning after block_til_ready with %d\n", __FUNCTION__ , 477 "%s(), returning after block_til_ready with %d\n", __func__ ,
478 ret); 478 ret);
479 479
480 return ret; 480 return ret;
@@ -493,7 +493,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
493 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 493 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
494 unsigned long flags; 494 unsigned long flags;
495 495
496 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 496 IRDA_DEBUG(0, "%s()\n", __func__ );
497 497
498 if (!tty) 498 if (!tty)
499 return; 499 return;
@@ -506,7 +506,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
506 if (tty_hung_up_p(filp)) { 506 if (tty_hung_up_p(filp)) {
507 spin_unlock_irqrestore(&self->spinlock, flags); 507 spin_unlock_irqrestore(&self->spinlock, flags);
508 508
509 IRDA_DEBUG(0, "%s(), returning 1\n", __FUNCTION__ ); 509 IRDA_DEBUG(0, "%s(), returning 1\n", __func__ );
510 return; 510 return;
511 } 511 }
512 512
@@ -519,20 +519,20 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
519 * serial port won't be shutdown. 519 * serial port won't be shutdown.
520 */ 520 */
521 IRDA_DEBUG(0, "%s(), bad serial port count; " 521 IRDA_DEBUG(0, "%s(), bad serial port count; "
522 "tty->count is 1, state->count is %d\n", __FUNCTION__ , 522 "tty->count is 1, state->count is %d\n", __func__ ,
523 self->open_count); 523 self->open_count);
524 self->open_count = 1; 524 self->open_count = 1;
525 } 525 }
526 526
527 if (--self->open_count < 0) { 527 if (--self->open_count < 0) {
528 IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n", 528 IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n",
529 __FUNCTION__, self->line, self->open_count); 529 __func__, self->line, self->open_count);
530 self->open_count = 0; 530 self->open_count = 0;
531 } 531 }
532 if (self->open_count) { 532 if (self->open_count) {
533 spin_unlock_irqrestore(&self->spinlock, flags); 533 spin_unlock_irqrestore(&self->spinlock, flags);
534 534
535 IRDA_DEBUG(0, "%s(), open count > 0\n", __FUNCTION__ ); 535 IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
536 return; 536 return;
537 } 537 }
538 538
@@ -608,7 +608,7 @@ static void ircomm_tty_do_softint(struct work_struct *work)
608 unsigned long flags; 608 unsigned long flags;
609 struct sk_buff *skb, *ctrl_skb; 609 struct sk_buff *skb, *ctrl_skb;
610 610
611 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 611 IRDA_DEBUG(2, "%s()\n", __func__ );
612 612
613 if (!self || self->magic != IRCOMM_TTY_MAGIC) 613 if (!self || self->magic != IRCOMM_TTY_MAGIC)
614 return; 614 return;
@@ -678,7 +678,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
678 int len = 0; 678 int len = 0;
679 int size; 679 int size;
680 680
681 IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __FUNCTION__ , count, 681 IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __func__ , count,
682 tty->hw_stopped); 682 tty->hw_stopped);
683 683
684 IRDA_ASSERT(self != NULL, return -1;); 684 IRDA_ASSERT(self != NULL, return -1;);
@@ -701,7 +701,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
701 * we don't mess up the original "safe skb" (see tx_data_size). 701 * we don't mess up the original "safe skb" (see tx_data_size).
702 * Jean II */ 702 * Jean II */
703 if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { 703 if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) {
704 IRDA_DEBUG(1, "%s() : not initialised\n", __FUNCTION__); 704 IRDA_DEBUG(1, "%s() : not initialised\n", __func__);
705#ifdef IRCOMM_NO_TX_BEFORE_INIT 705#ifdef IRCOMM_NO_TX_BEFORE_INIT
706 /* We didn't consume anything, TTY will retry */ 706 /* We didn't consume anything, TTY will retry */
707 return 0; 707 return 0;
@@ -830,7 +830,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty)
830 ret = self->max_data_size; 830 ret = self->max_data_size;
831 spin_unlock_irqrestore(&self->spinlock, flags); 831 spin_unlock_irqrestore(&self->spinlock, flags);
832 } 832 }
833 IRDA_DEBUG(2, "%s(), ret=%d\n", __FUNCTION__ , ret); 833 IRDA_DEBUG(2, "%s(), ret=%d\n", __func__ , ret);
834 834
835 return ret; 835 return ret;
836} 836}
@@ -847,7 +847,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
847 unsigned long orig_jiffies, poll_time; 847 unsigned long orig_jiffies, poll_time;
848 unsigned long flags; 848 unsigned long flags;
849 849
850 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 850 IRDA_DEBUG(2, "%s()\n", __func__ );
851 851
852 IRDA_ASSERT(self != NULL, return;); 852 IRDA_ASSERT(self != NULL, return;);
853 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 853 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -882,7 +882,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty)
882{ 882{
883 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 883 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
884 884
885 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 885 IRDA_DEBUG(2, "%s()\n", __func__ );
886 886
887 IRDA_ASSERT(self != NULL, return;); 887 IRDA_ASSERT(self != NULL, return;);
888 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 888 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -913,7 +913,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
913{ 913{
914 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 914 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
915 915
916 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 916 IRDA_DEBUG(2, "%s()\n", __func__ );
917 917
918 IRDA_ASSERT(self != NULL, return;); 918 IRDA_ASSERT(self != NULL, return;);
919 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 919 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -928,7 +928,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
928 self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); 928 self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS);
929 929
930 ircomm_param_request(self, IRCOMM_DTE, TRUE); 930 ircomm_param_request(self, IRCOMM_DTE, TRUE);
931 IRDA_DEBUG(1, "%s(), FLOW_START\n", __FUNCTION__ ); 931 IRDA_DEBUG(1, "%s(), FLOW_START\n", __func__ );
932 } 932 }
933 ircomm_flow_request(self->ircomm, FLOW_START); 933 ircomm_flow_request(self->ircomm, FLOW_START);
934} 934}
@@ -965,7 +965,7 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self)
965 IRDA_ASSERT(self != NULL, return;); 965 IRDA_ASSERT(self != NULL, return;);
966 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 966 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
967 967
968 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 968 IRDA_DEBUG(0, "%s()\n", __func__ );
969 969
970 if (!test_and_clear_bit(ASYNC_B_INITIALIZED, &self->flags)) 970 if (!test_and_clear_bit(ASYNC_B_INITIALIZED, &self->flags))
971 return; 971 return;
@@ -1008,7 +1008,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
1008 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 1008 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
1009 unsigned long flags; 1009 unsigned long flags;
1010 1010
1011 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 1011 IRDA_DEBUG(0, "%s()\n", __func__ );
1012 1012
1013 IRDA_ASSERT(self != NULL, return;); 1013 IRDA_ASSERT(self != NULL, return;);
1014 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 1014 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -1037,7 +1037,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
1037 */ 1037 */
1038static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) 1038static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch)
1039{ 1039{
1040 IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__ ); 1040 IRDA_DEBUG(0, "%s(), not impl\n", __func__ );
1041} 1041}
1042 1042
1043/* 1043/*
@@ -1081,7 +1081,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1081 struct tty_struct *tty; 1081 struct tty_struct *tty;
1082 int status; 1082 int status;
1083 1083
1084 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 1084 IRDA_DEBUG(0, "%s()\n", __func__ );
1085 1085
1086 IRDA_ASSERT(self != NULL, return;); 1086 IRDA_ASSERT(self != NULL, return;);
1087 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 1087 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -1095,14 +1095,14 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1095 } 1095 }
1096 if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { 1096 if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) {
1097 IRDA_DEBUG(2, 1097 IRDA_DEBUG(2,
1098 "%s(), ircomm%d CD now %s...\n", __FUNCTION__ , self->line, 1098 "%s(), ircomm%d CD now %s...\n", __func__ , self->line,
1099 (status & IRCOMM_CD) ? "on" : "off"); 1099 (status & IRCOMM_CD) ? "on" : "off");
1100 1100
1101 if (status & IRCOMM_CD) { 1101 if (status & IRCOMM_CD) {
1102 wake_up_interruptible(&self->open_wait); 1102 wake_up_interruptible(&self->open_wait);
1103 } else { 1103 } else {
1104 IRDA_DEBUG(2, 1104 IRDA_DEBUG(2,
1105 "%s(), Doing serial hangup..\n", __FUNCTION__ ); 1105 "%s(), Doing serial hangup..\n", __func__ );
1106 if (tty) 1106 if (tty)
1107 tty_hangup(tty); 1107 tty_hangup(tty);
1108 1108
@@ -1114,7 +1114,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1114 if (tty->hw_stopped) { 1114 if (tty->hw_stopped) {
1115 if (status & IRCOMM_CTS) { 1115 if (status & IRCOMM_CTS) {
1116 IRDA_DEBUG(2, 1116 IRDA_DEBUG(2,
1117 "%s(), CTS tx start...\n", __FUNCTION__ ); 1117 "%s(), CTS tx start...\n", __func__ );
1118 tty->hw_stopped = 0; 1118 tty->hw_stopped = 0;
1119 1119
1120 /* Wake up processes blocked on open */ 1120 /* Wake up processes blocked on open */
@@ -1126,7 +1126,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1126 } else { 1126 } else {
1127 if (!(status & IRCOMM_CTS)) { 1127 if (!(status & IRCOMM_CTS)) {
1128 IRDA_DEBUG(2, 1128 IRDA_DEBUG(2,
1129 "%s(), CTS tx stop...\n", __FUNCTION__ ); 1129 "%s(), CTS tx stop...\n", __func__ );
1130 tty->hw_stopped = 1; 1130 tty->hw_stopped = 1;
1131 } 1131 }
1132 } 1132 }
@@ -1144,14 +1144,14 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
1144{ 1144{
1145 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 1145 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
1146 1146
1147 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 1147 IRDA_DEBUG(2, "%s()\n", __func__ );
1148 1148
1149 IRDA_ASSERT(self != NULL, return -1;); 1149 IRDA_ASSERT(self != NULL, return -1;);
1150 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 1150 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
1151 IRDA_ASSERT(skb != NULL, return -1;); 1151 IRDA_ASSERT(skb != NULL, return -1;);
1152 1152
1153 if (!self->tty) { 1153 if (!self->tty) {
1154 IRDA_DEBUG(0, "%s(), no tty!\n", __FUNCTION__ ); 1154 IRDA_DEBUG(0, "%s(), no tty!\n", __func__ );
1155 return 0; 1155 return 0;
1156 } 1156 }
1157 1157
@@ -1162,7 +1162,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
1162 * params, we can just as well declare the hardware for running. 1162 * params, we can just as well declare the hardware for running.
1163 */ 1163 */
1164 if (self->tty->hw_stopped && (self->flow == FLOW_START)) { 1164 if (self->tty->hw_stopped && (self->flow == FLOW_START)) {
1165 IRDA_DEBUG(0, "%s(), polling for line settings!\n", __FUNCTION__ ); 1165 IRDA_DEBUG(0, "%s(), polling for line settings!\n", __func__ );
1166 ircomm_param_request(self, IRCOMM_POLL, TRUE); 1166 ircomm_param_request(self, IRCOMM_POLL, TRUE);
1167 1167
1168 /* We can just as well declare the hardware for running */ 1168 /* We can just as well declare the hardware for running */
@@ -1194,7 +1194,7 @@ static int ircomm_tty_control_indication(void *instance, void *sap,
1194 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 1194 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
1195 int clen; 1195 int clen;
1196 1196
1197 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 1197 IRDA_DEBUG(4, "%s()\n", __func__ );
1198 1198
1199 IRDA_ASSERT(self != NULL, return -1;); 1199 IRDA_ASSERT(self != NULL, return -1;);
1200 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 1200 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
@@ -1230,7 +1230,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
1230 1230
1231 switch (cmd) { 1231 switch (cmd) {
1232 case FLOW_START: 1232 case FLOW_START:
1233 IRDA_DEBUG(2, "%s(), hw start!\n", __FUNCTION__ ); 1233 IRDA_DEBUG(2, "%s(), hw start!\n", __func__ );
1234 tty->hw_stopped = 0; 1234 tty->hw_stopped = 0;
1235 1235
1236 /* ircomm_tty_do_softint will take care of the rest */ 1236 /* ircomm_tty_do_softint will take care of the rest */
@@ -1238,7 +1238,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
1238 break; 1238 break;
1239 default: /* If we get here, something is very wrong, better stop */ 1239 default: /* If we get here, something is very wrong, better stop */
1240 case FLOW_STOP: 1240 case FLOW_STOP:
1241 IRDA_DEBUG(2, "%s(), hw stopped!\n", __FUNCTION__ ); 1241 IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ );
1242 tty->hw_stopped = 1; 1242 tty->hw_stopped = 1;
1243 break; 1243 break;
1244 } 1244 }
diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c
index b5a13882c927..9032a1d1190d 100644
--- a/net/irda/ircomm/ircomm_tty_attach.c
+++ b/net/irda/ircomm/ircomm_tty_attach.c
@@ -129,14 +129,14 @@ static int (*state[])(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
129 */ 129 */
130int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) 130int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
131{ 131{
132 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 132 IRDA_DEBUG(0, "%s()\n", __func__ );
133 133
134 IRDA_ASSERT(self != NULL, return -1;); 134 IRDA_ASSERT(self != NULL, return -1;);
135 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 135 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
136 136
137 /* Check if somebody has already connected to us */ 137 /* Check if somebody has already connected to us */
138 if (ircomm_is_connected(self->ircomm)) { 138 if (ircomm_is_connected(self->ircomm)) {
139 IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ ); 139 IRDA_DEBUG(0, "%s(), already connected!\n", __func__ );
140 return 0; 140 return 0;
141 } 141 }
142 142
@@ -158,7 +158,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
158 */ 158 */
159void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) 159void ircomm_tty_detach_cable(struct ircomm_tty_cb *self)
160{ 160{
161 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 161 IRDA_DEBUG(0, "%s()\n", __func__ );
162 162
163 IRDA_ASSERT(self != NULL, return;); 163 IRDA_ASSERT(self != NULL, return;);
164 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 164 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -207,7 +207,7 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self)
207 __u8 oct_seq[6]; 207 __u8 oct_seq[6];
208 __u16 hints; 208 __u16 hints;
209 209
210 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 210 IRDA_DEBUG(0, "%s()\n", __func__ );
211 211
212 IRDA_ASSERT(self != NULL, return;); 212 IRDA_ASSERT(self != NULL, return;);
213 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 213 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -308,16 +308,16 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self)
308 * Set default values, but only if the application for some reason 308 * Set default values, but only if the application for some reason
309 * haven't set them already 309 * haven't set them already
310 */ 310 */
311 IRDA_DEBUG(2, "%s(), data-rate = %d\n", __FUNCTION__ , 311 IRDA_DEBUG(2, "%s(), data-rate = %d\n", __func__ ,
312 self->settings.data_rate); 312 self->settings.data_rate);
313 if (!self->settings.data_rate) 313 if (!self->settings.data_rate)
314 self->settings.data_rate = 9600; 314 self->settings.data_rate = 9600;
315 IRDA_DEBUG(2, "%s(), data-format = %d\n", __FUNCTION__ , 315 IRDA_DEBUG(2, "%s(), data-format = %d\n", __func__ ,
316 self->settings.data_format); 316 self->settings.data_format);
317 if (!self->settings.data_format) 317 if (!self->settings.data_format)
318 self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ 318 self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */
319 319
320 IRDA_DEBUG(2, "%s(), flow-control = %d\n", __FUNCTION__ , 320 IRDA_DEBUG(2, "%s(), flow-control = %d\n", __func__ ,
321 self->settings.flow_control); 321 self->settings.flow_control);
322 /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ 322 /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/
323 323
@@ -362,7 +362,7 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery,
362 struct ircomm_tty_cb *self; 362 struct ircomm_tty_cb *self;
363 struct ircomm_tty_info info; 363 struct ircomm_tty_info info;
364 364
365 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 365 IRDA_DEBUG(2, "%s()\n", __func__ );
366 366
367 /* Important note : 367 /* Important note :
368 * We need to drop all passive discoveries. 368 * We need to drop all passive discoveries.
@@ -398,7 +398,7 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap,
398{ 398{
399 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 399 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
400 400
401 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 401 IRDA_DEBUG(2, "%s()\n", __func__ );
402 402
403 IRDA_ASSERT(self != NULL, return;); 403 IRDA_ASSERT(self != NULL, return;);
404 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 404 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -428,7 +428,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
428{ 428{
429 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; 429 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv;
430 430
431 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 431 IRDA_DEBUG(2, "%s()\n", __func__ );
432 432
433 IRDA_ASSERT(self != NULL, return;); 433 IRDA_ASSERT(self != NULL, return;);
434 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 434 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -439,13 +439,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
439 439
440 /* Check if request succeeded */ 440 /* Check if request succeeded */
441 if (result != IAS_SUCCESS) { 441 if (result != IAS_SUCCESS) {
442 IRDA_DEBUG(4, "%s(), got NULL value!\n", __FUNCTION__ ); 442 IRDA_DEBUG(4, "%s(), got NULL value!\n", __func__ );
443 return; 443 return;
444 } 444 }
445 445
446 switch (value->type) { 446 switch (value->type) {
447 case IAS_OCT_SEQ: 447 case IAS_OCT_SEQ:
448 IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__ ); 448 IRDA_DEBUG(2, "%s(), got octet sequence\n", __func__ );
449 449
450 irda_param_extract_all(self, value->t.oct_seq, value->len, 450 irda_param_extract_all(self, value->t.oct_seq, value->len,
451 &ircomm_param_info); 451 &ircomm_param_info);
@@ -455,21 +455,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
455 break; 455 break;
456 case IAS_INTEGER: 456 case IAS_INTEGER:
457 /* Got LSAP selector */ 457 /* Got LSAP selector */
458 IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __FUNCTION__ , 458 IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __func__ ,
459 value->t.integer); 459 value->t.integer);
460 460
461 if (value->t.integer == -1) { 461 if (value->t.integer == -1) {
462 IRDA_DEBUG(0, "%s(), invalid value!\n", __FUNCTION__ ); 462 IRDA_DEBUG(0, "%s(), invalid value!\n", __func__ );
463 } else 463 } else
464 self->dlsap_sel = value->t.integer; 464 self->dlsap_sel = value->t.integer;
465 465
466 ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); 466 ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL);
467 break; 467 break;
468 case IAS_MISSING: 468 case IAS_MISSING:
469 IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __FUNCTION__ ); 469 IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __func__ );
470 break; 470 break;
471 default: 471 default:
472 IRDA_DEBUG(0, "%s(), got unknown type!\n", __FUNCTION__ ); 472 IRDA_DEBUG(0, "%s(), got unknown type!\n", __func__ );
473 break; 473 break;
474 } 474 }
475 irias_delete_value(value); 475 irias_delete_value(value);
@@ -489,7 +489,7 @@ void ircomm_tty_connect_confirm(void *instance, void *sap,
489{ 489{
490 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 490 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
491 491
492 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 492 IRDA_DEBUG(2, "%s()\n", __func__ );
493 493
494 IRDA_ASSERT(self != NULL, return;); 494 IRDA_ASSERT(self != NULL, return;);
495 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 495 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -520,7 +520,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
520 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 520 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
521 int clen; 521 int clen;
522 522
523 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 523 IRDA_DEBUG(2, "%s()\n", __func__ );
524 524
525 IRDA_ASSERT(self != NULL, return;); 525 IRDA_ASSERT(self != NULL, return;);
526 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 526 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -549,7 +549,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
549 */ 549 */
550void ircomm_tty_link_established(struct ircomm_tty_cb *self) 550void ircomm_tty_link_established(struct ircomm_tty_cb *self)
551{ 551{
552 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 552 IRDA_DEBUG(2, "%s()\n", __func__ );
553 553
554 IRDA_ASSERT(self != NULL, return;); 554 IRDA_ASSERT(self != NULL, return;);
555 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 555 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -566,10 +566,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self)
566 * line. 566 * line.
567 */ 567 */
568 if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) { 568 if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) {
569 IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __FUNCTION__ ); 569 IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __func__ );
570 return; 570 return;
571 } else { 571 } else {
572 IRDA_DEBUG(1, "%s(), starting hardware!\n", __FUNCTION__ ); 572 IRDA_DEBUG(1, "%s(), starting hardware!\n", __func__ );
573 573
574 self->tty->hw_stopped = 0; 574 self->tty->hw_stopped = 0;
575 575
@@ -607,7 +607,7 @@ static void ircomm_tty_watchdog_timer_expired(void *data)
607{ 607{
608 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; 608 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
609 609
610 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 610 IRDA_DEBUG(2, "%s()\n", __func__ );
611 611
612 IRDA_ASSERT(self != NULL, return;); 612 IRDA_ASSERT(self != NULL, return;);
613 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 613 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -628,7 +628,7 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
628 IRDA_ASSERT(self != NULL, return -1;); 628 IRDA_ASSERT(self != NULL, return -1;);
629 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 629 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
630 630
631 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , 631 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
632 ircomm_tty_state[self->state], ircomm_tty_event[event]); 632 ircomm_tty_state[self->state], ircomm_tty_event[event]);
633 633
634 return (*state[self->state])(self, event, skb, info); 634 return (*state[self->state])(self, event, skb, info);
@@ -646,7 +646,7 @@ static inline void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_
646 IRDA_ASSERT(self != NULL, return;); 646 IRDA_ASSERT(self != NULL, return;);
647 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 647 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
648 648
649 IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __FUNCTION__ , 649 IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __func__ ,
650 ircomm_tty_state[self->state], self->service_type); 650 ircomm_tty_state[self->state], self->service_type);
651 */ 651 */
652 self->state = state; 652 self->state = state;
@@ -665,7 +665,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
665{ 665{
666 int ret = 0; 666 int ret = 0;
667 667
668 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , 668 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
669 ircomm_tty_state[self->state], ircomm_tty_event[event]); 669 ircomm_tty_state[self->state], ircomm_tty_event[event]);
670 switch (event) { 670 switch (event) {
671 case IRCOMM_TTY_ATTACH_CABLE: 671 case IRCOMM_TTY_ATTACH_CABLE:
@@ -681,7 +681,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
681 681
682 if (self->iriap) { 682 if (self->iriap) {
683 IRDA_WARNING("%s(), busy with a previous query\n", 683 IRDA_WARNING("%s(), busy with a previous query\n",
684 __FUNCTION__); 684 __func__);
685 return -EBUSY; 685 return -EBUSY;
686 } 686 }
687 687
@@ -709,7 +709,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
709 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 709 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
710 break; 710 break;
711 default: 711 default:
712 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , 712 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
713 ircomm_tty_event[event]); 713 ircomm_tty_event[event]);
714 ret = -EINVAL; 714 ret = -EINVAL;
715 } 715 }
@@ -729,7 +729,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
729{ 729{
730 int ret = 0; 730 int ret = 0;
731 731
732 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , 732 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
733 ircomm_tty_state[self->state], ircomm_tty_event[event]); 733 ircomm_tty_state[self->state], ircomm_tty_event[event]);
734 734
735 switch (event) { 735 switch (event) {
@@ -739,7 +739,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
739 739
740 if (self->iriap) { 740 if (self->iriap) {
741 IRDA_WARNING("%s(), busy with a previous query\n", 741 IRDA_WARNING("%s(), busy with a previous query\n",
742 __FUNCTION__); 742 __func__);
743 return -EBUSY; 743 return -EBUSY;
744 } 744 }
745 745
@@ -782,7 +782,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
782 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 782 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
783 break; 783 break;
784 default: 784 default:
785 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , 785 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
786 ircomm_tty_event[event]); 786 ircomm_tty_event[event]);
787 ret = -EINVAL; 787 ret = -EINVAL;
788 } 788 }
@@ -802,14 +802,14 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
802{ 802{
803 int ret = 0; 803 int ret = 0;
804 804
805 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , 805 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
806 ircomm_tty_state[self->state], ircomm_tty_event[event]); 806 ircomm_tty_state[self->state], ircomm_tty_event[event]);
807 807
808 switch (event) { 808 switch (event) {
809 case IRCOMM_TTY_GOT_PARAMETERS: 809 case IRCOMM_TTY_GOT_PARAMETERS:
810 if (self->iriap) { 810 if (self->iriap) {
811 IRDA_WARNING("%s(), busy with a previous query\n", 811 IRDA_WARNING("%s(), busy with a previous query\n",
812 __FUNCTION__); 812 __func__);
813 return -EBUSY; 813 return -EBUSY;
814 } 814 }
815 815
@@ -840,7 +840,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
840 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 840 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
841 break; 841 break;
842 default: 842 default:
843 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , 843 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
844 ircomm_tty_event[event]); 844 ircomm_tty_event[event]);
845 ret = -EINVAL; 845 ret = -EINVAL;
846 } 846 }
@@ -860,7 +860,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
860{ 860{
861 int ret = 0; 861 int ret = 0;
862 862
863 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , 863 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
864 ircomm_tty_state[self->state], ircomm_tty_event[event]); 864 ircomm_tty_state[self->state], ircomm_tty_event[event]);
865 865
866 switch (event) { 866 switch (event) {
@@ -889,7 +889,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
889 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 889 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
890 break; 890 break;
891 default: 891 default:
892 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , 892 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
893 ircomm_tty_event[event]); 893 ircomm_tty_event[event]);
894 ret = -EINVAL; 894 ret = -EINVAL;
895 } 895 }
@@ -909,7 +909,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
909{ 909{
910 int ret = 0; 910 int ret = 0;
911 911
912 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , 912 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
913 ircomm_tty_state[self->state], ircomm_tty_event[event]); 913 ircomm_tty_state[self->state], ircomm_tty_event[event]);
914 914
915 switch (event) { 915 switch (event) {
@@ -943,7 +943,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
943 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 943 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
944 break; 944 break;
945 default: 945 default:
946 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , 946 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
947 ircomm_tty_event[event]); 947 ircomm_tty_event[event]);
948 ret = -EINVAL; 948 ret = -EINVAL;
949 } 949 }
@@ -981,13 +981,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self,
981 self->settings.dce = IRCOMM_DELTA_CD; 981 self->settings.dce = IRCOMM_DELTA_CD;
982 ircomm_tty_check_modem_status(self); 982 ircomm_tty_check_modem_status(self);
983 } else { 983 } else {
984 IRDA_DEBUG(0, "%s(), hanging up!\n", __FUNCTION__ ); 984 IRDA_DEBUG(0, "%s(), hanging up!\n", __func__ );
985 if (self->tty) 985 if (self->tty)
986 tty_hangup(self->tty); 986 tty_hangup(self->tty);
987 } 987 }
988 break; 988 break;
989 default: 989 default:
990 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , 990 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
991 ircomm_tty_event[event]); 991 ircomm_tty_event[event]);
992 ret = -EINVAL; 992 ret = -EINVAL;
993 } 993 }
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c
index 6030947b6d93..24cb3aa2bbfb 100644
--- a/net/irda/ircomm/ircomm_tty_ioctl.c
+++ b/net/irda/ircomm/ircomm_tty_ioctl.c
@@ -57,7 +57,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
57 unsigned cflag, cval; 57 unsigned cflag, cval;
58 int baud; 58 int baud;
59 59
60 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 60 IRDA_DEBUG(2, "%s()\n", __func__ );
61 61
62 if (!self->tty || !self->tty->termios || !self->ircomm) 62 if (!self->tty || !self->tty->termios || !self->ircomm)
63 return; 63 return;
@@ -94,7 +94,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
94 self->settings.flow_control |= IRCOMM_RTS_CTS_IN; 94 self->settings.flow_control |= IRCOMM_RTS_CTS_IN;
95 /* This got me. Bummer. Jean II */ 95 /* This got me. Bummer. Jean II */
96 if (self->service_type == IRCOMM_3_WIRE_RAW) 96 if (self->service_type == IRCOMM_3_WIRE_RAW)
97 IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __FUNCTION__); 97 IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __func__);
98 } else { 98 } else {
99 self->flags &= ~ASYNC_CTS_FLOW; 99 self->flags &= ~ASYNC_CTS_FLOW;
100 self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; 100 self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN;
@@ -150,7 +150,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty,
150 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 150 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
151 unsigned int cflag = tty->termios->c_cflag; 151 unsigned int cflag = tty->termios->c_cflag;
152 152
153 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 153 IRDA_DEBUG(2, "%s()\n", __func__ );
154 154
155 if ((cflag == old_termios->c_cflag) && 155 if ((cflag == old_termios->c_cflag) &&
156 (RELEVANT_IFLAG(tty->termios->c_iflag) == 156 (RELEVANT_IFLAG(tty->termios->c_iflag) ==
@@ -199,7 +199,7 @@ int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file)
199 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 199 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
200 unsigned int result; 200 unsigned int result;
201 201
202 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 202 IRDA_DEBUG(2, "%s()\n", __func__ );
203 203
204 if (tty->flags & (1 << TTY_IO_ERROR)) 204 if (tty->flags & (1 << TTY_IO_ERROR))
205 return -EIO; 205 return -EIO;
@@ -224,7 +224,7 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file,
224{ 224{
225 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 225 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
226 226
227 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 227 IRDA_DEBUG(2, "%s()\n", __func__ );
228 228
229 if (tty->flags & (1 << TTY_IO_ERROR)) 229 if (tty->flags & (1 << TTY_IO_ERROR))
230 return -EIO; 230 return -EIO;
@@ -266,7 +266,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
266 if (!retinfo) 266 if (!retinfo)
267 return -EFAULT; 267 return -EFAULT;
268 268
269 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 269 IRDA_DEBUG(2, "%s()\n", __func__ );
270 270
271 memset(&info, 0, sizeof(info)); 271 memset(&info, 0, sizeof(info));
272 info.line = self->line; 272 info.line = self->line;
@@ -302,7 +302,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self,
302 struct serial_struct new_serial; 302 struct serial_struct new_serial;
303 struct ircomm_tty_cb old_state, *state; 303 struct ircomm_tty_cb old_state, *state;
304 304
305 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 305 IRDA_DEBUG(0, "%s()\n", __func__ );
306 306
307 if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) 307 if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
308 return -EFAULT; 308 return -EFAULT;
@@ -376,7 +376,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
376 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 376 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
377 int ret = 0; 377 int ret = 0;
378 378
379 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 379 IRDA_DEBUG(2, "%s()\n", __func__ );
380 380
381 if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && 381 if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
382 (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && 382 (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
@@ -397,7 +397,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
397 break; 397 break;
398 398
399 case TIOCGICOUNT: 399 case TIOCGICOUNT:
400 IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __FUNCTION__ ); 400 IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ );
401#if 0 401#if 0
402 save_flags(flags); cli(); 402 save_flags(flags); cli();
403 cnow = driver->icount; 403 cnow = driver->icount;
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
index 87185910d0ee..ea319e3ddc18 100644
--- a/net/irda/irda_device.c
+++ b/net/irda/irda_device.c
@@ -90,7 +90,7 @@ static void leftover_dongle(void *arg)
90 90
91void irda_device_cleanup(void) 91void irda_device_cleanup(void)
92{ 92{
93 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 93 IRDA_DEBUG(4, "%s()\n", __func__);
94 94
95 hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete); 95 hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
96 96
@@ -107,7 +107,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
107{ 107{
108 struct irlap_cb *self; 108 struct irlap_cb *self;
109 109
110 IRDA_DEBUG(4, "%s(%s)\n", __FUNCTION__, status ? "TRUE" : "FALSE"); 110 IRDA_DEBUG(4, "%s(%s)\n", __func__, status ? "TRUE" : "FALSE");
111 111
112 self = (struct irlap_cb *) dev->atalk_ptr; 112 self = (struct irlap_cb *) dev->atalk_ptr;
113 113
@@ -147,11 +147,11 @@ int irda_device_is_receiving(struct net_device *dev)
147 struct if_irda_req req; 147 struct if_irda_req req;
148 int ret; 148 int ret;
149 149
150 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 150 IRDA_DEBUG(2, "%s()\n", __func__);
151 151
152 if (!dev->do_ioctl) { 152 if (!dev->do_ioctl) {
153 IRDA_ERROR("%s: do_ioctl not impl. by device driver\n", 153 IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
154 __FUNCTION__); 154 __func__);
155 return -1; 155 return -1;
156 } 156 }
157 157
@@ -191,7 +191,7 @@ static int irda_task_kick(struct irda_task *task)
191 int count = 0; 191 int count = 0;
192 int timeout; 192 int timeout;
193 193
194 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 194 IRDA_DEBUG(2, "%s()\n", __func__);
195 195
196 IRDA_ASSERT(task != NULL, return -1;); 196 IRDA_ASSERT(task != NULL, return -1;);
197 IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); 197 IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
@@ -201,14 +201,14 @@ static int irda_task_kick(struct irda_task *task)
201 timeout = task->function(task); 201 timeout = task->function(task);
202 if (count++ > 100) { 202 if (count++ > 100) {
203 IRDA_ERROR("%s: error in task handler!\n", 203 IRDA_ERROR("%s: error in task handler!\n",
204 __FUNCTION__); 204 __func__);
205 irda_task_delete(task); 205 irda_task_delete(task);
206 return TRUE; 206 return TRUE;
207 } 207 }
208 } while ((timeout == 0) && (task->state != IRDA_TASK_DONE)); 208 } while ((timeout == 0) && (task->state != IRDA_TASK_DONE));
209 209
210 if (timeout < 0) { 210 if (timeout < 0) {
211 IRDA_ERROR("%s: Error executing task!\n", __FUNCTION__); 211 IRDA_ERROR("%s: Error executing task!\n", __func__);
212 irda_task_delete(task); 212 irda_task_delete(task);
213 return TRUE; 213 return TRUE;
214 } 214 }
@@ -241,7 +241,7 @@ static int irda_task_kick(struct irda_task *task)
241 finished = FALSE; 241 finished = FALSE;
242 } else { 242 } else {
243 IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n", 243 IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n",
244 __FUNCTION__); 244 __func__);
245 finished = FALSE; 245 finished = FALSE;
246 } 246 }
247 247
@@ -258,7 +258,7 @@ static void irda_task_timer_expired(void *data)
258{ 258{
259 struct irda_task *task; 259 struct irda_task *task;
260 260
261 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 261 IRDA_DEBUG(2, "%s()\n", __func__);
262 262
263 task = (struct irda_task *) data; 263 task = (struct irda_task *) data;
264 264
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 390a790886eb..9e15c82960fe 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -108,7 +108,7 @@ int __init iriap_init(void)
108 irias_objects = hashbin_new(HB_LOCK); 108 irias_objects = hashbin_new(HB_LOCK);
109 if (!irias_objects) { 109 if (!irias_objects) {
110 IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n", 110 IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n",
111 __FUNCTION__); 111 __func__);
112 hashbin_delete(iriap, NULL); 112 hashbin_delete(iriap, NULL);
113 return -ENOMEM; 113 return -ENOMEM;
114 } 114 }
@@ -139,7 +139,7 @@ int __init iriap_init(void)
139 */ 139 */
140 server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); 140 server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
141 if (!server) { 141 if (!server) {
142 IRDA_DEBUG(0, "%s(), unable to open server\n", __FUNCTION__); 142 IRDA_DEBUG(0, "%s(), unable to open server\n", __func__);
143 return -1; 143 return -1;
144 } 144 }
145 iriap_register_lsap(server, LSAP_IAS, IAS_SERVER); 145 iriap_register_lsap(server, LSAP_IAS, IAS_SERVER);
@@ -171,11 +171,11 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
171{ 171{
172 struct iriap_cb *self; 172 struct iriap_cb *self;
173 173
174 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 174 IRDA_DEBUG(2, "%s()\n", __func__);
175 175
176 self = kzalloc(sizeof(*self), GFP_ATOMIC); 176 self = kzalloc(sizeof(*self), GFP_ATOMIC);
177 if (!self) { 177 if (!self) {
178 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 178 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
179 return NULL; 179 return NULL;
180 } 180 }
181 181
@@ -217,7 +217,7 @@ EXPORT_SYMBOL(iriap_open);
217 */ 217 */
218static void __iriap_close(struct iriap_cb *self) 218static void __iriap_close(struct iriap_cb *self)
219{ 219{
220 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 220 IRDA_DEBUG(4, "%s()\n", __func__);
221 221
222 IRDA_ASSERT(self != NULL, return;); 222 IRDA_ASSERT(self != NULL, return;);
223 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 223 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -241,7 +241,7 @@ void iriap_close(struct iriap_cb *self)
241{ 241{
242 struct iriap_cb *entry; 242 struct iriap_cb *entry;
243 243
244 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 244 IRDA_DEBUG(2, "%s()\n", __func__);
245 245
246 IRDA_ASSERT(self != NULL, return;); 246 IRDA_ASSERT(self != NULL, return;);
247 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 247 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -262,7 +262,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
262{ 262{
263 notify_t notify; 263 notify_t notify;
264 264
265 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 265 IRDA_DEBUG(2, "%s()\n", __func__);
266 266
267 irda_notify_init(&notify); 267 irda_notify_init(&notify);
268 notify.connect_confirm = iriap_connect_confirm; 268 notify.connect_confirm = iriap_connect_confirm;
@@ -277,7 +277,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
277 277
278 self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0); 278 self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0);
279 if (self->lsap == NULL) { 279 if (self->lsap == NULL) {
280 IRDA_ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__); 280 IRDA_ERROR("%s: Unable to allocated LSAP!\n", __func__);
281 return -1; 281 return -1;
282 } 282 }
283 self->slsap_sel = self->lsap->slsap_sel; 283 self->slsap_sel = self->lsap->slsap_sel;
@@ -297,7 +297,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
297{ 297{
298 struct iriap_cb *self; 298 struct iriap_cb *self;
299 299
300 IRDA_DEBUG(4, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]); 300 IRDA_DEBUG(4, "%s(), reason=%s\n", __func__, irlmp_reasons[reason]);
301 301
302 self = (struct iriap_cb *) instance; 302 self = (struct iriap_cb *) instance;
303 303
@@ -313,7 +313,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
313 dev_kfree_skb(skb); 313 dev_kfree_skb(skb);
314 314
315 if (self->mode == IAS_CLIENT) { 315 if (self->mode == IAS_CLIENT) {
316 IRDA_DEBUG(4, "%s(), disconnect as client\n", __FUNCTION__); 316 IRDA_DEBUG(4, "%s(), disconnect as client\n", __func__);
317 317
318 318
319 iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION, 319 iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION,
@@ -326,7 +326,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
326 if (self->confirm) 326 if (self->confirm)
327 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); 327 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
328 } else { 328 } else {
329 IRDA_DEBUG(4, "%s(), disconnect as server\n", __FUNCTION__); 329 IRDA_DEBUG(4, "%s(), disconnect as server\n", __func__);
330 iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION, 330 iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION,
331 NULL); 331 NULL);
332 iriap_close(self); 332 iriap_close(self);
@@ -340,7 +340,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
340{ 340{
341 struct sk_buff *tx_skb; 341 struct sk_buff *tx_skb;
342 342
343 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 343 IRDA_DEBUG(4, "%s()\n", __func__);
344 344
345 IRDA_ASSERT(self != NULL, return;); 345 IRDA_ASSERT(self != NULL, return;);
346 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 346 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -349,7 +349,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
349 if (tx_skb == NULL) { 349 if (tx_skb == NULL) {
350 IRDA_DEBUG(0, 350 IRDA_DEBUG(0,
351 "%s(), Could not allocate an sk_buff of length %d\n", 351 "%s(), Could not allocate an sk_buff of length %d\n",
352 __FUNCTION__, LMP_MAX_HEADER); 352 __func__, LMP_MAX_HEADER);
353 return; 353 return;
354 } 354 }
355 355
@@ -453,13 +453,13 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
453 /* Get length, MSB first */ 453 /* Get length, MSB first */
454 len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; 454 len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
455 455
456 IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len); 456 IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len);
457 457
458 /* Get object ID, MSB first */ 458 /* Get object ID, MSB first */
459 obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2; 459 obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
460 460
461 type = fp[n++]; 461 type = fp[n++];
462 IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type); 462 IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type);
463 463
464 switch (type) { 464 switch (type) {
465 case IAS_INTEGER: 465 case IAS_INTEGER:
@@ -468,7 +468,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
468 value = irias_new_integer_value(tmp_cpu32); 468 value = irias_new_integer_value(tmp_cpu32);
469 469
470 /* Legal values restricted to 0x01-0x6f, page 15 irttp */ 470 /* Legal values restricted to 0x01-0x6f, page 15 irttp */
471 IRDA_DEBUG(4, "%s(), lsap=%d\n", __FUNCTION__, value->t.integer); 471 IRDA_DEBUG(4, "%s(), lsap=%d\n", __func__, value->t.integer);
472 break; 472 break;
473 case IAS_STRING: 473 case IAS_STRING:
474 charset = fp[n++]; 474 charset = fp[n++];
@@ -488,7 +488,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
488/* case CS_UNICODE: */ 488/* case CS_UNICODE: */
489 default: 489 default:
490 IRDA_DEBUG(0, "%s(), charset %s, not supported\n", 490 IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
491 __FUNCTION__, ias_charset_types[charset]); 491 __func__, ias_charset_types[charset]);
492 492
493 /* Aborting, close connection! */ 493 /* Aborting, close connection! */
494 iriap_disconnect_request(self); 494 iriap_disconnect_request(self);
@@ -496,7 +496,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
496 /* break; */ 496 /* break; */
497 } 497 }
498 value_len = fp[n++]; 498 value_len = fp[n++];
499 IRDA_DEBUG(4, "%s(), strlen=%d\n", __FUNCTION__, value_len); 499 IRDA_DEBUG(4, "%s(), strlen=%d\n", __func__, value_len);
500 500
501 /* Make sure the string is null-terminated */ 501 /* Make sure the string is null-terminated */
502 fp[n+value_len] = 0x00; 502 fp[n+value_len] = 0x00;
@@ -526,7 +526,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
526 if (self->confirm) 526 if (self->confirm)
527 self->confirm(IAS_SUCCESS, obj_id, value, self->priv); 527 self->confirm(IAS_SUCCESS, obj_id, value, self->priv);
528 else { 528 else {
529 IRDA_DEBUG(0, "%s(), missing handler!\n", __FUNCTION__); 529 IRDA_DEBUG(0, "%s(), missing handler!\n", __func__);
530 irias_delete_value(value); 530 irias_delete_value(value);
531 } 531 }
532} 532}
@@ -548,7 +548,7 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
548 __be16 tmp_be16; 548 __be16 tmp_be16;
549 __u8 *fp; 549 __u8 *fp;
550 550
551 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 551 IRDA_DEBUG(4, "%s()\n", __func__);
552 552
553 IRDA_ASSERT(self != NULL, return;); 553 IRDA_ASSERT(self != NULL, return;);
554 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 554 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -610,12 +610,12 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
610 memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len; 610 memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len;
611 break; 611 break;
612 case IAS_MISSING: 612 case IAS_MISSING:
613 IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __FUNCTION__); 613 IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __func__);
614 skb_put(tx_skb, 1); 614 skb_put(tx_skb, 1);
615 fp[n++] = value->type; 615 fp[n++] = value->type;
616 break; 616 break;
617 default: 617 default:
618 IRDA_DEBUG(0, "%s(), type not implemented!\n", __FUNCTION__); 618 IRDA_DEBUG(0, "%s(), type not implemented!\n", __func__);
619 break; 619 break;
620 } 620 }
621 iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb); 621 iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb);
@@ -642,7 +642,7 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self,
642 __u8 *fp; 642 __u8 *fp;
643 int n; 643 int n;
644 644
645 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 645 IRDA_DEBUG(4, "%s()\n", __func__);
646 646
647 IRDA_ASSERT(self != NULL, return;); 647 IRDA_ASSERT(self != NULL, return;);
648 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 648 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -697,7 +697,7 @@ void iriap_send_ack(struct iriap_cb *self)
697 struct sk_buff *tx_skb; 697 struct sk_buff *tx_skb;
698 __u8 *frame; 698 __u8 *frame;
699 699
700 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 700 IRDA_DEBUG(2, "%s()\n", __func__);
701 701
702 IRDA_ASSERT(self != NULL, return;); 702 IRDA_ASSERT(self != NULL, return;);
703 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 703 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -728,7 +728,7 @@ void iriap_connect_request(struct iriap_cb *self)
728 self->saddr, self->daddr, 728 self->saddr, self->daddr,
729 NULL, NULL); 729 NULL, NULL);
730 if (ret < 0) { 730 if (ret < 0) {
731 IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__); 731 IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
732 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); 732 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
733 } 733 }
734} 734}
@@ -776,7 +776,7 @@ static void iriap_connect_indication(void *instance, void *sap,
776{ 776{
777 struct iriap_cb *self, *new; 777 struct iriap_cb *self, *new;
778 778
779 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 779 IRDA_DEBUG(1, "%s()\n", __func__);
780 780
781 self = (struct iriap_cb *) instance; 781 self = (struct iriap_cb *) instance;
782 782
@@ -787,14 +787,14 @@ static void iriap_connect_indication(void *instance, void *sap,
787 /* Start new server */ 787 /* Start new server */
788 new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); 788 new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
789 if (!new) { 789 if (!new) {
790 IRDA_DEBUG(0, "%s(), open failed\n", __FUNCTION__); 790 IRDA_DEBUG(0, "%s(), open failed\n", __func__);
791 goto out; 791 goto out;
792 } 792 }
793 793
794 /* Now attach up the new "socket" */ 794 /* Now attach up the new "socket" */
795 new->lsap = irlmp_dup(self->lsap, new); 795 new->lsap = irlmp_dup(self->lsap, new);
796 if (!new->lsap) { 796 if (!new->lsap) {
797 IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__); 797 IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
798 goto out; 798 goto out;
799 } 799 }
800 800
@@ -824,7 +824,7 @@ static int iriap_data_indication(void *instance, void *sap,
824 __u8 *frame; 824 __u8 *frame;
825 __u8 opcode; 825 __u8 opcode;
826 826
827 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 827 IRDA_DEBUG(3, "%s()\n", __func__);
828 828
829 self = (struct iriap_cb *) instance; 829 self = (struct iriap_cb *) instance;
830 830
@@ -836,7 +836,7 @@ static int iriap_data_indication(void *instance, void *sap,
836 836
837 if (self->mode == IAS_SERVER) { 837 if (self->mode == IAS_SERVER) {
838 /* Call server */ 838 /* Call server */
839 IRDA_DEBUG(4, "%s(), Calling server!\n", __FUNCTION__); 839 IRDA_DEBUG(4, "%s(), Calling server!\n", __func__);
840 iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb); 840 iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb);
841 goto out; 841 goto out;
842 } 842 }
@@ -844,13 +844,13 @@ static int iriap_data_indication(void *instance, void *sap,
844 if (~opcode & IAP_LST) { 844 if (~opcode & IAP_LST) {
845 IRDA_WARNING("%s:, IrIAS multiframe commands or " 845 IRDA_WARNING("%s:, IrIAS multiframe commands or "
846 "results is not implemented yet!\n", 846 "results is not implemented yet!\n",
847 __FUNCTION__); 847 __func__);
848 goto out; 848 goto out;
849 } 849 }
850 850
851 /* Check for ack frames since they don't contain any data */ 851 /* Check for ack frames since they don't contain any data */
852 if (opcode & IAP_ACK) { 852 if (opcode & IAP_ACK) {
853 IRDA_DEBUG(0, "%s() Got ack frame!\n", __FUNCTION__); 853 IRDA_DEBUG(0, "%s() Got ack frame!\n", __func__);
854 goto out; 854 goto out;
855 } 855 }
856 856
@@ -868,7 +868,7 @@ static int iriap_data_indication(void *instance, void *sap,
868 iriap_getvaluebyclass_confirm(self, skb); 868 iriap_getvaluebyclass_confirm(self, skb);
869 break; 869 break;
870 case IAS_CLASS_UNKNOWN: 870 case IAS_CLASS_UNKNOWN:
871 IRDA_DEBUG(1, "%s(), No such class!\n", __FUNCTION__); 871 IRDA_DEBUG(1, "%s(), No such class!\n", __func__);
872 /* Finished, close connection! */ 872 /* Finished, close connection! */
873 iriap_disconnect_request(self); 873 iriap_disconnect_request(self);
874 874
@@ -881,7 +881,7 @@ static int iriap_data_indication(void *instance, void *sap,
881 self->priv); 881 self->priv);
882 break; 882 break;
883 case IAS_ATTRIB_UNKNOWN: 883 case IAS_ATTRIB_UNKNOWN:
884 IRDA_DEBUG(1, "%s(), No such attribute!\n", __FUNCTION__); 884 IRDA_DEBUG(1, "%s(), No such attribute!\n", __func__);
885 /* Finished, close connection! */ 885 /* Finished, close connection! */
886 iriap_disconnect_request(self); 886 iriap_disconnect_request(self);
887 887
@@ -896,7 +896,7 @@ static int iriap_data_indication(void *instance, void *sap,
896 } 896 }
897 break; 897 break;
898 default: 898 default:
899 IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __FUNCTION__, 899 IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __func__,
900 opcode); 900 opcode);
901 break; 901 break;
902 } 902 }
@@ -918,7 +918,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
918 __u8 *fp; 918 __u8 *fp;
919 __u8 opcode; 919 __u8 opcode;
920 920
921 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 921 IRDA_DEBUG(4, "%s()\n", __func__);
922 922
923 IRDA_ASSERT(self != NULL, return;); 923 IRDA_ASSERT(self != NULL, return;);
924 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 924 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -929,7 +929,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
929 opcode = fp[0]; 929 opcode = fp[0];
930 if (~opcode & 0x80) { 930 if (~opcode & 0x80) {
931 IRDA_WARNING("%s: IrIAS multiframe commands or results " 931 IRDA_WARNING("%s: IrIAS multiframe commands or results "
932 "is not implemented yet!\n", __FUNCTION__); 932 "is not implemented yet!\n", __func__);
933 return; 933 return;
934 } 934 }
935 opcode &= 0x7f; /* Mask away LST bit */ 935 opcode &= 0x7f; /* Mask away LST bit */
@@ -937,7 +937,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
937 switch (opcode) { 937 switch (opcode) {
938 case GET_INFO_BASE: 938 case GET_INFO_BASE:
939 IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n", 939 IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n",
940 __FUNCTION__); 940 __func__);
941 break; 941 break;
942 case GET_VALUE_BY_CLASS: 942 case GET_VALUE_BY_CLASS:
943 iriap_getvaluebyclass_indication(self, skb); 943 iriap_getvaluebyclass_indication(self, skb);
diff --git a/net/irda/iriap_event.c b/net/irda/iriap_event.c
index 8fb9d7277ca8..a301cbd93785 100644
--- a/net/irda/iriap_event.c
+++ b/net/irda/iriap_event.c
@@ -185,7 +185,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
185 case IAP_LM_DISCONNECT_INDICATION: 185 case IAP_LM_DISCONNECT_INDICATION:
186 break; 186 break;
187 default: 187 default:
188 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); 188 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
189 break; 189 break;
190 } 190 }
191} 191}
@@ -217,7 +217,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event,
217 iriap_next_client_state(self, S_DISCONNECT); 217 iriap_next_client_state(self, S_DISCONNECT);
218 break; 218 break;
219 default: 219 default:
220 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); 220 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
221 break; 221 break;
222 } 222 }
223} 223}
@@ -269,7 +269,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
269 iriap_next_call_state(self, S_OUTSTANDING); 269 iriap_next_call_state(self, S_OUTSTANDING);
270 break; 270 break;
271 default: 271 default:
272 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); 272 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
273 break; 273 break;
274 } 274 }
275} 275}
@@ -283,7 +283,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
283static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event, 283static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event,
284 struct sk_buff *skb) 284 struct sk_buff *skb)
285{ 285{
286 IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); 286 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
287} 287}
288 288
289/* 289/*
@@ -305,7 +305,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
305 iriap_next_call_state(self, S_WAIT_FOR_CALL); 305 iriap_next_call_state(self, S_WAIT_FOR_CALL);
306 break; 306 break;
307 default: 307 default:
308 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event); 308 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
309 break; 309 break;
310 } 310 }
311} 311}
@@ -318,7 +318,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
318static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, 318static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
319 struct sk_buff *skb) 319 struct sk_buff *skb)
320{ 320{
321 IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); 321 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
322} 322}
323 323
324/* 324/*
@@ -330,7 +330,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
330static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, 330static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
331 struct sk_buff *skb) 331 struct sk_buff *skb)
332{ 332{
333 IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); 333 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
334} 334}
335 335
336 336
@@ -343,7 +343,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
343static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event, 343static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
344 struct sk_buff *skb) 344 struct sk_buff *skb)
345{ 345{
346 IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); 346 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
347} 347}
348 348
349/************************************************************************** 349/**************************************************************************
@@ -367,7 +367,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
367 case IAP_LM_CONNECT_INDICATION: 367 case IAP_LM_CONNECT_INDICATION:
368 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); 368 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
369 if (tx_skb == NULL) { 369 if (tx_skb == NULL) {
370 IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__); 370 IRDA_WARNING("%s: unable to malloc!\n", __func__);
371 return; 371 return;
372 } 372 }
373 373
@@ -386,7 +386,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
386 iriap_next_r_connect_state(self, R_RECEIVING); 386 iriap_next_r_connect_state(self, R_RECEIVING);
387 break; 387 break;
388 default: 388 default:
389 IRDA_DEBUG(0, "%s(), unknown event %d\n", __FUNCTION__, event); 389 IRDA_DEBUG(0, "%s(), unknown event %d\n", __func__, event);
390 break; 390 break;
391 } 391 }
392} 392}
@@ -397,7 +397,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
397static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, 397static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
398 struct sk_buff *skb) 398 struct sk_buff *skb)
399{ 399{
400 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 400 IRDA_DEBUG(4, "%s()\n", __func__);
401 401
402 switch (event) { 402 switch (event) {
403 case IAP_LM_DISCONNECT_INDICATION: 403 case IAP_LM_DISCONNECT_INDICATION:
@@ -406,7 +406,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
406 iriap_next_r_connect_state(self, R_WAITING); 406 iriap_next_r_connect_state(self, R_WAITING);
407 break; 407 break;
408 default: 408 default:
409 IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__); 409 IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
410 break; 410 break;
411 } 411 }
412} 412}
@@ -421,13 +421,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
421static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event, 421static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event,
422 struct sk_buff *skb) 422 struct sk_buff *skb)
423{ 423{
424 IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); 424 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
425} 425}
426 426
427static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, 427static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
428 struct sk_buff *skb) 428 struct sk_buff *skb)
429{ 429{
430 IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__); 430 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
431} 431}
432 432
433/* 433/*
@@ -439,7 +439,7 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
439static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, 439static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
440 struct sk_buff *skb) 440 struct sk_buff *skb)
441{ 441{
442 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 442 IRDA_DEBUG(4, "%s()\n", __func__);
443 443
444 switch (event) { 444 switch (event) {
445 case IAP_RECV_F_LST: 445 case IAP_RECV_F_LST:
@@ -448,7 +448,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
448 iriap_call_indication(self, skb); 448 iriap_call_indication(self, skb);
449 break; 449 break;
450 default: 450 default:
451 IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__); 451 IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
452 break; 452 break;
453 } 453 }
454} 454}
@@ -462,7 +462,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
462static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, 462static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
463 struct sk_buff *skb) 463 struct sk_buff *skb)
464{ 464{
465 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 465 IRDA_DEBUG(4, "%s()\n", __func__);
466 466
467 IRDA_ASSERT(skb != NULL, return;); 467 IRDA_ASSERT(skb != NULL, return;);
468 IRDA_ASSERT(self != NULL, return;); 468 IRDA_ASSERT(self != NULL, return;);
@@ -483,7 +483,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
483 irlmp_data_request(self->lsap, skb); 483 irlmp_data_request(self->lsap, skb);
484 break; 484 break;
485 default: 485 default:
486 IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__); 486 IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
487 break; 487 break;
488 } 488 }
489} 489}
@@ -491,7 +491,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
491static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event, 491static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event,
492 struct sk_buff *skb) 492 struct sk_buff *skb)
493{ 493{
494 IRDA_DEBUG(0, "%s(), event=%d\n", __FUNCTION__, event); 494 IRDA_DEBUG(0, "%s(), event=%d\n", __func__, event);
495 495
496 switch (event) { 496 switch (event) {
497 case IAP_RECV_F_LST: 497 case IAP_RECV_F_LST:
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c
index cbcf04380f3a..99ebb96f1386 100644
--- a/net/irda/irias_object.c
+++ b/net/irda/irias_object.c
@@ -47,12 +47,12 @@ struct ias_object *irias_new_object( char *name, int id)
47{ 47{
48 struct ias_object *obj; 48 struct ias_object *obj;
49 49
50 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 50 IRDA_DEBUG( 4, "%s()\n", __func__);
51 51
52 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); 52 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
53 if (obj == NULL) { 53 if (obj == NULL) {
54 IRDA_WARNING("%s(), Unable to allocate object!\n", 54 IRDA_WARNING("%s(), Unable to allocate object!\n",
55 __FUNCTION__); 55 __func__);
56 return NULL; 56 return NULL;
57 } 57 }
58 58
@@ -60,7 +60,7 @@ struct ias_object *irias_new_object( char *name, int id)
60 obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC); 60 obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC);
61 if (!obj->name) { 61 if (!obj->name) {
62 IRDA_WARNING("%s(), Unable to allocate name!\n", 62 IRDA_WARNING("%s(), Unable to allocate name!\n",
63 __FUNCTION__); 63 __func__);
64 kfree(obj); 64 kfree(obj);
65 return NULL; 65 return NULL;
66 } 66 }
@@ -73,7 +73,7 @@ struct ias_object *irias_new_object( char *name, int id)
73 73
74 if (obj->attribs == NULL) { 74 if (obj->attribs == NULL) {
75 IRDA_WARNING("%s(), Unable to allocate attribs!\n", 75 IRDA_WARNING("%s(), Unable to allocate attribs!\n",
76 __FUNCTION__); 76 __func__);
77 kfree(obj->name); 77 kfree(obj->name);
78 kfree(obj); 78 kfree(obj);
79 return NULL; 79 return NULL;
@@ -134,7 +134,7 @@ int irias_delete_object(struct ias_object *obj)
134 node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); 134 node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj);
135 if (!node) 135 if (!node)
136 IRDA_DEBUG( 0, "%s(), object already removed!\n", 136 IRDA_DEBUG( 0, "%s(), object already removed!\n",
137 __FUNCTION__); 137 __func__);
138 138
139 /* Destroy */ 139 /* Destroy */
140 __irias_delete_object(obj); 140 __irias_delete_object(obj);
@@ -268,7 +268,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
268 /* Find object */ 268 /* Find object */
269 obj = hashbin_lock_find(irias_objects, 0, obj_name); 269 obj = hashbin_lock_find(irias_objects, 0, obj_name);
270 if (obj == NULL) { 270 if (obj == NULL) {
271 IRDA_WARNING("%s: Unable to find object: %s\n", __FUNCTION__, 271 IRDA_WARNING("%s: Unable to find object: %s\n", __func__,
272 obj_name); 272 obj_name);
273 return -1; 273 return -1;
274 } 274 }
@@ -280,14 +280,14 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
280 attrib = hashbin_find(obj->attribs, 0, attrib_name); 280 attrib = hashbin_find(obj->attribs, 0, attrib_name);
281 if (attrib == NULL) { 281 if (attrib == NULL) {
282 IRDA_WARNING("%s: Unable to find attribute: %s\n", 282 IRDA_WARNING("%s: Unable to find attribute: %s\n",
283 __FUNCTION__, attrib_name); 283 __func__, attrib_name);
284 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); 284 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
285 return -1; 285 return -1;
286 } 286 }
287 287
288 if ( attrib->value->type != new_value->type) { 288 if ( attrib->value->type != new_value->type) {
289 IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n", 289 IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n",
290 __FUNCTION__); 290 __func__);
291 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); 291 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
292 return -1; 292 return -1;
293 } 293 }
@@ -322,7 +322,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
322 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); 322 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
323 if (attrib == NULL) { 323 if (attrib == NULL) {
324 IRDA_WARNING("%s: Unable to allocate attribute!\n", 324 IRDA_WARNING("%s: Unable to allocate attribute!\n",
325 __FUNCTION__); 325 __func__);
326 return; 326 return;
327 } 327 }
328 328
@@ -333,7 +333,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
333 attrib->value = irias_new_integer_value(value); 333 attrib->value = irias_new_integer_value(value);
334 if (!attrib->name || !attrib->value) { 334 if (!attrib->name || !attrib->value) {
335 IRDA_WARNING("%s: Unable to allocate attribute!\n", 335 IRDA_WARNING("%s: Unable to allocate attribute!\n",
336 __FUNCTION__); 336 __func__);
337 if (attrib->value) 337 if (attrib->value)
338 irias_delete_value(attrib->value); 338 irias_delete_value(attrib->value);
339 kfree(attrib->name); 339 kfree(attrib->name);
@@ -366,7 +366,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
366 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); 366 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
367 if (attrib == NULL) { 367 if (attrib == NULL) {
368 IRDA_WARNING("%s: Unable to allocate attribute!\n", 368 IRDA_WARNING("%s: Unable to allocate attribute!\n",
369 __FUNCTION__); 369 __func__);
370 return; 370 return;
371 } 371 }
372 372
@@ -376,7 +376,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
376 attrib->value = irias_new_octseq_value( octets, len); 376 attrib->value = irias_new_octseq_value( octets, len);
377 if (!attrib->name || !attrib->value) { 377 if (!attrib->name || !attrib->value) {
378 IRDA_WARNING("%s: Unable to allocate attribute!\n", 378 IRDA_WARNING("%s: Unable to allocate attribute!\n",
379 __FUNCTION__); 379 __func__);
380 if (attrib->value) 380 if (attrib->value)
381 irias_delete_value(attrib->value); 381 irias_delete_value(attrib->value);
382 kfree(attrib->name); 382 kfree(attrib->name);
@@ -408,7 +408,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
408 attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC); 408 attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC);
409 if (attrib == NULL) { 409 if (attrib == NULL) {
410 IRDA_WARNING("%s: Unable to allocate attribute!\n", 410 IRDA_WARNING("%s: Unable to allocate attribute!\n",
411 __FUNCTION__); 411 __func__);
412 return; 412 return;
413 } 413 }
414 414
@@ -418,7 +418,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
418 attrib->value = irias_new_string_value(value); 418 attrib->value = irias_new_string_value(value);
419 if (!attrib->name || !attrib->value) { 419 if (!attrib->name || !attrib->value) {
420 IRDA_WARNING("%s: Unable to allocate attribute!\n", 420 IRDA_WARNING("%s: Unable to allocate attribute!\n",
421 __FUNCTION__); 421 __func__);
422 if (attrib->value) 422 if (attrib->value)
423 irias_delete_value(attrib->value); 423 irias_delete_value(attrib->value);
424 kfree(attrib->name); 424 kfree(attrib->name);
@@ -442,7 +442,7 @@ struct ias_value *irias_new_integer_value(int integer)
442 442
443 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 443 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
444 if (value == NULL) { 444 if (value == NULL) {
445 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 445 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
446 return NULL; 446 return NULL;
447 } 447 }
448 448
@@ -467,7 +467,7 @@ struct ias_value *irias_new_string_value(char *string)
467 467
468 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 468 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
469 if (value == NULL) { 469 if (value == NULL) {
470 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 470 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
471 return NULL; 471 return NULL;
472 } 472 }
473 473
@@ -475,7 +475,7 @@ struct ias_value *irias_new_string_value(char *string)
475 value->charset = CS_ASCII; 475 value->charset = CS_ASCII;
476 value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC); 476 value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC);
477 if (!value->t.string) { 477 if (!value->t.string) {
478 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 478 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
479 kfree(value); 479 kfree(value);
480 return NULL; 480 return NULL;
481 } 481 }
@@ -498,7 +498,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
498 498
499 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 499 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
500 if (value == NULL) { 500 if (value == NULL) {
501 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 501 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
502 return NULL; 502 return NULL;
503 } 503 }
504 504
@@ -510,7 +510,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
510 510
511 value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC); 511 value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC);
512 if (value->t.oct_seq == NULL){ 512 if (value->t.oct_seq == NULL){
513 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 513 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
514 kfree(value); 514 kfree(value);
515 return NULL; 515 return NULL;
516 } 516 }
@@ -523,7 +523,7 @@ struct ias_value *irias_new_missing_value(void)
523 523
524 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 524 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
525 if (value == NULL) { 525 if (value == NULL) {
526 IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); 526 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
527 return NULL; 527 return NULL;
528 } 528 }
529 529
@@ -540,7 +540,7 @@ struct ias_value *irias_new_missing_value(void)
540 */ 540 */
541void irias_delete_value(struct ias_value *value) 541void irias_delete_value(struct ias_value *value)
542{ 542{
543 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 543 IRDA_DEBUG(4, "%s()\n", __func__);
544 544
545 IRDA_ASSERT(value != NULL, return;); 545 IRDA_ASSERT(value != NULL, return;);
546 546
@@ -558,7 +558,7 @@ void irias_delete_value(struct ias_value *value)
558 kfree(value->t.oct_seq); 558 kfree(value->t.oct_seq);
559 break; 559 break;
560 default: 560 default:
561 IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__); 561 IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__);
562 break; 562 break;
563 } 563 }
564 kfree(value); 564 kfree(value);
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
index fff52d57a200..6be1ec26b30c 100644
--- a/net/irda/irlan/irlan_client.c
+++ b/net/irda/irlan/irlan_client.c
@@ -72,7 +72,7 @@ static void irlan_client_kick_timer_expired(void *data)
72{ 72{
73 struct irlan_cb *self = (struct irlan_cb *) data; 73 struct irlan_cb *self = (struct irlan_cb *) data;
74 74
75 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 75 IRDA_DEBUG(2, "%s()\n", __func__ );
76 76
77 IRDA_ASSERT(self != NULL, return;); 77 IRDA_ASSERT(self != NULL, return;);
78 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 78 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -91,7 +91,7 @@ static void irlan_client_kick_timer_expired(void *data)
91 91
92static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) 92static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
93{ 93{
94 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 94 IRDA_DEBUG(4, "%s()\n", __func__ );
95 95
96 irda_start_timer(&self->client.kick_timer, timeout, (void *) self, 96 irda_start_timer(&self->client.kick_timer, timeout, (void *) self,
97 irlan_client_kick_timer_expired); 97 irlan_client_kick_timer_expired);
@@ -105,7 +105,7 @@ static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
105 */ 105 */
106void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) 106void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
107{ 107{
108 IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); 108 IRDA_DEBUG(1, "%s()\n", __func__ );
109 109
110 IRDA_ASSERT(self != NULL, return;); 110 IRDA_ASSERT(self != NULL, return;);
111 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 111 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -117,7 +117,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
117 if ((self->client.state != IRLAN_IDLE) || 117 if ((self->client.state != IRLAN_IDLE) ||
118 (self->provider.access_type == ACCESS_DIRECT)) 118 (self->provider.access_type == ACCESS_DIRECT))
119 { 119 {
120 IRDA_DEBUG(0, "%s(), already awake!\n", __FUNCTION__ ); 120 IRDA_DEBUG(0, "%s(), already awake!\n", __func__ );
121 return; 121 return;
122 } 122 }
123 123
@@ -126,7 +126,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
126 self->daddr = daddr; 126 self->daddr = daddr;
127 127
128 if (self->disconnect_reason == LM_USER_REQUEST) { 128 if (self->disconnect_reason == LM_USER_REQUEST) {
129 IRDA_DEBUG(0, "%s(), still stopped by user\n", __FUNCTION__ ); 129 IRDA_DEBUG(0, "%s(), still stopped by user\n", __func__ );
130 return; 130 return;
131 } 131 }
132 132
@@ -153,7 +153,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
153 struct irlan_cb *self; 153 struct irlan_cb *self;
154 __u32 saddr, daddr; 154 __u32 saddr, daddr;
155 155
156 IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); 156 IRDA_DEBUG(1, "%s()\n", __func__ );
157 157
158 IRDA_ASSERT(discovery != NULL, return;); 158 IRDA_ASSERT(discovery != NULL, return;);
159 159
@@ -175,7 +175,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
175 if (self) { 175 if (self) {
176 IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;); 176 IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;);
177 177
178 IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ , 178 IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __func__ ,
179 daddr); 179 daddr);
180 180
181 irlan_client_wakeup(self, saddr, daddr); 181 irlan_client_wakeup(self, saddr, daddr);
@@ -195,7 +195,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
195{ 195{
196 struct irlan_cb *self; 196 struct irlan_cb *self;
197 197
198 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 198 IRDA_DEBUG(2, "%s()\n", __func__ );
199 199
200 self = (struct irlan_cb *) instance; 200 self = (struct irlan_cb *) instance;
201 201
@@ -206,7 +206,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
206 irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); 206 irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb);
207 207
208 /* Ready for a new command */ 208 /* Ready for a new command */
209 IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __FUNCTION__ ); 209 IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __func__ );
210 self->client.tx_busy = FALSE; 210 self->client.tx_busy = FALSE;
211 211
212 /* Check if we have some queued commands waiting to be sent */ 212 /* Check if we have some queued commands waiting to be sent */
@@ -223,7 +223,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
223 struct tsap_cb *tsap; 223 struct tsap_cb *tsap;
224 struct sk_buff *skb; 224 struct sk_buff *skb;
225 225
226 IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason); 226 IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason);
227 227
228 self = (struct irlan_cb *) instance; 228 self = (struct irlan_cb *) instance;
229 tsap = (struct tsap_cb *) sap; 229 tsap = (struct tsap_cb *) sap;
@@ -255,7 +255,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
255 struct tsap_cb *tsap; 255 struct tsap_cb *tsap;
256 notify_t notify; 256 notify_t notify;
257 257
258 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 258 IRDA_DEBUG(4, "%s()\n", __func__ );
259 259
260 IRDA_ASSERT(self != NULL, return;); 260 IRDA_ASSERT(self != NULL, return;);
261 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 261 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -275,7 +275,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
275 275
276 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); 276 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
277 if (!tsap) { 277 if (!tsap) {
278 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); 278 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
279 return; 279 return;
280 } 280 }
281 self->client.tsap_ctrl = tsap; 281 self->client.tsap_ctrl = tsap;
@@ -295,7 +295,7 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap,
295{ 295{
296 struct irlan_cb *self; 296 struct irlan_cb *self;
297 297
298 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 298 IRDA_DEBUG(4, "%s()\n", __func__ );
299 299
300 self = (struct irlan_cb *) instance; 300 self = (struct irlan_cb *) instance;
301 301
@@ -374,13 +374,13 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
374 374
375 IRDA_ASSERT(skb != NULL, return;); 375 IRDA_ASSERT(skb != NULL, return;);
376 376
377 IRDA_DEBUG(4, "%s() skb->len=%d\n", __FUNCTION__ , (int) skb->len); 377 IRDA_DEBUG(4, "%s() skb->len=%d\n", __func__ , (int) skb->len);
378 378
379 IRDA_ASSERT(self != NULL, return;); 379 IRDA_ASSERT(self != NULL, return;);
380 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 380 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
381 381
382 if (!skb) { 382 if (!skb) {
383 IRDA_ERROR("%s(), Got NULL skb!\n", __FUNCTION__); 383 IRDA_ERROR("%s(), Got NULL skb!\n", __func__);
384 return; 384 return;
385 } 385 }
386 frame = skb->data; 386 frame = skb->data;
@@ -405,7 +405,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
405 /* How many parameters? */ 405 /* How many parameters? */
406 count = frame[1]; 406 count = frame[1];
407 407
408 IRDA_DEBUG(4, "%s(), got %d parameters\n", __FUNCTION__ , count); 408 IRDA_DEBUG(4, "%s(), got %d parameters\n", __func__ , count);
409 409
410 ptr = frame+2; 410 ptr = frame+2;
411 411
@@ -413,7 +413,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
413 for (i=0; i<count;i++) { 413 for (i=0; i<count;i++) {
414 ret = irlan_extract_param(ptr, name, value, &val_len); 414 ret = irlan_extract_param(ptr, name, value, &val_len);
415 if (ret < 0) { 415 if (ret < 0) {
416 IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ ); 416 IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
417 break; 417 break;
418 } 418 }
419 ptr += ret; 419 ptr += ret;
@@ -438,7 +438,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
438 int i; 438 int i;
439 DECLARE_MAC_BUF(mac); 439 DECLARE_MAC_BUF(mac);
440 440
441 IRDA_DEBUG(4, "%s(), parm=%s\n", __FUNCTION__ , param); 441 IRDA_DEBUG(4, "%s(), parm=%s\n", __func__ , param);
442 442
443 IRDA_ASSERT(self != NULL, return;); 443 IRDA_ASSERT(self != NULL, return;);
444 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 444 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -476,7 +476,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
476 else if (strcmp(value, "HOSTED") == 0) 476 else if (strcmp(value, "HOSTED") == 0)
477 self->client.access_type = ACCESS_HOSTED; 477 self->client.access_type = ACCESS_HOSTED;
478 else { 478 else {
479 IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ ); 479 IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
480 } 480 }
481 } 481 }
482 /* IRLAN version */ 482 /* IRLAN version */
@@ -498,14 +498,14 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
498 memcpy(&tmp_cpu, value, 2); /* Align value */ 498 memcpy(&tmp_cpu, value, 2); /* Align value */
499 le16_to_cpus(&tmp_cpu); /* Convert to host order */ 499 le16_to_cpus(&tmp_cpu); /* Convert to host order */
500 self->client.recv_arb_val = tmp_cpu; 500 self->client.recv_arb_val = tmp_cpu;
501 IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __FUNCTION__ , 501 IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __func__ ,
502 self->client.recv_arb_val); 502 self->client.recv_arb_val);
503 } 503 }
504 if (strcmp(param, "MAX_FRAME") == 0) { 504 if (strcmp(param, "MAX_FRAME") == 0) {
505 memcpy(&tmp_cpu, value, 2); /* Align value */ 505 memcpy(&tmp_cpu, value, 2); /* Align value */
506 le16_to_cpus(&tmp_cpu); /* Convert to host order */ 506 le16_to_cpus(&tmp_cpu); /* Convert to host order */
507 self->client.max_frame = tmp_cpu; 507 self->client.max_frame = tmp_cpu;
508 IRDA_DEBUG(4, "%s(), max frame=%d\n", __FUNCTION__ , 508 IRDA_DEBUG(4, "%s(), max frame=%d\n", __func__ ,
509 self->client.max_frame); 509 self->client.max_frame);
510 } 510 }
511 511
@@ -539,7 +539,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
539{ 539{
540 struct irlan_cb *self; 540 struct irlan_cb *self;
541 541
542 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 542 IRDA_DEBUG(4, "%s()\n", __func__ );
543 543
544 IRDA_ASSERT(priv != NULL, return;); 544 IRDA_ASSERT(priv != NULL, return;);
545 545
@@ -552,7 +552,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
552 552
553 /* Check if request succeeded */ 553 /* Check if request succeeded */
554 if (result != IAS_SUCCESS) { 554 if (result != IAS_SUCCESS) {
555 IRDA_DEBUG(2, "%s(), got NULL value!\n", __FUNCTION__ ); 555 IRDA_DEBUG(2, "%s(), got NULL value!\n", __func__ );
556 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, 556 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL,
557 NULL); 557 NULL);
558 return; 558 return;
@@ -570,7 +570,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
570 irias_delete_value(value); 570 irias_delete_value(value);
571 break; 571 break;
572 default: 572 default:
573 IRDA_DEBUG(2, "%s(), unknown type!\n", __FUNCTION__ ); 573 IRDA_DEBUG(2, "%s(), unknown type!\n", __func__ );
574 break; 574 break;
575 } 575 }
576 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL); 576 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL);
diff --git a/net/irda/irlan/irlan_client_event.c b/net/irda/irlan/irlan_client_event.c
index 6afcee59e906..8d5a8ebc444f 100644
--- a/net/irda/irlan/irlan_client_event.c
+++ b/net/irda/irlan/irlan_client_event.c
@@ -92,7 +92,7 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event,
92static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, 92static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
93 struct sk_buff *skb) 93 struct sk_buff *skb)
94{ 94{
95 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 95 IRDA_DEBUG(4, "%s()\n", __func__ );
96 96
97 IRDA_ASSERT(self != NULL, return -1;); 97 IRDA_ASSERT(self != NULL, return -1;);
98 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 98 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
@@ -101,7 +101,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
101 case IRLAN_DISCOVERY_INDICATION: 101 case IRLAN_DISCOVERY_INDICATION:
102 if (self->client.iriap) { 102 if (self->client.iriap) {
103 IRDA_WARNING("%s(), busy with a previous query\n", 103 IRDA_WARNING("%s(), busy with a previous query\n",
104 __FUNCTION__); 104 __func__);
105 return -EBUSY; 105 return -EBUSY;
106 } 106 }
107 107
@@ -114,10 +114,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
114 "IrLAN", "IrDA:TinyTP:LsapSel"); 114 "IrLAN", "IrDA:TinyTP:LsapSel");
115 break; 115 break;
116 case IRLAN_WATCHDOG_TIMEOUT: 116 case IRLAN_WATCHDOG_TIMEOUT:
117 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 117 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
118 break; 118 break;
119 default: 119 default:
120 IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event); 120 IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
121 break; 121 break;
122 } 122 }
123 if (skb) 123 if (skb)
@@ -136,7 +136,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
136static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, 136static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
137 struct sk_buff *skb) 137 struct sk_buff *skb)
138{ 138{
139 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 139 IRDA_DEBUG(4, "%s()\n", __func__ );
140 140
141 IRDA_ASSERT(self != NULL, return -1;); 141 IRDA_ASSERT(self != NULL, return -1;);
142 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 142 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
@@ -154,7 +154,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
154 irlan_next_client_state(self, IRLAN_CONN); 154 irlan_next_client_state(self, IRLAN_CONN);
155 break; 155 break;
156 case IRLAN_IAS_PROVIDER_NOT_AVAIL: 156 case IRLAN_IAS_PROVIDER_NOT_AVAIL:
157 IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __FUNCTION__ ); 157 IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __func__ );
158 irlan_next_client_state(self, IRLAN_IDLE); 158 irlan_next_client_state(self, IRLAN_IDLE);
159 159
160 /* Give the client a kick! */ 160 /* Give the client a kick! */
@@ -167,10 +167,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
167 irlan_next_client_state(self, IRLAN_IDLE); 167 irlan_next_client_state(self, IRLAN_IDLE);
168 break; 168 break;
169 case IRLAN_WATCHDOG_TIMEOUT: 169 case IRLAN_WATCHDOG_TIMEOUT:
170 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 170 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
171 break; 171 break;
172 default: 172 default:
173 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 173 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
174 break; 174 break;
175 } 175 }
176 if (skb) 176 if (skb)
@@ -189,7 +189,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
189static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, 189static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
190 struct sk_buff *skb) 190 struct sk_buff *skb)
191{ 191{
192 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 192 IRDA_DEBUG(4, "%s()\n", __func__ );
193 193
194 IRDA_ASSERT(self != NULL, return -1;); 194 IRDA_ASSERT(self != NULL, return -1;);
195 195
@@ -204,10 +204,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
204 irlan_next_client_state(self, IRLAN_IDLE); 204 irlan_next_client_state(self, IRLAN_IDLE);
205 break; 205 break;
206 case IRLAN_WATCHDOG_TIMEOUT: 206 case IRLAN_WATCHDOG_TIMEOUT:
207 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 207 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
208 break; 208 break;
209 default: 209 default:
210 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 210 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
211 break; 211 break;
212 } 212 }
213 if (skb) 213 if (skb)
@@ -224,7 +224,7 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
224static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, 224static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
225 struct sk_buff *skb) 225 struct sk_buff *skb)
226{ 226{
227 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 227 IRDA_DEBUG(4, "%s()\n", __func__ );
228 228
229 IRDA_ASSERT(self != NULL, return -1;); 229 IRDA_ASSERT(self != NULL, return -1;);
230 230
@@ -244,10 +244,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
244 irlan_next_client_state(self, IRLAN_IDLE); 244 irlan_next_client_state(self, IRLAN_IDLE);
245 break; 245 break;
246 case IRLAN_WATCHDOG_TIMEOUT: 246 case IRLAN_WATCHDOG_TIMEOUT:
247 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 247 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
248 break; 248 break;
249 default: 249 default:
250 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 250 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
251 break; 251 break;
252 } 252 }
253 if (skb) 253 if (skb)
@@ -266,7 +266,7 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
266static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, 266static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
267 struct sk_buff *skb) 267 struct sk_buff *skb)
268{ 268{
269 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 269 IRDA_DEBUG(4, "%s()\n", __func__ );
270 270
271 IRDA_ASSERT(self != NULL, return -1;); 271 IRDA_ASSERT(self != NULL, return -1;);
272 272
@@ -281,10 +281,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
281 irlan_next_client_state(self, IRLAN_IDLE); 281 irlan_next_client_state(self, IRLAN_IDLE);
282 break; 282 break;
283 case IRLAN_WATCHDOG_TIMEOUT: 283 case IRLAN_WATCHDOG_TIMEOUT:
284 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 284 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
285 break; 285 break;
286 default: 286 default:
287 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 287 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
288 break; 288 break;
289 } 289 }
290 if (skb) 290 if (skb)
@@ -305,7 +305,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
305{ 305{
306 struct qos_info qos; 306 struct qos_info qos;
307 307
308 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 308 IRDA_DEBUG(4, "%s()\n", __func__ );
309 309
310 IRDA_ASSERT(self != NULL, return -1;); 310 IRDA_ASSERT(self != NULL, return -1;);
311 311
@@ -344,7 +344,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
344 irlan_next_client_state(self, IRLAN_DATA); 344 irlan_next_client_state(self, IRLAN_DATA);
345 break; 345 break;
346 default: 346 default:
347 IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ ); 347 IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
348 break; 348 break;
349 } 349 }
350 break; 350 break;
@@ -353,10 +353,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
353 irlan_next_client_state(self, IRLAN_IDLE); 353 irlan_next_client_state(self, IRLAN_IDLE);
354 break; 354 break;
355 case IRLAN_WATCHDOG_TIMEOUT: 355 case IRLAN_WATCHDOG_TIMEOUT:
356 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 356 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
357 break; 357 break;
358 default: 358 default:
359 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 359 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
360 break; 360 break;
361 } 361 }
362 362
@@ -376,7 +376,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
376static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, 376static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
377 struct sk_buff *skb) 377 struct sk_buff *skb)
378{ 378{
379 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 379 IRDA_DEBUG(4, "%s()\n", __func__ );
380 380
381 IRDA_ASSERT(self != NULL, return -1;); 381 IRDA_ASSERT(self != NULL, return -1;);
382 382
@@ -390,10 +390,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
390 irlan_next_client_state(self, IRLAN_IDLE); 390 irlan_next_client_state(self, IRLAN_IDLE);
391 break; 391 break;
392 case IRLAN_WATCHDOG_TIMEOUT: 392 case IRLAN_WATCHDOG_TIMEOUT:
393 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 393 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
394 break; 394 break;
395 default: 395 default:
396 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 396 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
397 break; 397 break;
398 } 398 }
399 if (skb) 399 if (skb)
@@ -407,7 +407,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
407{ 407{
408 struct qos_info qos; 408 struct qos_info qos;
409 409
410 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 410 IRDA_DEBUG(2, "%s()\n", __func__ );
411 411
412 IRDA_ASSERT(self != NULL, return -1;); 412 IRDA_ASSERT(self != NULL, return -1;);
413 413
@@ -429,7 +429,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
429 } else if (self->client.recv_arb_val > 429 } else if (self->client.recv_arb_val >
430 self->provider.send_arb_val) 430 self->provider.send_arb_val)
431 { 431 {
432 IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __FUNCTION__ ); 432 IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __func__ );
433 } 433 }
434 break; 434 break;
435 case IRLAN_DATA_CONNECT_INDICATION: 435 case IRLAN_DATA_CONNECT_INDICATION:
@@ -440,10 +440,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
440 irlan_next_client_state(self, IRLAN_IDLE); 440 irlan_next_client_state(self, IRLAN_IDLE);
441 break; 441 break;
442 case IRLAN_WATCHDOG_TIMEOUT: 442 case IRLAN_WATCHDOG_TIMEOUT:
443 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ ); 443 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
444 break; 444 break;
445 default: 445 default:
446 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 446 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
447 break; 447 break;
448 } 448 }
449 if (skb) 449 if (skb)
@@ -462,7 +462,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
462static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, 462static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
463 struct sk_buff *skb) 463 struct sk_buff *skb)
464{ 464{
465 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 465 IRDA_DEBUG(4, "%s()\n", __func__ );
466 466
467 IRDA_ASSERT(self != NULL, return -1;); 467 IRDA_ASSERT(self != NULL, return -1;);
468 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 468 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
@@ -476,7 +476,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
476 irlan_next_client_state(self, IRLAN_IDLE); 476 irlan_next_client_state(self, IRLAN_IDLE);
477 break; 477 break;
478 default: 478 default:
479 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 479 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
480 break; 480 break;
481 } 481 }
482 if (skb) 482 if (skb)
@@ -494,7 +494,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
494static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, 494static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
495 struct sk_buff *skb) 495 struct sk_buff *skb)
496{ 496{
497 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 497 IRDA_DEBUG(2, "%s()\n", __func__ );
498 498
499 if (skb) 499 if (skb)
500 dev_kfree_skb(skb); 500 dev_kfree_skb(skb);
@@ -511,7 +511,7 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
511static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event, 511static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event,
512 struct sk_buff *skb) 512 struct sk_buff *skb)
513{ 513{
514 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 514 IRDA_DEBUG(2, "%s()\n", __func__ );
515 515
516 if (skb) 516 if (skb)
517 dev_kfree_skb(skb); 517 dev_kfree_skb(skb);
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 1eb4bbcb1c9e..75bb6a9dcaaa 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -124,7 +124,7 @@ static int __init irlan_init(void)
124 struct irlan_cb *new; 124 struct irlan_cb *new;
125 __u16 hints; 125 __u16 hints;
126 126
127 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 127 IRDA_DEBUG(2, "%s()\n", __func__ );
128 128
129#ifdef CONFIG_PROC_FS 129#ifdef CONFIG_PROC_FS
130 { struct proc_dir_entry *proc; 130 { struct proc_dir_entry *proc;
@@ -136,7 +136,7 @@ static int __init irlan_init(void)
136 } 136 }
137#endif /* CONFIG_PROC_FS */ 137#endif /* CONFIG_PROC_FS */
138 138
139 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 139 IRDA_DEBUG(4, "%s()\n", __func__ );
140 hints = irlmp_service_to_hint(S_LAN); 140 hints = irlmp_service_to_hint(S_LAN);
141 141
142 /* Register with IrLMP as a client */ 142 /* Register with IrLMP as a client */
@@ -179,7 +179,7 @@ static void __exit irlan_cleanup(void)
179{ 179{
180 struct irlan_cb *self, *next; 180 struct irlan_cb *self, *next;
181 181
182 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 182 IRDA_DEBUG(4, "%s()\n", __func__ );
183 183
184 irlmp_unregister_client(ckey); 184 irlmp_unregister_client(ckey);
185 irlmp_unregister_service(skey); 185 irlmp_unregister_service(skey);
@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
207 struct net_device *dev; 207 struct net_device *dev;
208 struct irlan_cb *self; 208 struct irlan_cb *self;
209 209
210 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 210 IRDA_DEBUG(2, "%s()\n", __func__ );
211 211
212 /* Create network device with irlan */ 212 /* Create network device with irlan */
213 dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); 213 dev = alloc_irlandev(eth ? "eth%d" : "irlan%d");
@@ -252,7 +252,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
252 252
253 if (register_netdev(dev)) { 253 if (register_netdev(dev)) {
254 IRDA_DEBUG(2, "%s(), register_netdev() failed!\n", 254 IRDA_DEBUG(2, "%s(), register_netdev() failed!\n",
255 __FUNCTION__ ); 255 __func__ );
256 self = NULL; 256 self = NULL;
257 free_netdev(dev); 257 free_netdev(dev);
258 } else { 258 } else {
@@ -272,7 +272,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
272 */ 272 */
273static void __irlan_close(struct irlan_cb *self) 273static void __irlan_close(struct irlan_cb *self)
274{ 274{
275 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 275 IRDA_DEBUG(2, "%s()\n", __func__ );
276 276
277 ASSERT_RTNL(); 277 ASSERT_RTNL();
278 IRDA_ASSERT(self != NULL, return;); 278 IRDA_ASSERT(self != NULL, return;);
@@ -320,7 +320,7 @@ static void irlan_connect_indication(void *instance, void *sap,
320 struct irlan_cb *self; 320 struct irlan_cb *self;
321 struct tsap_cb *tsap; 321 struct tsap_cb *tsap;
322 322
323 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 323 IRDA_DEBUG(2, "%s()\n", __func__ );
324 324
325 self = (struct irlan_cb *) instance; 325 self = (struct irlan_cb *) instance;
326 tsap = (struct tsap_cb *) sap; 326 tsap = (struct tsap_cb *) sap;
@@ -332,7 +332,7 @@ static void irlan_connect_indication(void *instance, void *sap,
332 self->max_sdu_size = max_sdu_size; 332 self->max_sdu_size = max_sdu_size;
333 self->max_header_size = max_header_size; 333 self->max_header_size = max_header_size;
334 334
335 IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__); 335 IRDA_DEBUG(0, "%s: We are now connected!\n", __func__);
336 336
337 del_timer(&self->watchdog_timer); 337 del_timer(&self->watchdog_timer);
338 338
@@ -376,7 +376,7 @@ static void irlan_connect_confirm(void *instance, void *sap,
376 376
377 /* TODO: we could set the MTU depending on the max_sdu_size */ 377 /* TODO: we could set the MTU depending on the max_sdu_size */
378 378
379 IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__); 379 IRDA_DEBUG(0, "%s: We are now connected!\n", __func__);
380 del_timer(&self->watchdog_timer); 380 del_timer(&self->watchdog_timer);
381 381
382 /* 382 /*
@@ -412,7 +412,7 @@ static void irlan_disconnect_indication(void *instance,
412 struct irlan_cb *self; 412 struct irlan_cb *self;
413 struct tsap_cb *tsap; 413 struct tsap_cb *tsap;
414 414
415 IRDA_DEBUG(0, "%s(), reason=%d\n", __FUNCTION__ , reason); 415 IRDA_DEBUG(0, "%s(), reason=%d\n", __func__ , reason);
416 416
417 self = (struct irlan_cb *) instance; 417 self = (struct irlan_cb *) instance;
418 tsap = (struct tsap_cb *) sap; 418 tsap = (struct tsap_cb *) sap;
@@ -431,22 +431,22 @@ static void irlan_disconnect_indication(void *instance,
431 431
432 switch (reason) { 432 switch (reason) {
433 case LM_USER_REQUEST: /* User request */ 433 case LM_USER_REQUEST: /* User request */
434 IRDA_DEBUG(2, "%s(), User requested\n", __FUNCTION__ ); 434 IRDA_DEBUG(2, "%s(), User requested\n", __func__ );
435 break; 435 break;
436 case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ 436 case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */
437 IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __FUNCTION__ ); 437 IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __func__ );
438 break; 438 break;
439 case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ 439 case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */
440 IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __FUNCTION__ ); 440 IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __func__ );
441 break; 441 break;
442 case LM_LAP_RESET: /* IrLAP reset */ 442 case LM_LAP_RESET: /* IrLAP reset */
443 IRDA_DEBUG(2, "%s(), IrLAP reset\n", __FUNCTION__ ); 443 IRDA_DEBUG(2, "%s(), IrLAP reset\n", __func__ );
444 break; 444 break;
445 case LM_INIT_DISCONNECT: 445 case LM_INIT_DISCONNECT:
446 IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __FUNCTION__ ); 446 IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ );
447 break; 447 break;
448 default: 448 default:
449 IRDA_ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__); 449 IRDA_ERROR("%s(), Unknown disconnect reason\n", __func__);
450 break; 450 break;
451 } 451 }
452 452
@@ -468,7 +468,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
468 struct tsap_cb *tsap; 468 struct tsap_cb *tsap;
469 notify_t notify; 469 notify_t notify;
470 470
471 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 471 IRDA_DEBUG(2, "%s()\n", __func__ );
472 472
473 IRDA_ASSERT(self != NULL, return;); 473 IRDA_ASSERT(self != NULL, return;);
474 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 474 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -490,7 +490,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
490 490
491 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); 491 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
492 if (!tsap) { 492 if (!tsap) {
493 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); 493 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
494 return; 494 return;
495 } 495 }
496 self->tsap_data = tsap; 496 self->tsap_data = tsap;
@@ -504,7 +504,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
504 504
505void irlan_close_tsaps(struct irlan_cb *self) 505void irlan_close_tsaps(struct irlan_cb *self)
506{ 506{
507 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 507 IRDA_DEBUG(4, "%s()\n", __func__ );
508 508
509 IRDA_ASSERT(self != NULL, return;); 509 IRDA_ASSERT(self != NULL, return;);
510 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 510 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -594,7 +594,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
594{ 594{
595 struct sk_buff *skb; 595 struct sk_buff *skb;
596 596
597 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 597 IRDA_DEBUG(2, "%s()\n", __func__ );
598 598
599 if (irda_lock(&self->client.tx_busy) == FALSE) 599 if (irda_lock(&self->client.tx_busy) == FALSE)
600 return -EBUSY; 600 return -EBUSY;
@@ -613,7 +613,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
613 dev_kfree_skb(skb); 613 dev_kfree_skb(skb);
614 return -1; 614 return -1;
615 } 615 }
616 IRDA_DEBUG(2, "%s(), sending ...\n", __FUNCTION__ ); 616 IRDA_DEBUG(2, "%s(), sending ...\n", __func__ );
617 617
618 return irttp_data_request(self->client.tsap_ctrl, skb); 618 return irttp_data_request(self->client.tsap_ctrl, skb);
619} 619}
@@ -626,7 +626,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
626 */ 626 */
627static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) 627static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb)
628{ 628{
629 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 629 IRDA_DEBUG(2, "%s()\n", __func__ );
630 630
631 /* Queue command */ 631 /* Queue command */
632 skb_queue_tail(&self->client.txq, skb); 632 skb_queue_tail(&self->client.txq, skb);
@@ -646,7 +646,7 @@ void irlan_get_provider_info(struct irlan_cb *self)
646 struct sk_buff *skb; 646 struct sk_buff *skb;
647 __u8 *frame; 647 __u8 *frame;
648 648
649 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 649 IRDA_DEBUG(4, "%s()\n", __func__ );
650 650
651 IRDA_ASSERT(self != NULL, return;); 651 IRDA_ASSERT(self != NULL, return;);
652 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 652 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -679,7 +679,7 @@ void irlan_open_data_channel(struct irlan_cb *self)
679 struct sk_buff *skb; 679 struct sk_buff *skb;
680 __u8 *frame; 680 __u8 *frame;
681 681
682 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 682 IRDA_DEBUG(4, "%s()\n", __func__ );
683 683
684 IRDA_ASSERT(self != NULL, return;); 684 IRDA_ASSERT(self != NULL, return;);
685 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 685 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -714,7 +714,7 @@ void irlan_close_data_channel(struct irlan_cb *self)
714 struct sk_buff *skb; 714 struct sk_buff *skb;
715 __u8 *frame; 715 __u8 *frame;
716 716
717 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 717 IRDA_DEBUG(4, "%s()\n", __func__ );
718 718
719 IRDA_ASSERT(self != NULL, return;); 719 IRDA_ASSERT(self != NULL, return;);
720 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 720 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -755,7 +755,7 @@ static void irlan_open_unicast_addr(struct irlan_cb *self)
755 struct sk_buff *skb; 755 struct sk_buff *skb;
756 __u8 *frame; 756 __u8 *frame;
757 757
758 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 758 IRDA_DEBUG(4, "%s()\n", __func__ );
759 759
760 IRDA_ASSERT(self != NULL, return;); 760 IRDA_ASSERT(self != NULL, return;);
761 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 761 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -797,7 +797,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status)
797 struct sk_buff *skb; 797 struct sk_buff *skb;
798 __u8 *frame; 798 __u8 *frame;
799 799
800 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 800 IRDA_DEBUG(2, "%s()\n", __func__ );
801 801
802 IRDA_ASSERT(self != NULL, return;); 802 IRDA_ASSERT(self != NULL, return;);
803 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 803 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -841,7 +841,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status)
841 struct sk_buff *skb; 841 struct sk_buff *skb;
842 __u8 *frame; 842 __u8 *frame;
843 843
844 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 844 IRDA_DEBUG(2, "%s()\n", __func__ );
845 845
846 IRDA_ASSERT(self != NULL, return;); 846 IRDA_ASSERT(self != NULL, return;);
847 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 847 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -886,7 +886,7 @@ static void irlan_get_unicast_addr(struct irlan_cb *self)
886 struct sk_buff *skb; 886 struct sk_buff *skb;
887 __u8 *frame; 887 __u8 *frame;
888 888
889 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 889 IRDA_DEBUG(2, "%s()\n", __func__ );
890 890
891 IRDA_ASSERT(self != NULL, return;); 891 IRDA_ASSERT(self != NULL, return;);
892 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 892 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -926,7 +926,7 @@ void irlan_get_media_char(struct irlan_cb *self)
926 struct sk_buff *skb; 926 struct sk_buff *skb;
927 __u8 *frame; 927 __u8 *frame;
928 928
929 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 929 IRDA_DEBUG(4, "%s()\n", __func__ );
930 930
931 IRDA_ASSERT(self != NULL, return;); 931 IRDA_ASSERT(self != NULL, return;);
932 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 932 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -1014,7 +1014,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
1014 int n=0; 1014 int n=0;
1015 1015
1016 if (skb == NULL) { 1016 if (skb == NULL) {
1017 IRDA_DEBUG(2, "%s(), Got NULL skb\n", __FUNCTION__ ); 1017 IRDA_DEBUG(2, "%s(), Got NULL skb\n", __func__ );
1018 return 0; 1018 return 0;
1019 } 1019 }
1020 1020
@@ -1031,7 +1031,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
1031 IRDA_ASSERT(value_len > 0, return 0;); 1031 IRDA_ASSERT(value_len > 0, return 0;);
1032 break; 1032 break;
1033 default: 1033 default:
1034 IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __FUNCTION__ ); 1034 IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ );
1035 return 0; 1035 return 0;
1036 break; 1036 break;
1037 } 1037 }
@@ -1041,7 +1041,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
1041 1041
1042 /* Make space for data */ 1042 /* Make space for data */
1043 if (skb_tailroom(skb) < (param_len+value_len+3)) { 1043 if (skb_tailroom(skb) < (param_len+value_len+3)) {
1044 IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __FUNCTION__ ); 1044 IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __func__ );
1045 return 0; 1045 return 0;
1046 } 1046 }
1047 skb_put(skb, param_len+value_len+3); 1047 skb_put(skb, param_len+value_len+3);
@@ -1088,13 +1088,13 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
1088 __u16 val_len; 1088 __u16 val_len;
1089 int n=0; 1089 int n=0;
1090 1090
1091 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 1091 IRDA_DEBUG(4, "%s()\n", __func__ );
1092 1092
1093 /* get length of parameter name (1 byte) */ 1093 /* get length of parameter name (1 byte) */
1094 name_len = buf[n++]; 1094 name_len = buf[n++];
1095 1095
1096 if (name_len > 254) { 1096 if (name_len > 254) {
1097 IRDA_DEBUG(2, "%s(), name_len > 254\n", __FUNCTION__ ); 1097 IRDA_DEBUG(2, "%s(), name_len > 254\n", __func__ );
1098 return -RSP_INVALID_COMMAND_FORMAT; 1098 return -RSP_INVALID_COMMAND_FORMAT;
1099 } 1099 }
1100 1100
@@ -1111,7 +1111,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
1111 le16_to_cpus(&val_len); n+=2; 1111 le16_to_cpus(&val_len); n+=2;
1112 1112
1113 if (val_len > 1016) { 1113 if (val_len > 1016) {
1114 IRDA_DEBUG(2, "%s(), parameter length to long\n", __FUNCTION__ ); 1114 IRDA_DEBUG(2, "%s(), parameter length to long\n", __func__ );
1115 return -RSP_INVALID_COMMAND_FORMAT; 1115 return -RSP_INVALID_COMMAND_FORMAT;
1116 } 1116 }
1117 *len = val_len; 1117 *len = val_len;
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index 1ab91f787cc1..7a6b14ab1e7f 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -103,7 +103,7 @@ static int irlan_eth_open(struct net_device *dev)
103{ 103{
104 struct irlan_cb *self = netdev_priv(dev); 104 struct irlan_cb *self = netdev_priv(dev);
105 105
106 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 106 IRDA_DEBUG(2, "%s()\n", __func__ );
107 107
108 /* Ready to play! */ 108 /* Ready to play! */
109 netif_stop_queue(dev); /* Wait until data link is ready */ 109 netif_stop_queue(dev); /* Wait until data link is ready */
@@ -130,7 +130,7 @@ static int irlan_eth_close(struct net_device *dev)
130{ 130{
131 struct irlan_cb *self = netdev_priv(dev); 131 struct irlan_cb *self = netdev_priv(dev);
132 132
133 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 133 IRDA_DEBUG(2, "%s()\n", __func__ );
134 134
135 /* Stop device */ 135 /* Stop device */
136 netif_stop_queue(dev); 136 netif_stop_queue(dev);
@@ -221,7 +221,7 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
221 } 221 }
222 if (skb->len < ETH_HLEN) { 222 if (skb->len < ETH_HLEN) {
223 IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n", 223 IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n",
224 __FUNCTION__, skb->len); 224 __func__, skb->len);
225 ++self->stats.rx_dropped; 225 ++self->stats.rx_dropped;
226 dev_kfree_skb(skb); 226 dev_kfree_skb(skb);
227 return 0; 227 return 0;
@@ -270,7 +270,7 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
270 270
271 IRDA_ASSERT(dev != NULL, return;); 271 IRDA_ASSERT(dev != NULL, return;);
272 272
273 IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __FUNCTION__, 273 IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __func__,
274 flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START", 274 flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
275 netif_running(dev)); 275 netif_running(dev));
276 276
@@ -332,11 +332,11 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
332{ 332{
333 struct irlan_cb *self = netdev_priv(dev); 333 struct irlan_cb *self = netdev_priv(dev);
334 334
335 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 335 IRDA_DEBUG(2, "%s()\n", __func__ );
336 336
337 /* Check if data channel has been connected yet */ 337 /* Check if data channel has been connected yet */
338 if (self->client.state != IRLAN_DATA) { 338 if (self->client.state != IRLAN_DATA) {
339 IRDA_DEBUG(1, "%s(), delaying!\n", __FUNCTION__ ); 339 IRDA_DEBUG(1, "%s(), delaying!\n", __func__ );
340 return; 340 return;
341 } 341 }
342 342
@@ -346,20 +346,20 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
346 } 346 }
347 else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) { 347 else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
348 /* Disable promiscuous mode, use normal mode. */ 348 /* Disable promiscuous mode, use normal mode. */
349 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ ); 349 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
350 /* hardware_set_filter(NULL); */ 350 /* hardware_set_filter(NULL); */
351 351
352 irlan_set_multicast_filter(self, TRUE); 352 irlan_set_multicast_filter(self, TRUE);
353 } 353 }
354 else if (dev->mc_count) { 354 else if (dev->mc_count) {
355 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ ); 355 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
356 /* Walk the address list, and load the filter */ 356 /* Walk the address list, and load the filter */
357 /* hardware_set_filter(dev->mc_list); */ 357 /* hardware_set_filter(dev->mc_list); */
358 358
359 irlan_set_multicast_filter(self, TRUE); 359 irlan_set_multicast_filter(self, TRUE);
360 } 360 }
361 else { 361 else {
362 IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __FUNCTION__ ); 362 IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__ );
363 irlan_set_multicast_filter(self, FALSE); 363 irlan_set_multicast_filter(self, FALSE);
364 } 364 }
365 365
diff --git a/net/irda/irlan/irlan_event.c b/net/irda/irlan/irlan_event.c
index a9750a801388..cbcb4eb54037 100644
--- a/net/irda/irlan/irlan_event.c
+++ b/net/irda/irlan/irlan_event.c
@@ -40,7 +40,7 @@ char *irlan_state[] = {
40 40
41void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) 41void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
42{ 42{
43 IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]); 43 IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]);
44 44
45 IRDA_ASSERT(self != NULL, return;); 45 IRDA_ASSERT(self != NULL, return;);
46 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 46 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
50 50
51void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state) 51void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
52{ 52{
53 IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]); 53 IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]);
54 54
55 IRDA_ASSERT(self != NULL, return;); 55 IRDA_ASSERT(self != NULL, return;);
56 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 56 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
diff --git a/net/irda/irlan/irlan_filter.c b/net/irda/irlan/irlan_filter.c
index 4384be9a6888..9ff7823abec7 100644
--- a/net/irda/irlan/irlan_filter.c
+++ b/net/irda/irlan/irlan_filter.c
@@ -145,7 +145,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
145{ 145{
146 __u8 *bytes; 146 __u8 *bytes;
147 147
148 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 148 IRDA_DEBUG(4, "%s()\n", __func__ );
149 149
150 bytes = value; 150 bytes = value;
151 151
@@ -158,7 +158,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
158 * This is experimental!! DB. 158 * This is experimental!! DB.
159 */ 159 */
160 if (strcmp(param, "MODE") == 0) { 160 if (strcmp(param, "MODE") == 0) {
161 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 161 IRDA_DEBUG(0, "%s()\n", __func__ );
162 self->use_udata = TRUE; 162 self->use_udata = TRUE;
163 return; 163 return;
164 } 164 }
diff --git a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c
index 13db942812e4..3f81f81b2dfa 100644
--- a/net/irda/irlan/irlan_provider.c
+++ b/net/irda/irlan/irlan_provider.c
@@ -70,7 +70,7 @@ static int irlan_provider_data_indication(void *instance, void *sap,
70 struct irlan_cb *self; 70 struct irlan_cb *self;
71 __u8 code; 71 __u8 code;
72 72
73 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 73 IRDA_DEBUG(4, "%s()\n", __func__ );
74 74
75 self = (struct irlan_cb *) instance; 75 self = (struct irlan_cb *) instance;
76 76
@@ -99,15 +99,15 @@ static int irlan_provider_data_indication(void *instance, void *sap,
99 irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb); 99 irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb);
100 break; 100 break;
101 case CMD_RECONNECT_DATA_CHAN: 101 case CMD_RECONNECT_DATA_CHAN:
102 IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __FUNCTION__ ); 102 IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __func__ );
103 IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ ); 103 IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ );
104 break; 104 break;
105 case CMD_CLOSE_DATA_CHAN: 105 case CMD_CLOSE_DATA_CHAN:
106 IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n"); 106 IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n");
107 IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ ); 107 IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ );
108 break; 108 break;
109 default: 109 default:
110 IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ ); 110 IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
111 break; 111 break;
112 } 112 }
113 return 0; 113 return 0;
@@ -129,7 +129,7 @@ static void irlan_provider_connect_indication(void *instance, void *sap,
129 struct tsap_cb *tsap; 129 struct tsap_cb *tsap;
130 __u32 saddr, daddr; 130 __u32 saddr, daddr;
131 131
132 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 132 IRDA_DEBUG(0, "%s()\n", __func__ );
133 133
134 self = (struct irlan_cb *) instance; 134 self = (struct irlan_cb *) instance;
135 tsap = (struct tsap_cb *) sap; 135 tsap = (struct tsap_cb *) sap;
@@ -182,7 +182,7 @@ static void irlan_provider_disconnect_indication(void *instance, void *sap,
182 struct irlan_cb *self; 182 struct irlan_cb *self;
183 struct tsap_cb *tsap; 183 struct tsap_cb *tsap;
184 184
185 IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason); 185 IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason);
186 186
187 self = (struct irlan_cb *) instance; 187 self = (struct irlan_cb *) instance;
188 tsap = (struct tsap_cb *) sap; 188 tsap = (struct tsap_cb *) sap;
@@ -236,7 +236,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
236 236
237 IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); 237 IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;);
238 238
239 IRDA_DEBUG(4, "%s(), skb->len=%d\n", __FUNCTION__ , (int)skb->len); 239 IRDA_DEBUG(4, "%s(), skb->len=%d\n", __func__ , (int)skb->len);
240 240
241 IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); 241 IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;);
242 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); 242 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;);
@@ -266,7 +266,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
266 for (i=0; i<count;i++) { 266 for (i=0; i<count;i++) {
267 ret = irlan_extract_param(ptr, name, value, &val_len); 267 ret = irlan_extract_param(ptr, name, value, &val_len);
268 if (ret < 0) { 268 if (ret < 0) {
269 IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ ); 269 IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
270 break; 270 break;
271 } 271 }
272 ptr+=ret; 272 ptr+=ret;
@@ -291,7 +291,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
291{ 291{
292 struct sk_buff *skb; 292 struct sk_buff *skb;
293 293
294 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 294 IRDA_DEBUG(4, "%s()\n", __func__ );
295 295
296 IRDA_ASSERT(self != NULL, return;); 296 IRDA_ASSERT(self != NULL, return;);
297 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 297 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -323,7 +323,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
323 irlan_insert_string_param(skb, "MEDIA", "802.5"); 323 irlan_insert_string_param(skb, "MEDIA", "802.5");
324 break; 324 break;
325 default: 325 default:
326 IRDA_DEBUG(2, "%s(), unknown media type!\n", __FUNCTION__ ); 326 IRDA_DEBUG(2, "%s(), unknown media type!\n", __func__ );
327 break; 327 break;
328 } 328 }
329 irlan_insert_short_param(skb, "IRLAN_VER", 0x0101); 329 irlan_insert_short_param(skb, "IRLAN_VER", 0x0101);
@@ -347,7 +347,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
347 irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED"); 347 irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED");
348 break; 348 break;
349 default: 349 default:
350 IRDA_DEBUG(2, "%s(), Unknown access type\n", __FUNCTION__ ); 350 IRDA_DEBUG(2, "%s(), Unknown access type\n", __func__ );
351 break; 351 break;
352 } 352 }
353 irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee); 353 irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee);
@@ -367,7 +367,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
367 irlan_filter_request(self, skb); 367 irlan_filter_request(self, skb);
368 break; 368 break;
369 default: 369 default:
370 IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ ); 370 IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
371 break; 371 break;
372 } 372 }
373 373
@@ -385,7 +385,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
385 struct tsap_cb *tsap; 385 struct tsap_cb *tsap;
386 notify_t notify; 386 notify_t notify;
387 387
388 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 388 IRDA_DEBUG(4, "%s()\n", __func__ );
389 389
390 IRDA_ASSERT(self != NULL, return -1;); 390 IRDA_ASSERT(self != NULL, return -1;);
391 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 391 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
@@ -406,7 +406,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
406 406
407 tsap = irttp_open_tsap(LSAP_ANY, 1, &notify); 407 tsap = irttp_open_tsap(LSAP_ANY, 1, &notify);
408 if (!tsap) { 408 if (!tsap) {
409 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); 409 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
410 return -1; 410 return -1;
411 } 411 }
412 self->provider.tsap_ctrl = tsap; 412 self->provider.tsap_ctrl = tsap;
diff --git a/net/irda/irlan/irlan_provider_event.c b/net/irda/irlan/irlan_provider_event.c
index 10ece5a47522..01a9d7c993ee 100644
--- a/net/irda/irlan/irlan_provider_event.c
+++ b/net/irda/irlan/irlan_provider_event.c
@@ -72,7 +72,7 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event,
72static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, 72static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
73 struct sk_buff *skb) 73 struct sk_buff *skb)
74{ 74{
75 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 75 IRDA_DEBUG(4, "%s()\n", __func__ );
76 76
77 IRDA_ASSERT(self != NULL, return -1;); 77 IRDA_ASSERT(self != NULL, return -1;);
78 78
@@ -82,7 +82,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
82 irlan_next_provider_state( self, IRLAN_INFO); 82 irlan_next_provider_state( self, IRLAN_INFO);
83 break; 83 break;
84 default: 84 default:
85 IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event); 85 IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
86 break; 86 break;
87 } 87 }
88 if (skb) 88 if (skb)
@@ -101,7 +101,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
101{ 101{
102 int ret; 102 int ret;
103 103
104 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 104 IRDA_DEBUG(4, "%s()\n", __func__ );
105 105
106 IRDA_ASSERT(self != NULL, return -1;); 106 IRDA_ASSERT(self != NULL, return -1;);
107 107
@@ -147,7 +147,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
147 irlan_next_provider_state(self, IRLAN_IDLE); 147 irlan_next_provider_state(self, IRLAN_IDLE);
148 break; 148 break;
149 default: 149 default:
150 IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event); 150 IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
151 break; 151 break;
152 } 152 }
153 if (skb) 153 if (skb)
@@ -166,7 +166,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
166static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, 166static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
167 struct sk_buff *skb) 167 struct sk_buff *skb)
168{ 168{
169 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 169 IRDA_DEBUG(4, "%s()\n", __func__ );
170 170
171 IRDA_ASSERT(self != NULL, return -1;); 171 IRDA_ASSERT(self != NULL, return -1;);
172 172
@@ -186,7 +186,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
186 irlan_next_provider_state(self, IRLAN_IDLE); 186 irlan_next_provider_state(self, IRLAN_IDLE);
187 break; 187 break;
188 default: 188 default:
189 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event); 189 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
190 break; 190 break;
191 } 191 }
192 if (skb) 192 if (skb)
@@ -205,7 +205,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
205static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, 205static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
206 struct sk_buff *skb) 206 struct sk_buff *skb)
207{ 207{
208 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 208 IRDA_DEBUG(4, "%s()\n", __func__ );
209 209
210 IRDA_ASSERT(self != NULL, return -1;); 210 IRDA_ASSERT(self != NULL, return -1;);
211 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 211 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
@@ -221,7 +221,7 @@ static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
221 irlan_next_provider_state(self, IRLAN_IDLE); 221 irlan_next_provider_state(self, IRLAN_IDLE);
222 break; 222 break;
223 default: 223 default:
224 IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event); 224 IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
225 break; 225 break;
226 } 226 }
227 if (skb) 227 if (skb)
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index f3236acc8d22..e4965b764b9b 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -88,7 +88,7 @@ int __init irlap_init(void)
88 irlap = hashbin_new(HB_LOCK); 88 irlap = hashbin_new(HB_LOCK);
89 if (irlap == NULL) { 89 if (irlap == NULL) {
90 IRDA_ERROR("%s: can't allocate irlap hashbin!\n", 90 IRDA_ERROR("%s: can't allocate irlap hashbin!\n",
91 __FUNCTION__); 91 __func__);
92 return -ENOMEM; 92 return -ENOMEM;
93 } 93 }
94 94
@@ -113,7 +113,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
113{ 113{
114 struct irlap_cb *self; 114 struct irlap_cb *self;
115 115
116 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 116 IRDA_DEBUG(4, "%s()\n", __func__);
117 117
118 /* Initialize the irlap structure. */ 118 /* Initialize the irlap structure. */
119 self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL); 119 self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL);
@@ -215,7 +215,7 @@ void irlap_close(struct irlap_cb *self)
215{ 215{
216 struct irlap_cb *lap; 216 struct irlap_cb *lap;
217 217
218 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 218 IRDA_DEBUG(4, "%s()\n", __func__);
219 219
220 IRDA_ASSERT(self != NULL, return;); 220 IRDA_ASSERT(self != NULL, return;);
221 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 221 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -231,7 +231,7 @@ void irlap_close(struct irlap_cb *self)
231 /* Be sure that we manage to remove ourself from the hash */ 231 /* Be sure that we manage to remove ourself from the hash */
232 lap = hashbin_remove(irlap, self->saddr, NULL); 232 lap = hashbin_remove(irlap, self->saddr, NULL);
233 if (!lap) { 233 if (!lap) {
234 IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __FUNCTION__); 234 IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __func__);
235 return; 235 return;
236 } 236 }
237 __irlap_close(lap); 237 __irlap_close(lap);
@@ -246,7 +246,7 @@ EXPORT_SYMBOL(irlap_close);
246 */ 246 */
247void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) 247void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
248{ 248{
249 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 249 IRDA_DEBUG(4, "%s()\n", __func__);
250 250
251 IRDA_ASSERT(self != NULL, return;); 251 IRDA_ASSERT(self != NULL, return;);
252 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 252 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -265,7 +265,7 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
265 */ 265 */
266void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata) 266void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
267{ 267{
268 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 268 IRDA_DEBUG(4, "%s()\n", __func__);
269 269
270 irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL); 270 irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL);
271} 271}
@@ -280,7 +280,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
280void irlap_connect_request(struct irlap_cb *self, __u32 daddr, 280void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
281 struct qos_info *qos_user, int sniff) 281 struct qos_info *qos_user, int sniff)
282{ 282{
283 IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __FUNCTION__, daddr); 283 IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __func__, daddr);
284 284
285 IRDA_ASSERT(self != NULL, return;); 285 IRDA_ASSERT(self != NULL, return;);
286 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 286 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -307,7 +307,7 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
307 */ 307 */
308void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb) 308void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb)
309{ 309{
310 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 310 IRDA_DEBUG(4, "%s()\n", __func__);
311 311
312 IRDA_ASSERT(self != NULL, return;); 312 IRDA_ASSERT(self != NULL, return;);
313 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 313 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -344,7 +344,7 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb,
344 IRDA_ASSERT(self != NULL, return;); 344 IRDA_ASSERT(self != NULL, return;);
345 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 345 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
346 346
347 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 347 IRDA_DEBUG(3, "%s()\n", __func__);
348 348
349 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), 349 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
350 return;); 350 return;);
@@ -391,7 +391,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
391 IRDA_ASSERT(self != NULL, return;); 391 IRDA_ASSERT(self != NULL, return;);
392 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 392 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
393 393
394 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 394 IRDA_DEBUG(3, "%s()\n", __func__);
395 395
396 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), 396 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
397 return;); 397 return;);
@@ -417,7 +417,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
417#ifdef CONFIG_IRDA_ULTRA 417#ifdef CONFIG_IRDA_ULTRA
418void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) 418void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
419{ 419{
420 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 420 IRDA_DEBUG(1, "%s()\n", __func__);
421 421
422 IRDA_ASSERT(self != NULL, return;); 422 IRDA_ASSERT(self != NULL, return;);
423 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 423 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -437,7 +437,7 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
437 */ 437 */
438void irlap_disconnect_request(struct irlap_cb *self) 438void irlap_disconnect_request(struct irlap_cb *self)
439{ 439{
440 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 440 IRDA_DEBUG(3, "%s()\n", __func__);
441 441
442 IRDA_ASSERT(self != NULL, return;); 442 IRDA_ASSERT(self != NULL, return;);
443 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 443 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -458,7 +458,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
458 irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL); 458 irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL);
459 break; 459 break;
460 default: 460 default:
461 IRDA_DEBUG(2, "%s(), disconnect pending!\n", __FUNCTION__); 461 IRDA_DEBUG(2, "%s(), disconnect pending!\n", __func__);
462 self->disconnect_pending = TRUE; 462 self->disconnect_pending = TRUE;
463 break; 463 break;
464 } 464 }
@@ -472,7 +472,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
472 */ 472 */
473void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) 473void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
474{ 474{
475 IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, lap_reasons[reason]); 475 IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, lap_reasons[reason]);
476 476
477 IRDA_ASSERT(self != NULL, return;); 477 IRDA_ASSERT(self != NULL, return;);
478 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 478 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -482,7 +482,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
482 482
483 switch (reason) { 483 switch (reason) {
484 case LAP_RESET_INDICATION: 484 case LAP_RESET_INDICATION:
485 IRDA_DEBUG(1, "%s(), Sending reset request!\n", __FUNCTION__); 485 IRDA_DEBUG(1, "%s(), Sending reset request!\n", __func__);
486 irlap_do_event(self, RESET_REQUEST, NULL, NULL); 486 irlap_do_event(self, RESET_REQUEST, NULL, NULL);
487 break; 487 break;
488 case LAP_NO_RESPONSE: /* FALLTROUGH */ 488 case LAP_NO_RESPONSE: /* FALLTROUGH */
@@ -493,7 +493,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
493 reason, NULL); 493 reason, NULL);
494 break; 494 break;
495 default: 495 default:
496 IRDA_ERROR("%s: Unknown reason %d\n", __FUNCTION__, reason); 496 IRDA_ERROR("%s: Unknown reason %d\n", __func__, reason);
497 } 497 }
498} 498}
499 499
@@ -511,7 +511,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
511 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 511 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
512 IRDA_ASSERT(discovery != NULL, return;); 512 IRDA_ASSERT(discovery != NULL, return;);
513 513
514 IRDA_DEBUG(4, "%s(), nslots = %d\n", __FUNCTION__, discovery->nslots); 514 IRDA_DEBUG(4, "%s(), nslots = %d\n", __func__, discovery->nslots);
515 515
516 IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || 516 IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) ||
517 (discovery->nslots == 8) || (discovery->nslots == 16), 517 (discovery->nslots == 8) || (discovery->nslots == 16),
@@ -520,7 +520,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
520 /* Discovery is only possible in NDM mode */ 520 /* Discovery is only possible in NDM mode */
521 if (self->state != LAP_NDM) { 521 if (self->state != LAP_NDM) {
522 IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n", 522 IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n",
523 __FUNCTION__); 523 __func__);
524 irlap_discovery_confirm(self, NULL); 524 irlap_discovery_confirm(self, NULL);
525 /* Note : in theory, if we are not in NDM, we could postpone 525 /* Note : in theory, if we are not in NDM, we could postpone
526 * the discovery like we do for connection request. 526 * the discovery like we do for connection request.
@@ -543,7 +543,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
543 543
544 if (self->discovery_log == NULL) { 544 if (self->discovery_log == NULL) {
545 IRDA_WARNING("%s(), Unable to allocate discovery log!\n", 545 IRDA_WARNING("%s(), Unable to allocate discovery log!\n",
546 __FUNCTION__); 546 __func__);
547 return; 547 return;
548 } 548 }
549 549
@@ -598,7 +598,7 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log)
598 */ 598 */
599void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery) 599void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery)
600{ 600{
601 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 601 IRDA_DEBUG(4, "%s()\n", __func__);
602 602
603 IRDA_ASSERT(self != NULL, return;); 603 IRDA_ASSERT(self != NULL, return;);
604 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 604 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -644,7 +644,7 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
644 */ 644 */
645void irlap_reset_indication(struct irlap_cb *self) 645void irlap_reset_indication(struct irlap_cb *self)
646{ 646{
647 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 647 IRDA_DEBUG(1, "%s()\n", __func__);
648 648
649 IRDA_ASSERT(self != NULL, return;); 649 IRDA_ASSERT(self != NULL, return;);
650 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 650 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -660,7 +660,7 @@ void irlap_reset_indication(struct irlap_cb *self)
660 */ 660 */
661void irlap_reset_confirm(void) 661void irlap_reset_confirm(void)
662{ 662{
663 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 663 IRDA_DEBUG(1, "%s()\n", __func__);
664} 664}
665 665
666/* 666/*
@@ -760,7 +760,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
760{ 760{
761 /* nr as expected? */ 761 /* nr as expected? */
762 if (nr == self->vs) { 762 if (nr == self->vs) {
763 IRDA_DEBUG(4, "%s(), expected!\n", __FUNCTION__); 763 IRDA_DEBUG(4, "%s(), expected!\n", __func__);
764 return NR_EXPECTED; 764 return NR_EXPECTED;
765 } 765 }
766 766
@@ -788,7 +788,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
788 */ 788 */
789void irlap_initiate_connection_state(struct irlap_cb *self) 789void irlap_initiate_connection_state(struct irlap_cb *self)
790{ 790{
791 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 791 IRDA_DEBUG(4, "%s()\n", __func__);
792 792
793 IRDA_ASSERT(self != NULL, return;); 793 IRDA_ASSERT(self != NULL, return;);
794 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 794 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -871,7 +871,7 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
871{ 871{
872 struct sk_buff *skb; 872 struct sk_buff *skb;
873 873
874 IRDA_DEBUG(0, "%s(), setting speed to %d\n", __FUNCTION__, speed); 874 IRDA_DEBUG(0, "%s(), setting speed to %d\n", __func__, speed);
875 875
876 IRDA_ASSERT(self != NULL, return;); 876 IRDA_ASSERT(self != NULL, return;);
877 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 877 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -914,7 +914,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
914 * user may not have set all of them. 914 * user may not have set all of them.
915 */ 915 */
916 if (qos_user) { 916 if (qos_user) {
917 IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __FUNCTION__); 917 IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __func__);
918 918
919 if (qos_user->baud_rate.bits) 919 if (qos_user->baud_rate.bits)
920 self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits; 920 self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits;
@@ -944,7 +944,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
944 */ 944 */
945void irlap_apply_default_connection_parameters(struct irlap_cb *self) 945void irlap_apply_default_connection_parameters(struct irlap_cb *self)
946{ 946{
947 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 947 IRDA_DEBUG(4, "%s()\n", __func__);
948 948
949 IRDA_ASSERT(self != NULL, return;); 949 IRDA_ASSERT(self != NULL, return;);
950 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 950 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -1007,7 +1007,7 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self)
1007 */ 1007 */
1008void irlap_apply_connection_parameters(struct irlap_cb *self, int now) 1008void irlap_apply_connection_parameters(struct irlap_cb *self, int now)
1009{ 1009{
1010 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1010 IRDA_DEBUG(4, "%s()\n", __func__);
1011 1011
1012 IRDA_ASSERT(self != NULL, return;); 1012 IRDA_ASSERT(self != NULL, return;);
1013 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 1013 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
index 6af86eba7463..16c4ef0f5c1a 100644
--- a/net/irda/irlap_event.c
+++ b/net/irda/irlap_event.c
@@ -217,7 +217,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
217 } else 217 } else
218 self->fast_RR = FALSE; 218 self->fast_RR = FALSE;
219 219
220 IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __FUNCTION__, timeout, jiffies); 220 IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies);
221#endif /* CONFIG_IRDA_FAST_RR */ 221#endif /* CONFIG_IRDA_FAST_RR */
222 222
223 if (timeout == 0) 223 if (timeout == 0)
@@ -241,7 +241,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
241 if (!self || self->magic != LAP_MAGIC) 241 if (!self || self->magic != LAP_MAGIC)
242 return; 242 return;
243 243
244 IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __FUNCTION__, 244 IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __func__,
245 irlap_event[event], irlap_state[self->state]); 245 irlap_event[event], irlap_state[self->state]);
246 246
247 ret = (*state[self->state])(self, event, skb, info); 247 ret = (*state[self->state])(self, event, skb, info);
@@ -259,7 +259,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
259 * try to disconnect link if we send any data frames, since 259 * try to disconnect link if we send any data frames, since
260 * that will change the state away form XMIT 260 * that will change the state away form XMIT
261 */ 261 */
262 IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__, 262 IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__,
263 skb_queue_len(&self->txq)); 263 skb_queue_len(&self->txq));
264 264
265 if (!skb_queue_empty(&self->txq)) { 265 if (!skb_queue_empty(&self->txq)) {
@@ -340,7 +340,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
340 * media busy in irlap_connect_request() and 340 * media busy in irlap_connect_request() and
341 * postpone the event... - Jean II */ 341 * postpone the event... - Jean II */
342 IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n", 342 IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n",
343 __FUNCTION__); 343 __func__);
344 344
345 /* Always switch state before calling upper layers */ 345 /* Always switch state before calling upper layers */
346 irlap_next_state(self, LAP_NDM); 346 irlap_next_state(self, LAP_NDM);
@@ -367,7 +367,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
367 irlap_connect_indication(self, skb); 367 irlap_connect_indication(self, skb);
368 } else { 368 } else {
369 IRDA_DEBUG(0, "%s(), SNRM frame does not " 369 IRDA_DEBUG(0, "%s(), SNRM frame does not "
370 "contain an I field!\n", __FUNCTION__); 370 "contain an I field!\n", __func__);
371 } 371 }
372 break; 372 break;
373 case DISCOVERY_REQUEST: 373 case DISCOVERY_REQUEST:
@@ -375,7 +375,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
375 375
376 if (self->media_busy) { 376 if (self->media_busy) {
377 IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n", 377 IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n",
378 __FUNCTION__); 378 __func__);
379 /* irlap->log.condition = MEDIA_BUSY; */ 379 /* irlap->log.condition = MEDIA_BUSY; */
380 380
381 /* This will make IrLMP try again */ 381 /* This will make IrLMP try again */
@@ -441,7 +441,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
441 * those cases... 441 * those cases...
442 * Jean II 442 * Jean II
443 */ 443 */
444 IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __FUNCTION__); 444 IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __func__);
445 445
446 /* Last discovery request -> in the log */ 446 /* Last discovery request -> in the log */
447 irlap_discovery_indication(self, info->discovery); 447 irlap_discovery_indication(self, info->discovery);
@@ -520,7 +520,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
520 /* Only accept broadcast frames in NDM mode */ 520 /* Only accept broadcast frames in NDM mode */
521 if (info->caddr != CBROADCAST) { 521 if (info->caddr != CBROADCAST) {
522 IRDA_DEBUG(0, "%s(), not a broadcast frame!\n", 522 IRDA_DEBUG(0, "%s(), not a broadcast frame!\n",
523 __FUNCTION__); 523 __func__);
524 } else 524 } else
525 irlap_unitdata_indication(self, skb); 525 irlap_unitdata_indication(self, skb);
526 break; 526 break;
@@ -536,10 +536,10 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
536 irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); 536 irlap_send_test_frame(self, CBROADCAST, info->daddr, skb);
537 break; 537 break;
538 case RECV_TEST_RSP: 538 case RECV_TEST_RSP:
539 IRDA_DEBUG(0, "%s() not implemented!\n", __FUNCTION__); 539 IRDA_DEBUG(0, "%s() not implemented!\n", __func__);
540 break; 540 break;
541 default: 541 default:
542 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, 542 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
543 irlap_event[event]); 543 irlap_event[event]);
544 544
545 ret = -1; 545 ret = -1;
@@ -567,13 +567,13 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
567 IRDA_ASSERT(info != NULL, return -1;); 567 IRDA_ASSERT(info != NULL, return -1;);
568 IRDA_ASSERT(info->discovery != NULL, return -1;); 568 IRDA_ASSERT(info->discovery != NULL, return -1;);
569 569
570 IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__, 570 IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__,
571 info->discovery->data.daddr); 571 info->discovery->data.daddr);
572 572
573 if (!self->discovery_log) { 573 if (!self->discovery_log) {
574 IRDA_WARNING("%s: discovery log is gone! " 574 IRDA_WARNING("%s: discovery log is gone! "
575 "maybe the discovery timeout has been set" 575 "maybe the discovery timeout has been set"
576 " too short?\n", __FUNCTION__); 576 " too short?\n", __func__);
577 break; 577 break;
578 } 578 }
579 hashbin_insert(self->discovery_log, 579 hashbin_insert(self->discovery_log,
@@ -598,7 +598,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
598 598
599 IRDA_ASSERT(info != NULL, return -1;); 599 IRDA_ASSERT(info != NULL, return -1;);
600 600
601 IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __FUNCTION__, info->s); 601 IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __func__, info->s);
602 602
603 /* Last discovery request ? */ 603 /* Last discovery request ? */
604 if (info->s == 0xff) 604 if (info->s == 0xff)
@@ -613,7 +613,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
613 */ 613 */
614 if (irda_device_is_receiving(self->netdev) && !self->add_wait) { 614 if (irda_device_is_receiving(self->netdev) && !self->add_wait) {
615 IRDA_DEBUG(2, "%s(), device is slow to answer, " 615 IRDA_DEBUG(2, "%s(), device is slow to answer, "
616 "waiting some more!\n", __FUNCTION__); 616 "waiting some more!\n", __func__);
617 irlap_start_slot_timer(self, msecs_to_jiffies(10)); 617 irlap_start_slot_timer(self, msecs_to_jiffies(10));
618 self->add_wait = TRUE; 618 self->add_wait = TRUE;
619 return ret; 619 return ret;
@@ -649,7 +649,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
649 } 649 }
650 break; 650 break;
651 default: 651 default:
652 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, 652 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
653 irlap_event[event]); 653 irlap_event[event]);
654 654
655 ret = -1; 655 ret = -1;
@@ -671,7 +671,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
671 discovery_t *discovery_rsp; 671 discovery_t *discovery_rsp;
672 int ret=0; 672 int ret=0;
673 673
674 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 674 IRDA_DEBUG(4, "%s()\n", __func__);
675 675
676 IRDA_ASSERT(self != NULL, return -1;); 676 IRDA_ASSERT(self != NULL, return -1;);
677 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 677 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -679,7 +679,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
679 switch (event) { 679 switch (event) {
680 case QUERY_TIMER_EXPIRED: 680 case QUERY_TIMER_EXPIRED:
681 IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n", 681 IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n",
682 __FUNCTION__, jiffies); 682 __func__, jiffies);
683 irlap_next_state(self, LAP_NDM); 683 irlap_next_state(self, LAP_NDM);
684 break; 684 break;
685 case RECV_DISCOVERY_XID_CMD: 685 case RECV_DISCOVERY_XID_CMD:
@@ -717,7 +717,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
717 } 717 }
718 break; 718 break;
719 default: 719 default:
720 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, 720 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
721 event, irlap_event[event]); 721 event, irlap_event[event]);
722 722
723 ret = -1; 723 ret = -1;
@@ -738,7 +738,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
738{ 738{
739 int ret = 0; 739 int ret = 0;
740 740
741 IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); 741 IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]);
742 742
743 IRDA_ASSERT(self != NULL, return -1;); 743 IRDA_ASSERT(self != NULL, return -1;);
744 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 744 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -799,18 +799,18 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
799 break; 799 break;
800 case RECV_DISCOVERY_XID_CMD: 800 case RECV_DISCOVERY_XID_CMD:
801 IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n", 801 IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n",
802 __FUNCTION__); 802 __func__);
803 irlap_next_state(self, LAP_NDM); 803 irlap_next_state(self, LAP_NDM);
804 804
805 break; 805 break;
806 case DISCONNECT_REQUEST: 806 case DISCONNECT_REQUEST:
807 IRDA_DEBUG(0, "%s(), Disconnect request!\n", __FUNCTION__); 807 IRDA_DEBUG(0, "%s(), Disconnect request!\n", __func__);
808 irlap_send_dm_frame(self); 808 irlap_send_dm_frame(self);
809 irlap_next_state( self, LAP_NDM); 809 irlap_next_state( self, LAP_NDM);
810 irlap_disconnect_indication(self, LAP_DISC_INDICATION); 810 irlap_disconnect_indication(self, LAP_DISC_INDICATION);
811 break; 811 break;
812 default: 812 default:
813 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, 813 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
814 event, irlap_event[event]); 814 event, irlap_event[event]);
815 815
816 ret = -1; 816 ret = -1;
@@ -832,7 +832,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
832{ 832{
833 int ret = 0; 833 int ret = 0;
834 834
835 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 835 IRDA_DEBUG(4, "%s()\n", __func__);
836 836
837 IRDA_ASSERT(self != NULL, return -1;); 837 IRDA_ASSERT(self != NULL, return -1;);
838 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 838 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -861,7 +861,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
861 self->retry_count++; 861 self->retry_count++;
862 break; 862 break;
863 case RECV_SNRM_CMD: 863 case RECV_SNRM_CMD:
864 IRDA_DEBUG(4, "%s(), SNRM battle!\n", __FUNCTION__); 864 IRDA_DEBUG(4, "%s(), SNRM battle!\n", __func__);
865 865
866 IRDA_ASSERT(skb != NULL, return 0;); 866 IRDA_ASSERT(skb != NULL, return 0;);
867 IRDA_ASSERT(info != NULL, return 0;); 867 IRDA_ASSERT(info != NULL, return 0;);
@@ -948,7 +948,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
948 irlap_disconnect_indication(self, LAP_DISC_INDICATION); 948 irlap_disconnect_indication(self, LAP_DISC_INDICATION);
949 break; 949 break;
950 default: 950 default:
951 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, 951 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
952 event, irlap_event[event]); 952 event, irlap_event[event]);
953 953
954 ret = -1; 954 ret = -1;
@@ -966,7 +966,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
966static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, 966static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event,
967 struct sk_buff *skb, struct irlap_info *info) 967 struct sk_buff *skb, struct irlap_info *info)
968{ 968{
969 IRDA_DEBUG( 0, "%s(), Unknown event\n", __FUNCTION__); 969 IRDA_DEBUG( 0, "%s(), Unknown event\n", __func__);
970 970
971 return -1; 971 return -1;
972} 972}
@@ -1030,7 +1030,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1030 */ 1030 */
1031 if((!nextfit) && (skb->len > self->bytes_left)) { 1031 if((!nextfit) && (skb->len > self->bytes_left)) {
1032 IRDA_DEBUG(0, "%s(), Not allowed to transmit" 1032 IRDA_DEBUG(0, "%s(), Not allowed to transmit"
1033 " more bytes!\n", __FUNCTION__); 1033 " more bytes!\n", __func__);
1034 /* Requeue the skb */ 1034 /* Requeue the skb */
1035 skb_queue_head(&self->txq, skb_get(skb)); 1035 skb_queue_head(&self->txq, skb_get(skb));
1036 /* 1036 /*
@@ -1082,7 +1082,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1082#endif /* CONFIG_IRDA_FAST_RR */ 1082#endif /* CONFIG_IRDA_FAST_RR */
1083 } else { 1083 } else {
1084 IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n", 1084 IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n",
1085 __FUNCTION__); 1085 __func__);
1086 skb_queue_head(&self->txq, skb_get(skb)); 1086 skb_queue_head(&self->txq, skb_get(skb));
1087 1087
1088 /* 1088 /*
@@ -1094,7 +1094,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1094 break; 1094 break;
1095 case POLL_TIMER_EXPIRED: 1095 case POLL_TIMER_EXPIRED:
1096 IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n", 1096 IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n",
1097 __FUNCTION__, jiffies); 1097 __func__, jiffies);
1098 irlap_send_rr_frame(self, CMD_FRAME); 1098 irlap_send_rr_frame(self, CMD_FRAME);
1099 /* Return to NRM properly - Jean II */ 1099 /* Return to NRM properly - Jean II */
1100 self->window = self->window_size; 1100 self->window = self->window_size;
@@ -1120,7 +1120,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1120 break; 1120 break;
1121 default: 1121 default:
1122 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 1122 IRDA_DEBUG(0, "%s(), Unknown event %s\n",
1123 __FUNCTION__, irlap_event[event]); 1123 __func__, irlap_event[event]);
1124 1124
1125 ret = -EINVAL; 1125 ret = -EINVAL;
1126 break; 1126 break;
@@ -1138,7 +1138,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
1138{ 1138{
1139 int ret = 0; 1139 int ret = 0;
1140 1140
1141 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 1141 IRDA_DEBUG(1, "%s()\n", __func__);
1142 1142
1143 IRDA_ASSERT(self != NULL, return -1;); 1143 IRDA_ASSERT(self != NULL, return -1;);
1144 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1144 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1173,7 +1173,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
1173 } 1173 }
1174 break; 1174 break;
1175 default: 1175 default:
1176 IRDA_DEBUG(1, "%s(), Unknown event %d\n", __FUNCTION__, event); 1176 IRDA_DEBUG(1, "%s(), Unknown event %d\n", __func__, event);
1177 1177
1178 ret = -1; 1178 ret = -1;
1179 break; 1179 break;
@@ -1297,7 +1297,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1297 } else { 1297 } else {
1298 IRDA_DEBUG(4, 1298 IRDA_DEBUG(4,
1299 "%s(), missing or duplicate frame!\n", 1299 "%s(), missing or duplicate frame!\n",
1300 __FUNCTION__); 1300 __func__);
1301 1301
1302 /* Update Nr received */ 1302 /* Update Nr received */
1303 irlap_update_nr_received(self, info->nr); 1303 irlap_update_nr_received(self, info->nr);
@@ -1367,7 +1367,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1367 (nr_status == NR_UNEXPECTED)) 1367 (nr_status == NR_UNEXPECTED))
1368 { 1368 {
1369 IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n", 1369 IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n",
1370 __FUNCTION__); 1370 __func__);
1371 if (info->pf) { 1371 if (info->pf) {
1372 /* Resend rejected frames */ 1372 /* Resend rejected frames */
1373 irlap_resend_rejected_frames(self, CMD_FRAME); 1373 irlap_resend_rejected_frames(self, CMD_FRAME);
@@ -1407,9 +1407,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1407 } 1407 }
1408 break; 1408 break;
1409 } 1409 }
1410 IRDA_DEBUG(1, "%s(), Not implemented!\n", __FUNCTION__); 1410 IRDA_DEBUG(1, "%s(), Not implemented!\n", __func__);
1411 IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n", 1411 IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n",
1412 __FUNCTION__, irlap_event[event], ns_status, nr_status); 1412 __func__, irlap_event[event], ns_status, nr_status);
1413 break; 1413 break;
1414 case RECV_UI_FRAME: 1414 case RECV_UI_FRAME:
1415 /* Poll bit cleared? */ 1415 /* Poll bit cleared? */
@@ -1420,7 +1420,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1420 del_timer(&self->final_timer); 1420 del_timer(&self->final_timer);
1421 irlap_data_indication(self, skb, TRUE); 1421 irlap_data_indication(self, skb, TRUE);
1422 irlap_next_state(self, LAP_XMIT_P); 1422 irlap_next_state(self, LAP_XMIT_P);
1423 IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __FUNCTION__, irlap_state[self->state]); 1423 IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __func__, irlap_state[self->state]);
1424 irlap_start_poll_timer(self, self->poll_timeout); 1424 irlap_start_poll_timer(self, self->poll_timeout);
1425 } 1425 }
1426 break; 1426 break;
@@ -1475,7 +1475,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1475 irlap_next_state(self, LAP_NRM_P); 1475 irlap_next_state(self, LAP_NRM_P);
1476 } else if (ret == NR_INVALID) { 1476 } else if (ret == NR_INVALID) {
1477 IRDA_DEBUG(1, "%s(), Received RR with " 1477 IRDA_DEBUG(1, "%s(), Received RR with "
1478 "invalid nr !\n", __FUNCTION__); 1478 "invalid nr !\n", __func__);
1479 1479
1480 irlap_next_state(self, LAP_RESET_WAIT); 1480 irlap_next_state(self, LAP_RESET_WAIT);
1481 1481
@@ -1580,7 +1580,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1580 irlap_start_final_timer(self, 2 * self->final_timeout); 1580 irlap_start_final_timer(self, 2 * self->final_timeout);
1581 break; 1581 break;
1582 case RECV_RD_RSP: 1582 case RECV_RD_RSP:
1583 IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __FUNCTION__); 1583 IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __func__);
1584 1584
1585 irlap_flush_all_queues(self); 1585 irlap_flush_all_queues(self);
1586 irlap_next_state(self, LAP_XMIT_P); 1586 irlap_next_state(self, LAP_XMIT_P);
@@ -1589,7 +1589,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1589 break; 1589 break;
1590 default: 1590 default:
1591 IRDA_DEBUG(1, "%s(), Unknown event %s\n", 1591 IRDA_DEBUG(1, "%s(), Unknown event %s\n",
1592 __FUNCTION__, irlap_event[event]); 1592 __func__, irlap_event[event]);
1593 1593
1594 ret = -1; 1594 ret = -1;
1595 break; 1595 break;
@@ -1609,7 +1609,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
1609{ 1609{
1610 int ret = 0; 1610 int ret = 0;
1611 1611
1612 IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); 1612 IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]);
1613 1613
1614 IRDA_ASSERT(self != NULL, return -1;); 1614 IRDA_ASSERT(self != NULL, return -1;);
1615 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1615 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1635,7 +1635,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
1635 irlap_next_state( self, LAP_PCLOSE); 1635 irlap_next_state( self, LAP_PCLOSE);
1636 break; 1636 break;
1637 default: 1637 default:
1638 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, 1638 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
1639 irlap_event[event]); 1639 irlap_event[event]);
1640 1640
1641 ret = -1; 1641 ret = -1;
@@ -1656,7 +1656,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
1656{ 1656{
1657 int ret = 0; 1657 int ret = 0;
1658 1658
1659 IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); 1659 IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]);
1660 1660
1661 IRDA_ASSERT(self != NULL, return -1;); 1661 IRDA_ASSERT(self != NULL, return -1;);
1662 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1662 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1714,7 +1714,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
1714 * state 1714 * state
1715 */ 1715 */
1716 if (!info) { 1716 if (!info) {
1717 IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __FUNCTION__); 1717 IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __func__);
1718 irlap_initiate_connection_state(self); 1718 irlap_initiate_connection_state(self);
1719 irlap_wait_min_turn_around(self, &self->qos_tx); 1719 irlap_wait_min_turn_around(self, &self->qos_tx);
1720 irlap_send_ua_response_frame(self, &self->qos_rx); 1720 irlap_send_ua_response_frame(self, &self->qos_rx);
@@ -1724,12 +1724,12 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
1724 } else { 1724 } else {
1725 IRDA_DEBUG(0, 1725 IRDA_DEBUG(0,
1726 "%s(), SNRM frame contained an I field!\n", 1726 "%s(), SNRM frame contained an I field!\n",
1727 __FUNCTION__); 1727 __func__);
1728 } 1728 }
1729 break; 1729 break;
1730 default: 1730 default:
1731 IRDA_DEBUG(1, "%s(), Unknown event %s\n", 1731 IRDA_DEBUG(1, "%s(), Unknown event %s\n",
1732 __FUNCTION__, irlap_event[event]); 1732 __func__, irlap_event[event]);
1733 1733
1734 ret = -1; 1734 ret = -1;
1735 break; 1735 break;
@@ -1749,7 +1749,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1749{ 1749{
1750 int ret = 0; 1750 int ret = 0;
1751 1751
1752 IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); 1752 IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[event]);
1753 1753
1754 IRDA_ASSERT(self != NULL, return -ENODEV;); 1754 IRDA_ASSERT(self != NULL, return -ENODEV;);
1755 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); 1755 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
@@ -1786,7 +1786,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1786 */ 1786 */
1787 if((!nextfit) && (skb->len > self->bytes_left)) { 1787 if((!nextfit) && (skb->len > self->bytes_left)) {
1788 IRDA_DEBUG(0, "%s(), Not allowed to transmit" 1788 IRDA_DEBUG(0, "%s(), Not allowed to transmit"
1789 " more bytes!\n", __FUNCTION__); 1789 " more bytes!\n", __func__);
1790 /* Requeue the skb */ 1790 /* Requeue the skb */
1791 skb_queue_head(&self->txq, skb_get(skb)); 1791 skb_queue_head(&self->txq, skb_get(skb));
1792 1792
@@ -1832,7 +1832,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1832 ret = -EPROTO; 1832 ret = -EPROTO;
1833 } 1833 }
1834 } else { 1834 } else {
1835 IRDA_DEBUG(2, "%s(), Unable to send!\n", __FUNCTION__); 1835 IRDA_DEBUG(2, "%s(), Unable to send!\n", __func__);
1836 skb_queue_head(&self->txq, skb_get(skb)); 1836 skb_queue_head(&self->txq, skb_get(skb));
1837 ret = -EPROTO; 1837 ret = -EPROTO;
1838 } 1838 }
@@ -1848,7 +1848,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1848 * when we return... - Jean II */ 1848 * when we return... - Jean II */
1849 break; 1849 break;
1850 default: 1850 default:
1851 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, 1851 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
1852 irlap_event[event]); 1852 irlap_event[event]);
1853 1853
1854 ret = -EINVAL; 1854 ret = -EINVAL;
@@ -1871,7 +1871,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
1871 int nr_status; 1871 int nr_status;
1872 int ret = 0; 1872 int ret = 0;
1873 1873
1874 IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); 1874 IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]);
1875 1875
1876 IRDA_ASSERT(self != NULL, return -1;); 1876 IRDA_ASSERT(self != NULL, return -1;);
1877 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1877 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1880,7 +1880,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
1880 case RECV_I_CMD: /* Optimize for the common case */ 1880 case RECV_I_CMD: /* Optimize for the common case */
1881 /* FIXME: must check for remote_busy below */ 1881 /* FIXME: must check for remote_busy below */
1882 IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, " 1882 IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, "
1883 "vr=%d, pf=%d\n", __FUNCTION__, 1883 "vr=%d, pf=%d\n", __func__,
1884 irlap_event[event], info->nr, 1884 irlap_event[event], info->nr,
1885 self->vs, info->ns, self->vr, info->pf); 1885 self->vs, info->ns, self->vr, info->pf);
1886 1886
@@ -2112,21 +2112,21 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2112 irlap_next_state(self, LAP_NRM_S); 2112 irlap_next_state(self, LAP_NRM_S);
2113 } else { 2113 } else {
2114 IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n", 2114 IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n",
2115 __FUNCTION__); 2115 __func__);
2116 } 2116 }
2117 break; 2117 break;
2118 case RECV_SNRM_CMD: 2118 case RECV_SNRM_CMD:
2119 /* SNRM frame is not allowed to contain an I-field */ 2119 /* SNRM frame is not allowed to contain an I-field */
2120 if (!info) { 2120 if (!info) {
2121 del_timer(&self->wd_timer); 2121 del_timer(&self->wd_timer);
2122 IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __FUNCTION__); 2122 IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __func__);
2123 irlap_next_state(self, LAP_RESET_CHECK); 2123 irlap_next_state(self, LAP_RESET_CHECK);
2124 2124
2125 irlap_reset_indication(self); 2125 irlap_reset_indication(self);
2126 } else { 2126 } else {
2127 IRDA_DEBUG(0, 2127 IRDA_DEBUG(0,
2128 "%s(), SNRM frame contained an I-field!\n", 2128 "%s(), SNRM frame contained an I-field!\n",
2129 __FUNCTION__); 2129 __func__);
2130 2130
2131 } 2131 }
2132 break; 2132 break;
@@ -2158,7 +2158,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2158 * which explain why we use (self->N2 / 2) here !!! 2158 * which explain why we use (self->N2 / 2) here !!!
2159 * Jean II 2159 * Jean II
2160 */ 2160 */
2161 IRDA_DEBUG(1, "%s(), retry_count = %d\n", __FUNCTION__, 2161 IRDA_DEBUG(1, "%s(), retry_count = %d\n", __func__,
2162 self->retry_count); 2162 self->retry_count);
2163 2163
2164 if (self->retry_count < (self->N2 / 2)) { 2164 if (self->retry_count < (self->N2 / 2)) {
@@ -2211,7 +2211,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2211 irlap_send_test_frame(self, self->caddr, info->daddr, skb); 2211 irlap_send_test_frame(self, self->caddr, info->daddr, skb);
2212 break; 2212 break;
2213 default: 2213 default:
2214 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, 2214 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
2215 event, irlap_event[event]); 2215 event, irlap_event[event]);
2216 2216
2217 ret = -EINVAL; 2217 ret = -EINVAL;
@@ -2228,7 +2228,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
2228{ 2228{
2229 int ret = 0; 2229 int ret = 0;
2230 2230
2231 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 2231 IRDA_DEBUG(1, "%s()\n", __func__);
2232 2232
2233 IRDA_ASSERT(self != NULL, return -ENODEV;); 2233 IRDA_ASSERT(self != NULL, return -ENODEV;);
2234 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); 2234 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
@@ -2285,7 +2285,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
2285 break; /* stay in SCLOSE */ 2285 break; /* stay in SCLOSE */
2286 } 2286 }
2287 2287
2288 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, 2288 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
2289 event, irlap_event[event]); 2289 event, irlap_event[event]);
2290 2290
2291 ret = -EINVAL; 2291 ret = -EINVAL;
@@ -2301,7 +2301,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
2301{ 2301{
2302 int ret = 0; 2302 int ret = 0;
2303 2303
2304 IRDA_DEBUG(1, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); 2304 IRDA_DEBUG(1, "%s(), event=%s\n", __func__, irlap_event[event]);
2305 2305
2306 IRDA_ASSERT(self != NULL, return -ENODEV;); 2306 IRDA_ASSERT(self != NULL, return -ENODEV;);
2307 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); 2307 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
@@ -2322,7 +2322,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
2322 irlap_next_state(self, LAP_SCLOSE); 2322 irlap_next_state(self, LAP_SCLOSE);
2323 break; 2323 break;
2324 default: 2324 default:
2325 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, 2325 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
2326 event, irlap_event[event]); 2326 event, irlap_event[event]);
2327 2327
2328 ret = -EINVAL; 2328 ret = -EINVAL;
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 7c132d6342af..a38b231c8689 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -102,7 +102,7 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb)
102 irlap_insert_info(self, skb); 102 irlap_insert_info(self, skb);
103 103
104 if (unlikely(self->mode & IRDA_MODE_MONITOR)) { 104 if (unlikely(self->mode & IRDA_MODE_MONITOR)) {
105 IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __FUNCTION__, 105 IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __func__,
106 self->netdev->name); 106 self->netdev->name);
107 dev_kfree_skb(skb); 107 dev_kfree_skb(skb);
108 return; 108 return;
@@ -182,7 +182,7 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
182 /* Check if the new connection address is valid */ 182 /* Check if the new connection address is valid */
183 if ((info->caddr == 0x00) || (info->caddr == 0xfe)) { 183 if ((info->caddr == 0x00) || (info->caddr == 0xfe)) {
184 IRDA_DEBUG(3, "%s(), invalid connection address!\n", 184 IRDA_DEBUG(3, "%s(), invalid connection address!\n",
185 __FUNCTION__); 185 __func__);
186 return; 186 return;
187 } 187 }
188 188
@@ -193,7 +193,7 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
193 /* Only accept if addressed directly to us */ 193 /* Only accept if addressed directly to us */
194 if (info->saddr != self->saddr) { 194 if (info->saddr != self->saddr) {
195 IRDA_DEBUG(2, "%s(), not addressed to us!\n", 195 IRDA_DEBUG(2, "%s(), not addressed to us!\n",
196 __FUNCTION__); 196 __func__);
197 return; 197 return;
198 } 198 }
199 irlap_do_event(self, RECV_SNRM_CMD, skb, info); 199 irlap_do_event(self, RECV_SNRM_CMD, skb, info);
@@ -215,7 +215,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos)
215 struct ua_frame *frame; 215 struct ua_frame *frame;
216 int ret; 216 int ret;
217 217
218 IRDA_DEBUG(2, "%s() <%ld>\n", __FUNCTION__, jiffies); 218 IRDA_DEBUG(2, "%s() <%ld>\n", __func__, jiffies);
219 219
220 IRDA_ASSERT(self != NULL, return;); 220 IRDA_ASSERT(self != NULL, return;);
221 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 221 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -290,7 +290,7 @@ void irlap_send_disc_frame(struct irlap_cb *self)
290 struct sk_buff *tx_skb = NULL; 290 struct sk_buff *tx_skb = NULL;
291 struct disc_frame *frame; 291 struct disc_frame *frame;
292 292
293 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 293 IRDA_DEBUG(3, "%s()\n", __func__);
294 294
295 IRDA_ASSERT(self != NULL, return;); 295 IRDA_ASSERT(self != NULL, return;);
296 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 296 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -321,7 +321,7 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s,
321 __u32 bcast = BROADCAST; 321 __u32 bcast = BROADCAST;
322 __u8 *info; 322 __u8 *info;
323 323
324 IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __FUNCTION__, 324 IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __func__,
325 s, S, command); 325 s, S, command);
326 326
327 IRDA_ASSERT(self != NULL, return;); 327 IRDA_ASSERT(self != NULL, return;);
@@ -414,13 +414,13 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
414 __u8 *discovery_info; 414 __u8 *discovery_info;
415 char *text; 415 char *text;
416 416
417 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 417 IRDA_DEBUG(4, "%s()\n", __func__);
418 418
419 IRDA_ASSERT(self != NULL, return;); 419 IRDA_ASSERT(self != NULL, return;);
420 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 420 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
421 421
422 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) { 422 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) {
423 IRDA_ERROR("%s: frame too short!\n", __FUNCTION__); 423 IRDA_ERROR("%s: frame too short!\n", __func__);
424 return; 424 return;
425 } 425 }
426 426
@@ -432,12 +432,12 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
432 /* Make sure frame is addressed to us */ 432 /* Make sure frame is addressed to us */
433 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { 433 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
434 IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n", 434 IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
435 __FUNCTION__); 435 __func__);
436 return; 436 return;
437 } 437 }
438 438
439 if ((discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) { 439 if ((discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) {
440 IRDA_WARNING("%s: kmalloc failed!\n", __FUNCTION__); 440 IRDA_WARNING("%s: kmalloc failed!\n", __func__);
441 return; 441 return;
442 } 442 }
443 443
@@ -445,7 +445,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
445 discovery->data.saddr = self->saddr; 445 discovery->data.saddr = self->saddr;
446 discovery->timestamp = jiffies; 446 discovery->timestamp = jiffies;
447 447
448 IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__, 448 IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__,
449 discovery->data.daddr); 449 discovery->data.daddr);
450 450
451 discovery_info = skb_pull(skb, sizeof(struct xid_frame)); 451 discovery_info = skb_pull(skb, sizeof(struct xid_frame));
@@ -491,7 +491,7 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
491 char *text; 491 char *text;
492 492
493 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) { 493 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) {
494 IRDA_ERROR("%s: frame too short!\n", __FUNCTION__); 494 IRDA_ERROR("%s: frame too short!\n", __func__);
495 return; 495 return;
496 } 496 }
497 497
@@ -503,7 +503,7 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
503 /* Make sure frame is addressed to us */ 503 /* Make sure frame is addressed to us */
504 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { 504 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
505 IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n", 505 IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
506 __FUNCTION__); 506 __func__);
507 return; 507 return;
508 } 508 }
509 509
@@ -536,7 +536,7 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
536 if((discovery_info == NULL) || 536 if((discovery_info == NULL) ||
537 !pskb_may_pull(skb, 3)) { 537 !pskb_may_pull(skb, 3)) {
538 IRDA_ERROR("%s: discovery frame too short!\n", 538 IRDA_ERROR("%s: discovery frame too short!\n",
539 __FUNCTION__); 539 __func__);
540 return; 540 return;
541 } 541 }
542 542
@@ -545,7 +545,7 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
545 */ 545 */
546 discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC); 546 discovery = kmalloc(sizeof(discovery_t), GFP_ATOMIC);
547 if (!discovery) { 547 if (!discovery) {
548 IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__); 548 IRDA_WARNING("%s: unable to malloc!\n", __func__);
549 return; 549 return;
550 } 550 }
551 551
@@ -657,7 +657,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb,
657{ 657{
658 info->nr = skb->data[1] >> 5; 658 info->nr = skb->data[1] >> 5;
659 659
660 IRDA_DEBUG(4, "%s(), nr=%d, %ld\n", __FUNCTION__, info->nr, jiffies); 660 IRDA_DEBUG(4, "%s(), nr=%d, %ld\n", __func__, info->nr, jiffies);
661 661
662 if (command) 662 if (command)
663 irlap_do_event(self, RECV_RNR_CMD, skb, info); 663 irlap_do_event(self, RECV_RNR_CMD, skb, info);
@@ -668,7 +668,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb,
668static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb, 668static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
669 struct irlap_info *info, int command) 669 struct irlap_info *info, int command)
670{ 670{
671 IRDA_DEBUG(0, "%s()\n", __FUNCTION__); 671 IRDA_DEBUG(0, "%s()\n", __func__);
672 672
673 info->nr = skb->data[1] >> 5; 673 info->nr = skb->data[1] >> 5;
674 674
@@ -682,7 +682,7 @@ static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
682static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb, 682static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb,
683 struct irlap_info *info, int command) 683 struct irlap_info *info, int command)
684{ 684{
685 IRDA_DEBUG(0, "%s()\n", __FUNCTION__); 685 IRDA_DEBUG(0, "%s()\n", __func__);
686 686
687 info->nr = skb->data[1] >> 5; 687 info->nr = skb->data[1] >> 5;
688 688
@@ -696,7 +696,7 @@ static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb,
696static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb, 696static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb,
697 struct irlap_info *info, int command) 697 struct irlap_info *info, int command)
698{ 698{
699 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 699 IRDA_DEBUG(2, "%s()\n", __func__);
700 700
701 /* Check if this is a command or a response frame */ 701 /* Check if this is a command or a response frame */
702 if (command) 702 if (command)
@@ -755,7 +755,7 @@ void irlap_send_data_primary(struct irlap_cb *self, struct sk_buff *skb)
755 755
756 irlap_send_i_frame( self, tx_skb, CMD_FRAME); 756 irlap_send_i_frame( self, tx_skb, CMD_FRAME);
757 } else { 757 } else {
758 IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__); 758 IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__);
759 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); 759 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
760 self->window -= 1; 760 self->window -= 1;
761 } 761 }
@@ -808,7 +808,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb)
808 irlap_next_state(self, LAP_NRM_P); 808 irlap_next_state(self, LAP_NRM_P);
809 irlap_send_i_frame(self, tx_skb, CMD_FRAME); 809 irlap_send_i_frame(self, tx_skb, CMD_FRAME);
810 } else { 810 } else {
811 IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__); 811 IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__);
812 812
813 if (self->ack_required) { 813 if (self->ack_required) {
814 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); 814 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
@@ -835,7 +835,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb)
835 * See max_line_capacities[][] in qos.c for details. Jean II */ 835 * See max_line_capacities[][] in qos.c for details. Jean II */
836 transmission_time -= (self->final_timeout * self->bytes_left 836 transmission_time -= (self->final_timeout * self->bytes_left
837 / self->line_capacity); 837 / self->line_capacity);
838 IRDA_DEBUG(4, "%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n", __FUNCTION__, self->final_timeout, self->bytes_left, self->line_capacity, transmission_time); 838 IRDA_DEBUG(4, "%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n", __func__, self->final_timeout, self->bytes_left, self->line_capacity, transmission_time);
839 839
840 /* We are allowed to transmit a maximum number of bytes again. */ 840 /* We are allowed to transmit a maximum number of bytes again. */
841 self->bytes_left = self->line_capacity; 841 self->bytes_left = self->line_capacity;
@@ -1001,7 +1001,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
1001 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ 1001 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */
1002 tx_skb = skb_copy(skb, GFP_ATOMIC); 1002 tx_skb = skb_copy(skb, GFP_ATOMIC);
1003 if (!tx_skb) { 1003 if (!tx_skb) {
1004 IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__); 1004 IRDA_DEBUG(0, "%s(), unable to copy\n", __func__);
1005 return; 1005 return;
1006 } 1006 }
1007 1007
@@ -1033,7 +1033,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
1033 */ 1033 */
1034 while (!skb_queue_empty(&self->txq)) { 1034 while (!skb_queue_empty(&self->txq)) {
1035 1035
1036 IRDA_DEBUG(0, "%s(), sending additional frames!\n", __FUNCTION__); 1036 IRDA_DEBUG(0, "%s(), sending additional frames!\n", __func__);
1037 if (self->window > 0) { 1037 if (self->window > 0) {
1038 skb = skb_dequeue( &self->txq); 1038 skb = skb_dequeue( &self->txq);
1039 IRDA_ASSERT(skb != NULL, return;); 1039 IRDA_ASSERT(skb != NULL, return;);
@@ -1073,7 +1073,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command)
1073 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ 1073 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */
1074 tx_skb = skb_copy(skb, GFP_ATOMIC); 1074 tx_skb = skb_copy(skb, GFP_ATOMIC);
1075 if (!tx_skb) { 1075 if (!tx_skb) {
1076 IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__); 1076 IRDA_DEBUG(0, "%s(), unable to copy\n", __func__);
1077 return; 1077 return;
1078 } 1078 }
1079 1079
@@ -1096,7 +1096,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command)
1096void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb, 1096void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
1097 __u8 caddr, int command) 1097 __u8 caddr, int command)
1098{ 1098{
1099 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1099 IRDA_DEBUG(4, "%s()\n", __func__);
1100 1100
1101 IRDA_ASSERT(self != NULL, return;); 1101 IRDA_ASSERT(self != NULL, return;);
1102 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 1102 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -1156,7 +1156,7 @@ static inline void irlap_recv_i_frame(struct irlap_cb *self,
1156static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb, 1156static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
1157 struct irlap_info *info) 1157 struct irlap_info *info)
1158{ 1158{
1159 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 1159 IRDA_DEBUG( 4, "%s()\n", __func__);
1160 1160
1161 info->pf = skb->data[1] & PF_BIT; /* Final bit */ 1161 info->pf = skb->data[1] & PF_BIT; /* Final bit */
1162 1162
@@ -1175,7 +1175,7 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb,
1175 __u8 *frame; 1175 __u8 *frame;
1176 int w, x, y, z; 1176 int w, x, y, z;
1177 1177
1178 IRDA_DEBUG(0, "%s()\n", __FUNCTION__); 1178 IRDA_DEBUG(0, "%s()\n", __func__);
1179 1179
1180 IRDA_ASSERT(self != NULL, return;); 1180 IRDA_ASSERT(self != NULL, return;);
1181 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 1181 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -1183,7 +1183,7 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb,
1183 IRDA_ASSERT(info != NULL, return;); 1183 IRDA_ASSERT(info != NULL, return;);
1184 1184
1185 if (!pskb_may_pull(skb, 4)) { 1185 if (!pskb_may_pull(skb, 4)) {
1186 IRDA_ERROR("%s: frame too short!\n", __FUNCTION__); 1186 IRDA_ERROR("%s: frame too short!\n", __func__);
1187 return; 1187 return;
1188 } 1188 }
1189 1189
@@ -1269,10 +1269,10 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb,
1269{ 1269{
1270 struct test_frame *frame; 1270 struct test_frame *frame;
1271 1271
1272 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 1272 IRDA_DEBUG(2, "%s()\n", __func__);
1273 1273
1274 if (!pskb_may_pull(skb, sizeof(*frame))) { 1274 if (!pskb_may_pull(skb, sizeof(*frame))) {
1275 IRDA_ERROR("%s: frame too short!\n", __FUNCTION__); 1275 IRDA_ERROR("%s: frame too short!\n", __func__);
1276 return; 1276 return;
1277 } 1277 }
1278 frame = (struct test_frame *) skb->data; 1278 frame = (struct test_frame *) skb->data;
@@ -1281,7 +1281,7 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb,
1281 if (info->caddr == CBROADCAST) { 1281 if (info->caddr == CBROADCAST) {
1282 if (skb->len < sizeof(struct test_frame)) { 1282 if (skb->len < sizeof(struct test_frame)) {
1283 IRDA_DEBUG(0, "%s() test frame too short!\n", 1283 IRDA_DEBUG(0, "%s() test frame too short!\n",
1284 __FUNCTION__); 1284 __func__);
1285 return; 1285 return;
1286 } 1286 }
1287 1287
@@ -1342,14 +1342,14 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1342 * share and non linear skbs. This should never happen, so 1342 * share and non linear skbs. This should never happen, so
1343 * we don't need to be clever about it. Jean II */ 1343 * we don't need to be clever about it. Jean II */
1344 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { 1344 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
1345 IRDA_ERROR("%s: can't clone shared skb!\n", __FUNCTION__); 1345 IRDA_ERROR("%s: can't clone shared skb!\n", __func__);
1346 dev_kfree_skb(skb); 1346 dev_kfree_skb(skb);
1347 return -1; 1347 return -1;
1348 } 1348 }
1349 1349
1350 /* Check if frame is large enough for parsing */ 1350 /* Check if frame is large enough for parsing */
1351 if (!pskb_may_pull(skb, 2)) { 1351 if (!pskb_may_pull(skb, 2)) {
1352 IRDA_ERROR("%s: frame too short!\n", __FUNCTION__); 1352 IRDA_ERROR("%s: frame too short!\n", __func__);
1353 dev_kfree_skb(skb); 1353 dev_kfree_skb(skb);
1354 return -1; 1354 return -1;
1355 } 1355 }
@@ -1365,7 +1365,7 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1365 /* First we check if this frame has a valid connection address */ 1365 /* First we check if this frame has a valid connection address */
1366 if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) { 1366 if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) {
1367 IRDA_DEBUG(0, "%s(), wrong connection address!\n", 1367 IRDA_DEBUG(0, "%s(), wrong connection address!\n",
1368 __FUNCTION__); 1368 __func__);
1369 goto out; 1369 goto out;
1370 } 1370 }
1371 /* 1371 /*
@@ -1400,7 +1400,7 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1400 break; 1400 break;
1401 default: 1401 default:
1402 IRDA_WARNING("%s: Unknown S-frame %02x received!\n", 1402 IRDA_WARNING("%s: Unknown S-frame %02x received!\n",
1403 __FUNCTION__, info.control); 1403 __func__, info.control);
1404 break; 1404 break;
1405 } 1405 }
1406 goto out; 1406 goto out;
@@ -1438,7 +1438,7 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1438 break; 1438 break;
1439 default: 1439 default:
1440 IRDA_WARNING("%s: Unknown frame %02x received!\n", 1440 IRDA_WARNING("%s: Unknown frame %02x received!\n",
1441 __FUNCTION__, info.control); 1441 __func__, info.control);
1442 break; 1442 break;
1443 } 1443 }
1444out: 1444out:
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index 135ac6907bbf..1f81f8e7c61d 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -76,7 +76,7 @@ const char *irlmp_reasons[] = {
76 */ 76 */
77int __init irlmp_init(void) 77int __init irlmp_init(void)
78{ 78{
79 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 79 IRDA_DEBUG(1, "%s()\n", __func__);
80 /* Initialize the irlmp structure. */ 80 /* Initialize the irlmp structure. */
81 irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL); 81 irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL);
82 if (irlmp == NULL) 82 if (irlmp == NULL)
@@ -164,7 +164,7 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsap_sel, notify_t *notify, __u8 pid)
164 /* Allocate new instance of a LSAP connection */ 164 /* Allocate new instance of a LSAP connection */
165 self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC); 165 self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC);
166 if (self == NULL) { 166 if (self == NULL) {
167 IRDA_ERROR("%s: can't allocate memory\n", __FUNCTION__); 167 IRDA_ERROR("%s: can't allocate memory\n", __func__);
168 return NULL; 168 return NULL;
169 } 169 }
170 170
@@ -202,7 +202,7 @@ EXPORT_SYMBOL(irlmp_open_lsap);
202 */ 202 */
203static void __irlmp_close_lsap(struct lsap_cb *self) 203static void __irlmp_close_lsap(struct lsap_cb *self)
204{ 204{
205 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 205 IRDA_DEBUG(4, "%s()\n", __func__);
206 206
207 IRDA_ASSERT(self != NULL, return;); 207 IRDA_ASSERT(self != NULL, return;);
208 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 208 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -264,7 +264,7 @@ void irlmp_close_lsap(struct lsap_cb *self)
264 if (!lsap) { 264 if (!lsap) {
265 IRDA_DEBUG(0, 265 IRDA_DEBUG(0,
266 "%s(), Looks like somebody has removed me already!\n", 266 "%s(), Looks like somebody has removed me already!\n",
267 __FUNCTION__); 267 __func__);
268 return; 268 return;
269 } 269 }
270 __irlmp_close_lsap(self); 270 __irlmp_close_lsap(self);
@@ -291,7 +291,7 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify)
291 */ 291 */
292 lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL); 292 lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL);
293 if (lap == NULL) { 293 if (lap == NULL) {
294 IRDA_ERROR("%s: unable to kmalloc\n", __FUNCTION__); 294 IRDA_ERROR("%s: unable to kmalloc\n", __func__);
295 return; 295 return;
296 } 296 }
297 297
@@ -304,7 +304,7 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify)
304#endif 304#endif
305 lap->lsaps = hashbin_new(HB_LOCK); 305 lap->lsaps = hashbin_new(HB_LOCK);
306 if (lap->lsaps == NULL) { 306 if (lap->lsaps == NULL) {
307 IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __FUNCTION__); 307 IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __func__);
308 kfree(lap); 308 kfree(lap);
309 return; 309 return;
310 } 310 }
@@ -336,7 +336,7 @@ void irlmp_unregister_link(__u32 saddr)
336{ 336{
337 struct lap_cb *link; 337 struct lap_cb *link;
338 338
339 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 339 IRDA_DEBUG(4, "%s()\n", __func__);
340 340
341 /* We must remove ourselves from the hashbin *first*. This ensure 341 /* We must remove ourselves from the hashbin *first*. This ensure
342 * that no more LSAPs will be open on this link and no discovery 342 * that no more LSAPs will be open on this link and no discovery
@@ -381,7 +381,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
381 381
382 IRDA_DEBUG(2, 382 IRDA_DEBUG(2,
383 "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", 383 "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n",
384 __FUNCTION__, self->slsap_sel, dlsap_sel, saddr, daddr); 384 __func__, self->slsap_sel, dlsap_sel, saddr, daddr);
385 385
386 if (test_bit(0, &self->connected)) { 386 if (test_bit(0, &self->connected)) {
387 ret = -EISCONN; 387 ret = -EISCONN;
@@ -425,7 +425,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
425 if (daddr != DEV_ADDR_ANY) 425 if (daddr != DEV_ADDR_ANY)
426 discovery = hashbin_find(irlmp->cachelog, daddr, NULL); 426 discovery = hashbin_find(irlmp->cachelog, daddr, NULL);
427 else { 427 else {
428 IRDA_DEBUG(2, "%s(), no daddr\n", __FUNCTION__); 428 IRDA_DEBUG(2, "%s(), no daddr\n", __func__);
429 discovery = (discovery_t *) 429 discovery = (discovery_t *)
430 hashbin_get_first(irlmp->cachelog); 430 hashbin_get_first(irlmp->cachelog);
431 } 431 }
@@ -438,7 +438,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
438 } 438 }
439 lap = hashbin_lock_find(irlmp->links, saddr, NULL); 439 lap = hashbin_lock_find(irlmp->links, saddr, NULL);
440 if (lap == NULL) { 440 if (lap == NULL) {
441 IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __FUNCTION__); 441 IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __func__);
442 ret = -EHOSTUNREACH; 442 ret = -EHOSTUNREACH;
443 goto err; 443 goto err;
444 } 444 }
@@ -453,14 +453,14 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
453 * disconnected yet (waiting for timeout in LAP). 453 * disconnected yet (waiting for timeout in LAP).
454 * Maybe we could give LAP a bit of help in this case. 454 * Maybe we could give LAP a bit of help in this case.
455 */ 455 */
456 IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __FUNCTION__); 456 IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __func__);
457 ret = -EAGAIN; 457 ret = -EAGAIN;
458 goto err; 458 goto err;
459 } 459 }
460 460
461 /* LAP is already connected to a different node, and LAP 461 /* LAP is already connected to a different node, and LAP
462 * can only talk to one node at a time */ 462 * can only talk to one node at a time */
463 IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __FUNCTION__); 463 IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __func__);
464 ret = -EBUSY; 464 ret = -EBUSY;
465 goto err; 465 goto err;
466 } 466 }
@@ -522,7 +522,7 @@ void irlmp_connect_indication(struct lsap_cb *self, struct sk_buff *skb)
522 IRDA_ASSERT(self->lap != NULL, return;); 522 IRDA_ASSERT(self->lap != NULL, return;);
523 523
524 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 524 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
525 __FUNCTION__, self->slsap_sel, self->dlsap_sel); 525 __func__, self->slsap_sel, self->dlsap_sel);
526 526
527 /* Note : self->lap is set in irlmp_link_data_indication(), 527 /* Note : self->lap is set in irlmp_link_data_indication(),
528 * (case CONNECT_CMD:) because we have no way to set it here. 528 * (case CONNECT_CMD:) because we have no way to set it here.
@@ -563,7 +563,7 @@ int irlmp_connect_response(struct lsap_cb *self, struct sk_buff *userdata)
563 * in the state machine itself. Jean II */ 563 * in the state machine itself. Jean II */
564 564
565 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 565 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
566 __FUNCTION__, self->slsap_sel, self->dlsap_sel); 566 __func__, self->slsap_sel, self->dlsap_sel);
567 567
568 /* Make room for MUX control header (3 bytes) */ 568 /* Make room for MUX control header (3 bytes) */
569 IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); 569 IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;);
@@ -589,7 +589,7 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
589 int lap_header_size; 589 int lap_header_size;
590 int max_seg_size; 590 int max_seg_size;
591 591
592 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 592 IRDA_DEBUG(3, "%s()\n", __func__);
593 593
594 IRDA_ASSERT(skb != NULL, return;); 594 IRDA_ASSERT(skb != NULL, return;);
595 IRDA_ASSERT(self != NULL, return;); 595 IRDA_ASSERT(self != NULL, return;);
@@ -603,7 +603,7 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
603 max_header_size = LMP_HEADER + lap_header_size; 603 max_header_size = LMP_HEADER + lap_header_size;
604 604
605 IRDA_DEBUG(2, "%s(), max_header_size=%d\n", 605 IRDA_DEBUG(2, "%s(), max_header_size=%d\n",
606 __FUNCTION__, max_header_size); 606 __func__, max_header_size);
607 607
608 /* Hide LMP_CONTROL_HEADER header from layer above */ 608 /* Hide LMP_CONTROL_HEADER header from layer above */
609 skb_pull(skb, LMP_CONTROL_HEADER); 609 skb_pull(skb, LMP_CONTROL_HEADER);
@@ -629,7 +629,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
629 struct lsap_cb *new; 629 struct lsap_cb *new;
630 unsigned long flags; 630 unsigned long flags;
631 631
632 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 632 IRDA_DEBUG(1, "%s()\n", __func__);
633 633
634 spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags); 634 spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags);
635 635
@@ -638,7 +638,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
638 if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) || 638 if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) ||
639 (orig->lap == NULL)) { 639 (orig->lap == NULL)) {
640 IRDA_DEBUG(0, "%s(), invalid LSAP (wrong state)\n", 640 IRDA_DEBUG(0, "%s(), invalid LSAP (wrong state)\n",
641 __FUNCTION__); 641 __func__);
642 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, 642 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
643 flags); 643 flags);
644 return NULL; 644 return NULL;
@@ -647,7 +647,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
647 /* Allocate a new instance */ 647 /* Allocate a new instance */
648 new = kmemdup(orig, sizeof(*new), GFP_ATOMIC); 648 new = kmemdup(orig, sizeof(*new), GFP_ATOMIC);
649 if (!new) { 649 if (!new) {
650 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __FUNCTION__); 650 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__);
651 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, 651 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
652 flags); 652 flags);
653 return NULL; 653 return NULL;
@@ -693,7 +693,7 @@ int irlmp_disconnect_request(struct lsap_cb *self, struct sk_buff *userdata)
693 * and us that might mess up the hashbins below. This fixes it. 693 * and us that might mess up the hashbins below. This fixes it.
694 * Jean II */ 694 * Jean II */
695 if (! test_and_clear_bit(0, &self->connected)) { 695 if (! test_and_clear_bit(0, &self->connected)) {
696 IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__); 696 IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__);
697 dev_kfree_skb(userdata); 697 dev_kfree_skb(userdata);
698 return -1; 698 return -1;
699 } 699 }
@@ -747,19 +747,19 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
747{ 747{
748 struct lsap_cb *lsap; 748 struct lsap_cb *lsap;
749 749
750 IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]); 750 IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, irlmp_reasons[reason]);
751 IRDA_ASSERT(self != NULL, return;); 751 IRDA_ASSERT(self != NULL, return;);
752 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 752 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
753 753
754 IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 754 IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
755 __FUNCTION__, self->slsap_sel, self->dlsap_sel); 755 __func__, self->slsap_sel, self->dlsap_sel);
756 756
757 /* Already disconnected ? 757 /* Already disconnected ?
758 * There is a race condition between irlmp_disconnect_request() 758 * There is a race condition between irlmp_disconnect_request()
759 * and us that might mess up the hashbins below. This fixes it. 759 * and us that might mess up the hashbins below. This fixes it.
760 * Jean II */ 760 * Jean II */
761 if (! test_and_clear_bit(0, &self->connected)) { 761 if (! test_and_clear_bit(0, &self->connected)) {
762 IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__); 762 IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__);
763 return; 763 return;
764 } 764 }
765 765
@@ -792,7 +792,7 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
792 self->notify.disconnect_indication(self->notify.instance, 792 self->notify.disconnect_indication(self->notify.instance,
793 self, reason, skb); 793 self, reason, skb);
794 } else { 794 } else {
795 IRDA_DEBUG(0, "%s(), no handler\n", __FUNCTION__); 795 IRDA_DEBUG(0, "%s(), no handler\n", __func__);
796 } 796 }
797} 797}
798 798
@@ -845,7 +845,7 @@ void irlmp_do_discovery(int nslots)
845 /* Make sure the value is sane */ 845 /* Make sure the value is sane */
846 if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){ 846 if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){
847 IRDA_WARNING("%s: invalid value for number of slots!\n", 847 IRDA_WARNING("%s: invalid value for number of slots!\n",
848 __FUNCTION__); 848 __func__);
849 nslots = sysctl_discovery_slots = 8; 849 nslots = sysctl_discovery_slots = 8;
850 } 850 }
851 851
@@ -963,7 +963,7 @@ irlmp_notify_client(irlmp_client_t *client,
963 int number; /* Number of nodes in the log */ 963 int number; /* Number of nodes in the log */
964 int i; 964 int i;
965 965
966 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 966 IRDA_DEBUG(3, "%s()\n", __func__);
967 967
968 /* Check if client wants or not partial/selective log (optimisation) */ 968 /* Check if client wants or not partial/selective log (optimisation) */
969 if (!client->disco_callback) 969 if (!client->disco_callback)
@@ -1014,7 +1014,7 @@ void irlmp_discovery_confirm(hashbin_t *log, DISCOVERY_MODE mode)
1014 irlmp_client_t *client; 1014 irlmp_client_t *client;
1015 irlmp_client_t *client_next; 1015 irlmp_client_t *client_next;
1016 1016
1017 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 1017 IRDA_DEBUG(3, "%s()\n", __func__);
1018 1018
1019 IRDA_ASSERT(log != NULL, return;); 1019 IRDA_ASSERT(log != NULL, return;);
1020 1020
@@ -1049,7 +1049,7 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number)
1049 irlmp_client_t *client_next; 1049 irlmp_client_t *client_next;
1050 int i; 1050 int i;
1051 1051
1052 IRDA_DEBUG(3, "%s()\n", __FUNCTION__); 1052 IRDA_DEBUG(3, "%s()\n", __func__);
1053 1053
1054 IRDA_ASSERT(expiries != NULL, return;); 1054 IRDA_ASSERT(expiries != NULL, return;);
1055 1055
@@ -1082,7 +1082,7 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number)
1082 */ 1082 */
1083discovery_t *irlmp_get_discovery_response(void) 1083discovery_t *irlmp_get_discovery_response(void)
1084{ 1084{
1085 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1085 IRDA_DEBUG(4, "%s()\n", __func__);
1086 1086
1087 IRDA_ASSERT(irlmp != NULL, return NULL;); 1087 IRDA_ASSERT(irlmp != NULL, return NULL;);
1088 1088
@@ -1160,7 +1160,7 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata)
1160{ 1160{
1161 int ret; 1161 int ret;
1162 1162
1163 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1163 IRDA_DEBUG(4, "%s()\n", __func__);
1164 1164
1165 IRDA_ASSERT(userdata != NULL, return -1;); 1165 IRDA_ASSERT(userdata != NULL, return -1;);
1166 1166
@@ -1184,7 +1184,7 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata)
1184 */ 1184 */
1185void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb) 1185void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb)
1186{ 1186{
1187 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1187 IRDA_DEBUG(4, "%s()\n", __func__);
1188 1188
1189 IRDA_ASSERT(self != NULL, return;); 1189 IRDA_ASSERT(self != NULL, return;);
1190 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 1190 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -1211,7 +1211,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata,
1211 struct sk_buff *clone_skb; 1211 struct sk_buff *clone_skb;
1212 struct lap_cb *lap; 1212 struct lap_cb *lap;
1213 1213
1214 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1214 IRDA_DEBUG(4, "%s()\n", __func__);
1215 1215
1216 IRDA_ASSERT(userdata != NULL, return -1;); 1216 IRDA_ASSERT(userdata != NULL, return -1;);
1217 1217
@@ -1262,7 +1262,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata,
1262#ifdef CONFIG_IRDA_ULTRA 1262#ifdef CONFIG_IRDA_ULTRA
1263void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb) 1263void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb)
1264{ 1264{
1265 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1265 IRDA_DEBUG(4, "%s()\n", __func__);
1266 1266
1267 IRDA_ASSERT(self != NULL, return;); 1267 IRDA_ASSERT(self != NULL, return;);
1268 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 1268 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -1305,7 +1305,7 @@ void irlmp_status_indication(struct lap_cb *self,
1305 curr->notify.status_indication(curr->notify.instance, 1305 curr->notify.status_indication(curr->notify.instance,
1306 link, lock); 1306 link, lock);
1307 else 1307 else
1308 IRDA_DEBUG(2, "%s(), no handler\n", __FUNCTION__); 1308 IRDA_DEBUG(2, "%s(), no handler\n", __func__);
1309 1309
1310 curr = next; 1310 curr = next;
1311 } 1311 }
@@ -1333,7 +1333,7 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
1333 /* Get the number of lsap. That's the only safe way to know 1333 /* Get the number of lsap. That's the only safe way to know
1334 * that we have looped around... - Jean II */ 1334 * that we have looped around... - Jean II */
1335 lsap_todo = HASHBIN_GET_SIZE(self->lsaps); 1335 lsap_todo = HASHBIN_GET_SIZE(self->lsaps);
1336 IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __FUNCTION__, lsap_todo); 1336 IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __func__, lsap_todo);
1337 1337
1338 /* Poll lsap in order until the queue is full or until we 1338 /* Poll lsap in order until the queue is full or until we
1339 * tried them all. 1339 * tried them all.
@@ -1352,14 +1352,14 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
1352 /* Uh-oh... Paranoia */ 1352 /* Uh-oh... Paranoia */
1353 if(curr == NULL) 1353 if(curr == NULL)
1354 break; 1354 break;
1355 IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __FUNCTION__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap)); 1355 IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __func__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
1356 1356
1357 /* Inform lsap user that it can send one more packet. */ 1357 /* Inform lsap user that it can send one more packet. */
1358 if (curr->notify.flow_indication != NULL) 1358 if (curr->notify.flow_indication != NULL)
1359 curr->notify.flow_indication(curr->notify.instance, 1359 curr->notify.flow_indication(curr->notify.instance,
1360 curr, flow); 1360 curr, flow);
1361 else 1361 else
1362 IRDA_DEBUG(1, "%s(), no handler\n", __FUNCTION__); 1362 IRDA_DEBUG(1, "%s(), no handler\n", __func__);
1363 } 1363 }
1364} 1364}
1365 1365
@@ -1381,7 +1381,7 @@ __u8 *irlmp_hint_to_service(__u8 *hint)
1381 */ 1381 */
1382 service = kmalloc(16, GFP_ATOMIC); 1382 service = kmalloc(16, GFP_ATOMIC);
1383 if (!service) { 1383 if (!service) {
1384 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__); 1384 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
1385 return NULL; 1385 return NULL;
1386 } 1386 }
1387 1387
@@ -1482,12 +1482,12 @@ void *irlmp_register_service(__u16 hints)
1482{ 1482{
1483 irlmp_service_t *service; 1483 irlmp_service_t *service;
1484 1484
1485 IRDA_DEBUG(4, "%s(), hints = %04x\n", __FUNCTION__, hints); 1485 IRDA_DEBUG(4, "%s(), hints = %04x\n", __func__, hints);
1486 1486
1487 /* Make a new registration */ 1487 /* Make a new registration */
1488 service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); 1488 service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC);
1489 if (!service) { 1489 if (!service) {
1490 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__); 1490 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
1491 return NULL; 1491 return NULL;
1492 } 1492 }
1493 service->hints.word = hints; 1493 service->hints.word = hints;
@@ -1512,7 +1512,7 @@ int irlmp_unregister_service(void *handle)
1512 irlmp_service_t *service; 1512 irlmp_service_t *service;
1513 unsigned long flags; 1513 unsigned long flags;
1514 1514
1515 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1515 IRDA_DEBUG(4, "%s()\n", __func__);
1516 1516
1517 if (!handle) 1517 if (!handle)
1518 return -1; 1518 return -1;
@@ -1520,7 +1520,7 @@ int irlmp_unregister_service(void *handle)
1520 /* Caller may call with invalid handle (it's legal) - Jean II */ 1520 /* Caller may call with invalid handle (it's legal) - Jean II */
1521 service = hashbin_lock_find(irlmp->services, (long) handle, NULL); 1521 service = hashbin_lock_find(irlmp->services, (long) handle, NULL);
1522 if (!service) { 1522 if (!service) {
1523 IRDA_DEBUG(1, "%s(), Unknown service!\n", __FUNCTION__); 1523 IRDA_DEBUG(1, "%s(), Unknown service!\n", __func__);
1524 return -1; 1524 return -1;
1525 } 1525 }
1526 1526
@@ -1557,13 +1557,13 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb,
1557{ 1557{
1558 irlmp_client_t *client; 1558 irlmp_client_t *client;
1559 1559
1560 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 1560 IRDA_DEBUG(1, "%s()\n", __func__);
1561 IRDA_ASSERT(irlmp != NULL, return NULL;); 1561 IRDA_ASSERT(irlmp != NULL, return NULL;);
1562 1562
1563 /* Make a new registration */ 1563 /* Make a new registration */
1564 client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); 1564 client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC);
1565 if (!client) { 1565 if (!client) {
1566 IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __FUNCTION__); 1566 IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __func__);
1567 return NULL; 1567 return NULL;
1568 } 1568 }
1569 1569
@@ -1599,7 +1599,7 @@ int irlmp_update_client(void *handle, __u16 hint_mask,
1599 1599
1600 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); 1600 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
1601 if (!client) { 1601 if (!client) {
1602 IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__); 1602 IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__);
1603 return -1; 1603 return -1;
1604 } 1604 }
1605 1605
@@ -1622,7 +1622,7 @@ int irlmp_unregister_client(void *handle)
1622{ 1622{
1623 struct irlmp_client *client; 1623 struct irlmp_client *client;
1624 1624
1625 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1625 IRDA_DEBUG(4, "%s()\n", __func__);
1626 1626
1627 if (!handle) 1627 if (!handle)
1628 return -1; 1628 return -1;
@@ -1630,11 +1630,11 @@ int irlmp_unregister_client(void *handle)
1630 /* Caller may call with invalid handle (it's legal) - Jean II */ 1630 /* Caller may call with invalid handle (it's legal) - Jean II */
1631 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); 1631 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
1632 if (!client) { 1632 if (!client) {
1633 IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__); 1633 IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__);
1634 return -1; 1634 return -1;
1635 } 1635 }
1636 1636
1637 IRDA_DEBUG(4, "%s(), removing client!\n", __FUNCTION__); 1637 IRDA_DEBUG(4, "%s(), removing client!\n", __func__);
1638 hashbin_remove_this(irlmp->clients, (irda_queue_t *) client); 1638 hashbin_remove_this(irlmp->clients, (irda_queue_t *) client);
1639 kfree(client); 1639 kfree(client);
1640 1640
@@ -1663,7 +1663,7 @@ static int irlmp_slsap_inuse(__u8 slsap_sel)
1663 IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); 1663 IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;);
1664 IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;); 1664 IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;);
1665 1665
1666 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1666 IRDA_DEBUG(4, "%s()\n", __func__);
1667 1667
1668#ifdef CONFIG_IRDA_ULTRA 1668#ifdef CONFIG_IRDA_ULTRA
1669 /* Accept all bindings to the connectionless LSAP */ 1669 /* Accept all bindings to the connectionless LSAP */
@@ -1790,7 +1790,7 @@ static __u8 irlmp_find_free_slsap(void)
1790 /* Make sure we terminate the loop */ 1790 /* Make sure we terminate the loop */
1791 if (wrapped++) { 1791 if (wrapped++) {
1792 IRDA_ERROR("%s: no more free LSAPs !\n", 1792 IRDA_ERROR("%s: no more free LSAPs !\n",
1793 __FUNCTION__); 1793 __func__);
1794 return 0; 1794 return 0;
1795 } 1795 }
1796 } 1796 }
@@ -1805,7 +1805,7 @@ static __u8 irlmp_find_free_slsap(void)
1805 /* Got it ! */ 1805 /* Got it ! */
1806 lsap_sel = irlmp->last_lsap_sel; 1806 lsap_sel = irlmp->last_lsap_sel;
1807 IRDA_DEBUG(4, "%s(), found free lsap_sel=%02x\n", 1807 IRDA_DEBUG(4, "%s(), found free lsap_sel=%02x\n",
1808 __FUNCTION__, lsap_sel); 1808 __func__, lsap_sel);
1809 1809
1810 return lsap_sel; 1810 return lsap_sel;
1811} 1811}
@@ -1823,26 +1823,26 @@ LM_REASON irlmp_convert_lap_reason( LAP_REASON lap_reason)
1823 1823
1824 switch (lap_reason) { 1824 switch (lap_reason) {
1825 case LAP_DISC_INDICATION: /* Received a disconnect request from peer */ 1825 case LAP_DISC_INDICATION: /* Received a disconnect request from peer */
1826 IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __FUNCTION__); 1826 IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __func__);
1827 reason = LM_USER_REQUEST; 1827 reason = LM_USER_REQUEST;
1828 break; 1828 break;
1829 case LAP_NO_RESPONSE: /* To many retransmits without response */ 1829 case LAP_NO_RESPONSE: /* To many retransmits without response */
1830 IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __FUNCTION__); 1830 IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __func__);
1831 reason = LM_LAP_DISCONNECT; 1831 reason = LM_LAP_DISCONNECT;
1832 break; 1832 break;
1833 case LAP_RESET_INDICATION: 1833 case LAP_RESET_INDICATION:
1834 IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __FUNCTION__); 1834 IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __func__);
1835 reason = LM_LAP_RESET; 1835 reason = LM_LAP_RESET;
1836 break; 1836 break;
1837 case LAP_FOUND_NONE: 1837 case LAP_FOUND_NONE:
1838 case LAP_MEDIA_BUSY: 1838 case LAP_MEDIA_BUSY:
1839 case LAP_PRIMARY_CONFLICT: 1839 case LAP_PRIMARY_CONFLICT:
1840 IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __FUNCTION__); 1840 IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __func__);
1841 reason = LM_CONNECT_FAILURE; 1841 reason = LM_CONNECT_FAILURE;
1842 break; 1842 break;
1843 default: 1843 default:
1844 IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n", 1844 IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n",
1845 __FUNCTION__, lap_reason); 1845 __func__, lap_reason);
1846 reason = LM_LAP_DISCONNECT; 1846 reason = LM_LAP_DISCONNECT;
1847 break; 1847 break;
1848 } 1848 }
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
index 150cd3f1129a..78cce0cb073f 100644
--- a/net/irda/irlmp_event.c
+++ b/net/irda/irlmp_event.c
@@ -120,7 +120,7 @@ static inline void irlmp_next_lap_state(struct lap_cb *self,
120 IRLMP_STATE state) 120 IRLMP_STATE state)
121{ 121{
122 /* 122 /*
123 IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __FUNCTION__, irlmp_state[state]); 123 IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __func__, irlmp_state[state]);
124 */ 124 */
125 self->lap_state = state; 125 self->lap_state = state;
126} 126}
@@ -130,7 +130,7 @@ static inline void irlmp_next_lsap_state(struct lsap_cb *self,
130{ 130{
131 /* 131 /*
132 IRDA_ASSERT(self != NULL, return;); 132 IRDA_ASSERT(self != NULL, return;);
133 IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __FUNCTION__, irlsap_state[state]); 133 IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __func__, irlsap_state[state]);
134 */ 134 */
135 self->lsap_state = state; 135 self->lsap_state = state;
136} 136}
@@ -143,7 +143,7 @@ int irlmp_do_lsap_event(struct lsap_cb *self, IRLMP_EVENT event,
143 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 143 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
144 144
145 IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", 145 IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n",
146 __FUNCTION__, irlmp_event[event], irlsap_state[ self->lsap_state]); 146 __func__, irlmp_event[event], irlsap_state[ self->lsap_state]);
147 147
148 return (*lsap_state[self->lsap_state]) (self, event, skb); 148 return (*lsap_state[self->lsap_state]) (self, event, skb);
149} 149}
@@ -160,7 +160,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
160 IRDA_ASSERT(self != NULL, return;); 160 IRDA_ASSERT(self != NULL, return;);
161 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 161 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
162 162
163 IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __FUNCTION__, 163 IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __func__,
164 irlmp_event[event], 164 irlmp_event[event],
165 irlmp_state[self->lap_state]); 165 irlmp_state[self->lap_state]);
166 166
@@ -169,7 +169,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
169 169
170void irlmp_discovery_timer_expired(void *data) 170void irlmp_discovery_timer_expired(void *data)
171{ 171{
172 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 172 IRDA_DEBUG(4, "%s()\n", __func__);
173 173
174 /* We always cleanup the log (active & passive discovery) */ 174 /* We always cleanup the log (active & passive discovery) */
175 irlmp_do_expiry(); 175 irlmp_do_expiry();
@@ -184,7 +184,7 @@ void irlmp_watchdog_timer_expired(void *data)
184{ 184{
185 struct lsap_cb *self = (struct lsap_cb *) data; 185 struct lsap_cb *self = (struct lsap_cb *) data;
186 186
187 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 187 IRDA_DEBUG(2, "%s()\n", __func__);
188 188
189 IRDA_ASSERT(self != NULL, return;); 189 IRDA_ASSERT(self != NULL, return;);
190 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 190 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -196,7 +196,7 @@ void irlmp_idle_timer_expired(void *data)
196{ 196{
197 struct lap_cb *self = (struct lap_cb *) data; 197 struct lap_cb *self = (struct lap_cb *) data;
198 198
199 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 199 IRDA_DEBUG(2, "%s()\n", __func__);
200 200
201 IRDA_ASSERT(self != NULL, return;); 201 IRDA_ASSERT(self != NULL, return;);
202 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 202 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
@@ -256,7 +256,7 @@ irlmp_do_all_lsap_event(hashbin_t * lsap_hashbin,
256static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, 256static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
257 struct sk_buff *skb) 257 struct sk_buff *skb)
258{ 258{
259 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 259 IRDA_DEBUG(4, "%s()\n", __func__);
260 IRDA_ASSERT(self->irlap != NULL, return;); 260 IRDA_ASSERT(self->irlap != NULL, return;);
261 261
262 switch (event) { 262 switch (event) {
@@ -276,7 +276,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
276 irlap_connect_response(self->irlap, skb); 276 irlap_connect_response(self->irlap, skb);
277 break; 277 break;
278 case LM_LAP_CONNECT_REQUEST: 278 case LM_LAP_CONNECT_REQUEST:
279 IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __FUNCTION__); 279 IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __func__);
280 280
281 irlmp_next_lap_state(self, LAP_U_CONNECT); 281 irlmp_next_lap_state(self, LAP_U_CONNECT);
282 282
@@ -285,13 +285,13 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
285 break; 285 break;
286 case LM_LAP_DISCONNECT_INDICATION: 286 case LM_LAP_DISCONNECT_INDICATION:
287 IRDA_DEBUG(4, "%s(), Error LM_LAP_DISCONNECT_INDICATION\n", 287 IRDA_DEBUG(4, "%s(), Error LM_LAP_DISCONNECT_INDICATION\n",
288 __FUNCTION__); 288 __func__);
289 289
290 irlmp_next_lap_state(self, LAP_STANDBY); 290 irlmp_next_lap_state(self, LAP_STANDBY);
291 break; 291 break;
292 default: 292 default:
293 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 293 IRDA_DEBUG(0, "%s(), Unknown event %s\n",
294 __FUNCTION__, irlmp_event[event]); 294 __func__, irlmp_event[event]);
295 break; 295 break;
296 } 296 }
297} 297}
@@ -306,7 +306,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
306static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, 306static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
307 struct sk_buff *skb) 307 struct sk_buff *skb)
308{ 308{
309 IRDA_DEBUG(2, "%s(), event=%s\n", __FUNCTION__, irlmp_event[event]); 309 IRDA_DEBUG(2, "%s(), event=%s\n", __func__, irlmp_event[event]);
310 310
311 switch (event) { 311 switch (event) {
312 case LM_LAP_CONNECT_INDICATION: 312 case LM_LAP_CONNECT_INDICATION:
@@ -326,7 +326,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
326 * the lsaps may already have gone. This avoid getting stuck 326 * the lsaps may already have gone. This avoid getting stuck
327 * forever in LAP_ACTIVE state - Jean II */ 327 * forever in LAP_ACTIVE state - Jean II */
328 if (HASHBIN_GET_SIZE(self->lsaps) == 0) { 328 if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
329 IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__); 329 IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__);
330 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); 330 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
331 } 331 }
332 break; 332 break;
@@ -344,12 +344,12 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
344 * the lsaps may already have gone. This avoid getting stuck 344 * the lsaps may already have gone. This avoid getting stuck
345 * forever in LAP_ACTIVE state - Jean II */ 345 * forever in LAP_ACTIVE state - Jean II */
346 if (HASHBIN_GET_SIZE(self->lsaps) == 0) { 346 if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
347 IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__); 347 IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__);
348 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); 348 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
349 } 349 }
350 break; 350 break;
351 case LM_LAP_DISCONNECT_INDICATION: 351 case LM_LAP_DISCONNECT_INDICATION:
352 IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __FUNCTION__); 352 IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __func__);
353 irlmp_next_lap_state(self, LAP_STANDBY); 353 irlmp_next_lap_state(self, LAP_STANDBY);
354 354
355 /* Send disconnect event to all LSAPs using this link */ 355 /* Send disconnect event to all LSAPs using this link */
@@ -357,7 +357,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
357 LM_LAP_DISCONNECT_INDICATION); 357 LM_LAP_DISCONNECT_INDICATION);
358 break; 358 break;
359 case LM_LAP_DISCONNECT_REQUEST: 359 case LM_LAP_DISCONNECT_REQUEST:
360 IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __FUNCTION__); 360 IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __func__);
361 361
362 /* One of the LSAP did timeout or was closed, if it was 362 /* One of the LSAP did timeout or was closed, if it was
363 * the last one, try to get out of here - Jean II */ 363 * the last one, try to get out of here - Jean II */
@@ -367,7 +367,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
367 break; 367 break;
368 default: 368 default:
369 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 369 IRDA_DEBUG(0, "%s(), Unknown event %s\n",
370 __FUNCTION__, irlmp_event[event]); 370 __func__, irlmp_event[event]);
371 break; 371 break;
372 } 372 }
373} 373}
@@ -381,11 +381,11 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
381static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, 381static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
382 struct sk_buff *skb) 382 struct sk_buff *skb)
383{ 383{
384 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 384 IRDA_DEBUG(4, "%s()\n", __func__);
385 385
386 switch (event) { 386 switch (event) {
387 case LM_LAP_CONNECT_REQUEST: 387 case LM_LAP_CONNECT_REQUEST:
388 IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __FUNCTION__); 388 IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __func__);
389 389
390 /* 390 /*
391 * IrLAP may have a pending disconnect. We tried to close 391 * IrLAP may have a pending disconnect. We tried to close
@@ -468,7 +468,7 @@ static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
468 break; 468 break;
469 default: 469 default:
470 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 470 IRDA_DEBUG(0, "%s(), Unknown event %s\n",
471 __FUNCTION__, irlmp_event[event]); 471 __func__, irlmp_event[event]);
472 break; 472 break;
473 } 473 }
474} 474}
@@ -490,7 +490,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
490{ 490{
491 int ret = 0; 491 int ret = 0;
492 492
493 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 493 IRDA_DEBUG(4, "%s()\n", __func__);
494 494
495 IRDA_ASSERT(self != NULL, return -1;); 495 IRDA_ASSERT(self != NULL, return -1;);
496 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 496 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -505,11 +505,11 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
505 break; 505 break;
506#endif /* CONFIG_IRDA_ULTRA */ 506#endif /* CONFIG_IRDA_ULTRA */
507 case LM_CONNECT_REQUEST: 507 case LM_CONNECT_REQUEST:
508 IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __FUNCTION__); 508 IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __func__);
509 509
510 if (self->conn_skb) { 510 if (self->conn_skb) {
511 IRDA_WARNING("%s: busy with another request!\n", 511 IRDA_WARNING("%s: busy with another request!\n",
512 __FUNCTION__); 512 __func__);
513 return -EBUSY; 513 return -EBUSY;
514 } 514 }
515 /* Don't forget to refcount it (see irlmp_connect_request()) */ 515 /* Don't forget to refcount it (see irlmp_connect_request()) */
@@ -526,7 +526,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
526 case LM_CONNECT_INDICATION: 526 case LM_CONNECT_INDICATION:
527 if (self->conn_skb) { 527 if (self->conn_skb) {
528 IRDA_WARNING("%s: busy with another request!\n", 528 IRDA_WARNING("%s: busy with another request!\n",
529 __FUNCTION__); 529 __func__);
530 return -EBUSY; 530 return -EBUSY;
531 } 531 }
532 /* Don't forget to refcount it (see irlap_driver_rcv()) */ 532 /* Don't forget to refcount it (see irlap_driver_rcv()) */
@@ -552,7 +552,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
552 break; 552 break;
553 default: 553 default:
554 IRDA_DEBUG(1, "%s(), Unknown event %s on LSAP %#02x\n", 554 IRDA_DEBUG(1, "%s(), Unknown event %s on LSAP %#02x\n",
555 __FUNCTION__, irlmp_event[event], self->slsap_sel); 555 __func__, irlmp_event[event], self->slsap_sel);
556 break; 556 break;
557 } 557 }
558 return ret; 558 return ret;
@@ -570,7 +570,7 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
570 struct lsap_cb *lsap; 570 struct lsap_cb *lsap;
571 int ret = 0; 571 int ret = 0;
572 572
573 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 573 IRDA_DEBUG(4, "%s()\n", __func__);
574 574
575 IRDA_ASSERT(self != NULL, return -1;); 575 IRDA_ASSERT(self != NULL, return -1;);
576 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 576 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -603,7 +603,7 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
603 case LM_WATCHDOG_TIMEOUT: 603 case LM_WATCHDOG_TIMEOUT:
604 /* May happen, who knows... 604 /* May happen, who knows...
605 * Jean II */ 605 * Jean II */
606 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__); 606 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
607 607
608 /* Disconnect, get out... - Jean II */ 608 /* Disconnect, get out... - Jean II */
609 self->lap = NULL; 609 self->lap = NULL;
@@ -614,7 +614,7 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
614 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we 614 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
615 * are *not* yet bound to the IrLAP link. Jean II */ 615 * are *not* yet bound to the IrLAP link. Jean II */
616 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 616 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
617 __FUNCTION__, irlmp_event[event], self->slsap_sel); 617 __func__, irlmp_event[event], self->slsap_sel);
618 break; 618 break;
619 } 619 }
620 return ret; 620 return ret;
@@ -632,7 +632,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
632 struct sk_buff *tx_skb; 632 struct sk_buff *tx_skb;
633 int ret = 0; 633 int ret = 0;
634 634
635 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 635 IRDA_DEBUG(4, "%s()\n", __func__);
636 636
637 IRDA_ASSERT(self != NULL, return -1;); 637 IRDA_ASSERT(self != NULL, return -1;);
638 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 638 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -643,16 +643,16 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
643 break; 643 break;
644 case LM_CONNECT_RESPONSE: 644 case LM_CONNECT_RESPONSE:
645 IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, " 645 IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
646 "no indication issued yet\n", __FUNCTION__); 646 "no indication issued yet\n", __func__);
647 /* Keep state */ 647 /* Keep state */
648 break; 648 break;
649 case LM_DISCONNECT_REQUEST: 649 case LM_DISCONNECT_REQUEST:
650 IRDA_DEBUG(0, "%s(), LM_DISCONNECT_REQUEST, " 650 IRDA_DEBUG(0, "%s(), LM_DISCONNECT_REQUEST, "
651 "not yet bound to IrLAP connection\n", __FUNCTION__); 651 "not yet bound to IrLAP connection\n", __func__);
652 /* Keep state */ 652 /* Keep state */
653 break; 653 break;
654 case LM_LAP_CONNECT_CONFIRM: 654 case LM_LAP_CONNECT_CONFIRM:
655 IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __FUNCTION__); 655 IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __func__);
656 irlmp_next_lsap_state(self, LSAP_CONNECT); 656 irlmp_next_lsap_state(self, LSAP_CONNECT);
657 657
658 tx_skb = self->conn_skb; 658 tx_skb = self->conn_skb;
@@ -666,7 +666,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
666 /* Will happen in some rare cases because of a race condition. 666 /* Will happen in some rare cases because of a race condition.
667 * Just make sure we don't stay there forever... 667 * Just make sure we don't stay there forever...
668 * Jean II */ 668 * Jean II */
669 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__); 669 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
670 670
671 /* Go back to disconnected mode, keep the socket waiting */ 671 /* Go back to disconnected mode, keep the socket waiting */
672 self->lap = NULL; 672 self->lap = NULL;
@@ -680,7 +680,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
680 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we 680 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
681 * are *not* yet bound to the IrLAP link. Jean II */ 681 * are *not* yet bound to the IrLAP link. Jean II */
682 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 682 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
683 __FUNCTION__, irlmp_event[event], self->slsap_sel); 683 __func__, irlmp_event[event], self->slsap_sel);
684 break; 684 break;
685 } 685 }
686 return ret; 686 return ret;
@@ -698,7 +698,7 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
698 LM_REASON reason; 698 LM_REASON reason;
699 int ret = 0; 699 int ret = 0;
700 700
701 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 701 IRDA_DEBUG(4, "%s()\n", __func__);
702 702
703 IRDA_ASSERT(self != NULL, return -1;); 703 IRDA_ASSERT(self != NULL, return -1;);
704 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 704 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
@@ -722,12 +722,12 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
722 break; 722 break;
723 case LM_CONNECT_REQUEST: 723 case LM_CONNECT_REQUEST:
724 IRDA_DEBUG(0, "%s(), LM_CONNECT_REQUEST, " 724 IRDA_DEBUG(0, "%s(), LM_CONNECT_REQUEST, "
725 "error, LSAP already connected\n", __FUNCTION__); 725 "error, LSAP already connected\n", __func__);
726 /* Keep state */ 726 /* Keep state */
727 break; 727 break;
728 case LM_CONNECT_RESPONSE: 728 case LM_CONNECT_RESPONSE:
729 IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, " 729 IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
730 "error, LSAP already connected\n", __FUNCTION__); 730 "error, LSAP already connected\n", __func__);
731 /* Keep state */ 731 /* Keep state */
732 break; 732 break;
733 case LM_DISCONNECT_REQUEST: 733 case LM_DISCONNECT_REQUEST:
@@ -740,7 +740,7 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
740 /* Try to close the LAP connection if its still there */ 740 /* Try to close the LAP connection if its still there */
741 if (self->lap) { 741 if (self->lap) {
742 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", 742 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n",
743 __FUNCTION__); 743 __func__);
744 irlmp_do_lap_event(self->lap, 744 irlmp_do_lap_event(self->lap,
745 LM_LAP_DISCONNECT_REQUEST, 745 LM_LAP_DISCONNECT_REQUEST,
746 NULL); 746 NULL);
@@ -764,14 +764,14 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
764 reason = skb->data[3]; 764 reason = skb->data[3];
765 765
766 /* Try to close the LAP connection */ 766 /* Try to close the LAP connection */
767 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__); 767 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__);
768 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 768 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
769 769
770 irlmp_disconnect_indication(self, reason, skb); 770 irlmp_disconnect_indication(self, reason, skb);
771 break; 771 break;
772 default: 772 default:
773 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 773 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
774 __FUNCTION__, irlmp_event[event], self->slsap_sel); 774 __func__, irlmp_event[event], self->slsap_sel);
775 break; 775 break;
776 } 776 }
777 return ret; 777 return ret;
@@ -793,7 +793,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
793 IRDA_ASSERT(self != NULL, return -1;); 793 IRDA_ASSERT(self != NULL, return -1;);
794 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 794 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
795 795
796 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 796 IRDA_DEBUG(4, "%s()\n", __func__);
797 797
798 switch (event) { 798 switch (event) {
799 case LM_CONNECT_CONFIRM: 799 case LM_CONNECT_CONFIRM:
@@ -814,7 +814,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
814 reason = skb->data[3]; 814 reason = skb->data[3];
815 815
816 /* Try to close the LAP connection */ 816 /* Try to close the LAP connection */
817 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__); 817 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__);
818 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 818 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
819 819
820 irlmp_disconnect_indication(self, reason, skb); 820 irlmp_disconnect_indication(self, reason, skb);
@@ -832,7 +832,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
832 irlmp_disconnect_indication(self, reason, skb); 832 irlmp_disconnect_indication(self, reason, skb);
833 break; 833 break;
834 case LM_WATCHDOG_TIMEOUT: 834 case LM_WATCHDOG_TIMEOUT:
835 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__); 835 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__);
836 836
837 IRDA_ASSERT(self->lap != NULL, return -1;); 837 IRDA_ASSERT(self->lap != NULL, return -1;);
838 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 838 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
@@ -842,7 +842,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
842 break; 842 break;
843 default: 843 default:
844 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 844 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
845 __FUNCTION__, irlmp_event[event], self->slsap_sel); 845 __func__, irlmp_event[event], self->slsap_sel);
846 break; 846 break;
847 } 847 }
848 return ret; 848 return ret;
@@ -863,7 +863,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
863 LM_REASON reason; 863 LM_REASON reason;
864 int ret = 0; 864 int ret = 0;
865 865
866 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 866 IRDA_DEBUG(4, "%s()\n", __func__);
867 867
868 IRDA_ASSERT(self != NULL, return -1;); 868 IRDA_ASSERT(self != NULL, return -1;);
869 IRDA_ASSERT(irlmp != NULL, return -1;); 869 IRDA_ASSERT(irlmp != NULL, return -1;);
@@ -883,7 +883,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
883 irlmp_next_lsap_state(self, LSAP_SETUP); 883 irlmp_next_lsap_state(self, LSAP_SETUP);
884 break; 884 break;
885 case LM_WATCHDOG_TIMEOUT: 885 case LM_WATCHDOG_TIMEOUT:
886 IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __FUNCTION__); 886 IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __func__);
887 887
888 IRDA_ASSERT(self->lap != NULL, return -1;); 888 IRDA_ASSERT(self->lap != NULL, return -1;);
889 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 889 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
@@ -902,7 +902,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
902 break; 902 break;
903 default: 903 default:
904 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 904 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n",
905 __FUNCTION__, irlmp_event[event], self->slsap_sel); 905 __func__, irlmp_event[event], self->slsap_sel);
906 break; 906 break;
907 } 907 }
908 return ret; 908 return ret;
diff --git a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c
index 0a79d9aeb08c..3750884094da 100644
--- a/net/irda/irlmp_frame.c
+++ b/net/irda/irlmp_frame.c
@@ -44,7 +44,7 @@ inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
44 skb->data[1] = slsap; 44 skb->data[1] = slsap;
45 45
46 if (expedited) { 46 if (expedited) {
47 IRDA_DEBUG(4, "%s(), sending expedited data\n", __FUNCTION__); 47 IRDA_DEBUG(4, "%s(), sending expedited data\n", __func__);
48 irlap_data_request(self->irlap, skb, TRUE); 48 irlap_data_request(self->irlap, skb, TRUE);
49 } else 49 } else
50 irlap_data_request(self->irlap, skb, FALSE); 50 irlap_data_request(self->irlap, skb, FALSE);
@@ -60,7 +60,7 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
60{ 60{
61 __u8 *frame; 61 __u8 *frame;
62 62
63 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 63 IRDA_DEBUG(2, "%s()\n", __func__);
64 64
65 IRDA_ASSERT(self != NULL, return;); 65 IRDA_ASSERT(self != NULL, return;);
66 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 66 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
@@ -95,7 +95,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
95 __u8 dlsap_sel; /* Destination LSAP address */ 95 __u8 dlsap_sel; /* Destination LSAP address */
96 __u8 *fp; 96 __u8 *fp;
97 97
98 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 98 IRDA_DEBUG(4, "%s()\n", __func__);
99 99
100 IRDA_ASSERT(self != NULL, return;); 100 IRDA_ASSERT(self != NULL, return;);
101 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 101 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
@@ -117,7 +117,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
117 if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) { 117 if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) {
118 IRDA_DEBUG(3, "%s(), incoming connection, " 118 IRDA_DEBUG(3, "%s(), incoming connection, "
119 "source LSAP=%d, dest LSAP=%d\n", 119 "source LSAP=%d, dest LSAP=%d\n",
120 __FUNCTION__, slsap_sel, dlsap_sel); 120 __func__, slsap_sel, dlsap_sel);
121 121
122 /* Try to find LSAP among the unconnected LSAPs */ 122 /* Try to find LSAP among the unconnected LSAPs */
123 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD, 123 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD,
@@ -125,7 +125,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
125 125
126 /* Maybe LSAP was already connected, so try one more time */ 126 /* Maybe LSAP was already connected, so try one more time */
127 if (!lsap) { 127 if (!lsap) {
128 IRDA_DEBUG(1, "%s(), incoming connection for LSAP already connected\n", __FUNCTION__); 128 IRDA_DEBUG(1, "%s(), incoming connection for LSAP already connected\n", __func__);
129 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, 129 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0,
130 self->lsaps); 130 self->lsaps);
131 } 131 }
@@ -136,12 +136,12 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
136 if (lsap == NULL) { 136 if (lsap == NULL) {
137 IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n"); 137 IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n");
138 IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n", 138 IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n",
139 __FUNCTION__, slsap_sel, dlsap_sel); 139 __func__, slsap_sel, dlsap_sel);
140 if (fp[0] & CONTROL_BIT) { 140 if (fp[0] & CONTROL_BIT) {
141 IRDA_DEBUG(2, "%s(), received control frame %02x\n", 141 IRDA_DEBUG(2, "%s(), received control frame %02x\n",
142 __FUNCTION__, fp[2]); 142 __func__, fp[2]);
143 } else { 143 } else {
144 IRDA_DEBUG(2, "%s(), received data frame\n", __FUNCTION__); 144 IRDA_DEBUG(2, "%s(), received data frame\n", __func__);
145 } 145 }
146 return; 146 return;
147 } 147 }
@@ -160,7 +160,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
160 break; 160 break;
161 case DISCONNECT: 161 case DISCONNECT:
162 IRDA_DEBUG(4, "%s(), Disconnect indication!\n", 162 IRDA_DEBUG(4, "%s(), Disconnect indication!\n",
163 __FUNCTION__); 163 __func__);
164 irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION, 164 irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION,
165 skb); 165 skb);
166 break; 166 break;
@@ -172,7 +172,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
172 break; 172 break;
173 default: 173 default:
174 IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n", 174 IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n",
175 __FUNCTION__, fp[2]); 175 __func__, fp[2]);
176 break; 176 break;
177 } 177 }
178 } else if (unreliable) { 178 } else if (unreliable) {
@@ -206,7 +206,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
206 __u8 *fp; 206 __u8 *fp;
207 unsigned long flags; 207 unsigned long flags;
208 208
209 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 209 IRDA_DEBUG(4, "%s()\n", __func__);
210 210
211 IRDA_ASSERT(self != NULL, return;); 211 IRDA_ASSERT(self != NULL, return;);
212 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 212 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
@@ -224,13 +224,13 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
224 224
225 if (pid & 0x80) { 225 if (pid & 0x80) {
226 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", 226 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n",
227 __FUNCTION__); 227 __func__);
228 return; 228 return;
229 } 229 }
230 230
231 /* Check if frame is addressed to the connectionless LSAP */ 231 /* Check if frame is addressed to the connectionless LSAP */
232 if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) { 232 if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) {
233 IRDA_DEBUG(0, "%s(), dropping frame!\n", __FUNCTION__); 233 IRDA_DEBUG(0, "%s(), dropping frame!\n", __func__);
234 return; 234 return;
235 } 235 }
236 236
@@ -254,7 +254,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
254 if (lsap) 254 if (lsap)
255 irlmp_connless_data_indication(lsap, skb); 255 irlmp_connless_data_indication(lsap, skb);
256 else { 256 else {
257 IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __FUNCTION__); 257 IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __func__);
258 } 258 }
259} 259}
260#endif /* CONFIG_IRDA_ULTRA */ 260#endif /* CONFIG_IRDA_ULTRA */
@@ -270,7 +270,7 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap,
270 LAP_REASON reason, 270 LAP_REASON reason,
271 struct sk_buff *skb) 271 struct sk_buff *skb)
272{ 272{
273 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 273 IRDA_DEBUG(2, "%s()\n", __func__);
274 274
275 IRDA_ASSERT(lap != NULL, return;); 275 IRDA_ASSERT(lap != NULL, return;);
276 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); 276 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
@@ -296,7 +296,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
296 __u32 daddr, struct qos_info *qos, 296 __u32 daddr, struct qos_info *qos,
297 struct sk_buff *skb) 297 struct sk_buff *skb)
298{ 298{
299 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 299 IRDA_DEBUG(4, "%s()\n", __func__);
300 300
301 /* Copy QoS settings for this session */ 301 /* Copy QoS settings for this session */
302 self->qos = qos; 302 self->qos = qos;
@@ -317,7 +317,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
317void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos, 317void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos,
318 struct sk_buff *skb) 318 struct sk_buff *skb)
319{ 319{
320 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 320 IRDA_DEBUG(4, "%s()\n", __func__);
321 321
322 IRDA_ASSERT(self != NULL, return;); 322 IRDA_ASSERT(self != NULL, return;);
323 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 323 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
@@ -383,7 +383,7 @@ void irlmp_link_discovery_indication(struct lap_cb *self,
383 */ 383 */
384void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log) 384void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log)
385{ 385{
386 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 386 IRDA_DEBUG(4, "%s()\n", __func__);
387 387
388 IRDA_ASSERT(self != NULL, return;); 388 IRDA_ASSERT(self != NULL, return;);
389 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 389 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
diff --git a/net/irda/irmod.c b/net/irda/irmod.c
index 01554b996b9b..4c487a883725 100644
--- a/net/irda/irmod.c
+++ b/net/irda/irmod.c
@@ -90,7 +90,7 @@ static int __init irda_init(void)
90{ 90{
91 int ret = 0; 91 int ret = 0;
92 92
93 IRDA_DEBUG(0, "%s()\n", __FUNCTION__); 93 IRDA_DEBUG(0, "%s()\n", __func__);
94 94
95 /* Lower layer of the stack */ 95 /* Lower layer of the stack */
96 irlmp_init(); 96 irlmp_init();
diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
index bc2e15ce7004..a00e422c822e 100644
--- a/net/irda/irnet/irnet.h
+++ b/net/irda/irnet/irnet.h
@@ -337,27 +337,27 @@
337/* All error messages (will show up in the normal logs) */ 337/* All error messages (will show up in the normal logs) */
338#define DERROR(dbg, format, args...) \ 338#define DERROR(dbg, format, args...) \
339 {if(DEBUG_##dbg) \ 339 {if(DEBUG_##dbg) \
340 printk(KERN_INFO "irnet: %s(): " format, __FUNCTION__ , ##args);} 340 printk(KERN_INFO "irnet: %s(): " format, __func__ , ##args);}
341 341
342/* Normal debug message (will show up in /var/log/debug) */ 342/* Normal debug message (will show up in /var/log/debug) */
343#define DEBUG(dbg, format, args...) \ 343#define DEBUG(dbg, format, args...) \
344 {if(DEBUG_##dbg) \ 344 {if(DEBUG_##dbg) \
345 printk(KERN_DEBUG "irnet: %s(): " format, __FUNCTION__ , ##args);} 345 printk(KERN_DEBUG "irnet: %s(): " format, __func__ , ##args);}
346 346
347/* Entering a function (trace) */ 347/* Entering a function (trace) */
348#define DENTER(dbg, format, args...) \ 348#define DENTER(dbg, format, args...) \
349 {if(DEBUG_##dbg) \ 349 {if(DEBUG_##dbg) \
350 printk(KERN_DEBUG "irnet: -> %s" format, __FUNCTION__ , ##args);} 350 printk(KERN_DEBUG "irnet: -> %s" format, __func__ , ##args);}
351 351
352/* Entering and exiting a function in one go (trace) */ 352/* Entering and exiting a function in one go (trace) */
353#define DPASS(dbg, format, args...) \ 353#define DPASS(dbg, format, args...) \
354 {if(DEBUG_##dbg) \ 354 {if(DEBUG_##dbg) \
355 printk(KERN_DEBUG "irnet: <>%s" format, __FUNCTION__ , ##args);} 355 printk(KERN_DEBUG "irnet: <>%s" format, __func__ , ##args);}
356 356
357/* Exiting a function (trace) */ 357/* Exiting a function (trace) */
358#define DEXIT(dbg, format, args...) \ 358#define DEXIT(dbg, format, args...) \
359 {if(DEBUG_##dbg) \ 359 {if(DEBUG_##dbg) \
360 printk(KERN_DEBUG "irnet: <-%s()" format, __FUNCTION__ , ##args);} 360 printk(KERN_DEBUG "irnet: <-%s()" format, __func__ , ##args);}
361 361
362/* Exit a function with debug */ 362/* Exit a function with debug */
363#define DRETURN(ret, dbg, args...) \ 363#define DRETURN(ret, dbg, args...) \
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c
index cd9ff176ecde..9e1fb82e3220 100644
--- a/net/irda/irnetlink.c
+++ b/net/irda/irnetlink.c
@@ -40,7 +40,7 @@ static struct net_device * ifname_to_netdev(struct net *net, struct genl_info *i
40 40
41 ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]); 41 ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]);
42 42
43 IRDA_DEBUG(5, "%s(): Looking for %s\n", __FUNCTION__, ifname); 43 IRDA_DEBUG(5, "%s(): Looking for %s\n", __func__, ifname);
44 44
45 return dev_get_by_name(net, ifname); 45 return dev_get_by_name(net, ifname);
46} 46}
@@ -56,7 +56,7 @@ static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info)
56 56
57 mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]); 57 mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]);
58 58
59 IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __FUNCTION__, mode); 59 IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __func__, mode);
60 60
61 dev = ifname_to_netdev(&init_net, info); 61 dev = ifname_to_netdev(&init_net, info);
62 if (!dev) 62 if (!dev)
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c
index 40c28efaed95..ba01938becb5 100644
--- a/net/irda/irqueue.c
+++ b/net/irda/irqueue.c
@@ -232,7 +232,7 @@ static __u32 hash( const char* name)
232static void enqueue_first(irda_queue_t **queue, irda_queue_t* element) 232static void enqueue_first(irda_queue_t **queue, irda_queue_t* element)
233{ 233{
234 234
235 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 235 IRDA_DEBUG( 4, "%s()\n", __func__);
236 236
237 /* 237 /*
238 * Check if queue is empty. 238 * Check if queue is empty.
@@ -451,7 +451,7 @@ void hashbin_insert(hashbin_t* hashbin, irda_queue_t* entry, long hashv,
451 unsigned long flags = 0; 451 unsigned long flags = 0;
452 int bin; 452 int bin;
453 453
454 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 454 IRDA_DEBUG( 4, "%s()\n", __func__);
455 455
456 IRDA_ASSERT( hashbin != NULL, return;); 456 IRDA_ASSERT( hashbin != NULL, return;);
457 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;); 457 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;);
@@ -564,7 +564,7 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, const char* name)
564 unsigned long flags = 0; 564 unsigned long flags = 0;
565 irda_queue_t* entry; 565 irda_queue_t* entry;
566 566
567 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 567 IRDA_DEBUG( 4, "%s()\n", __func__);
568 568
569 IRDA_ASSERT( hashbin != NULL, return NULL;); 569 IRDA_ASSERT( hashbin != NULL, return NULL;);
570 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); 570 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
@@ -657,7 +657,7 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry)
657 int bin; 657 int bin;
658 long hashv; 658 long hashv;
659 659
660 IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); 660 IRDA_DEBUG( 4, "%s()\n", __func__);
661 661
662 IRDA_ASSERT( hashbin != NULL, return NULL;); 662 IRDA_ASSERT( hashbin != NULL, return NULL;);
663 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); 663 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 97db158c9274..74e439e80823 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -95,7 +95,7 @@ int __init irttp_init(void)
95 irttp->tsaps = hashbin_new(HB_LOCK); 95 irttp->tsaps = hashbin_new(HB_LOCK);
96 if (!irttp->tsaps) { 96 if (!irttp->tsaps) {
97 IRDA_ERROR("%s: can't allocate IrTTP hashbin!\n", 97 IRDA_ERROR("%s: can't allocate IrTTP hashbin!\n",
98 __FUNCTION__); 98 __func__);
99 kfree(irttp); 99 kfree(irttp);
100 return -ENOMEM; 100 return -ENOMEM;
101 } 101 }
@@ -164,7 +164,7 @@ static void irttp_todo_expired(unsigned long data)
164 if (!self || self->magic != TTP_TSAP_MAGIC) 164 if (!self || self->magic != TTP_TSAP_MAGIC)
165 return; 165 return;
166 166
167 IRDA_DEBUG(4, "%s(instance=%p)\n", __FUNCTION__, self); 167 IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self);
168 168
169 /* Try to make some progress, especially on Tx side - Jean II */ 169 /* Try to make some progress, especially on Tx side - Jean II */
170 irttp_run_rx_queue(self); 170 irttp_run_rx_queue(self);
@@ -205,7 +205,7 @@ void irttp_flush_queues(struct tsap_cb *self)
205{ 205{
206 struct sk_buff* skb; 206 struct sk_buff* skb;
207 207
208 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 208 IRDA_DEBUG(4, "%s()\n", __func__);
209 209
210 IRDA_ASSERT(self != NULL, return;); 210 IRDA_ASSERT(self != NULL, return;);
211 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 211 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
@@ -238,7 +238,7 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self)
238 IRDA_ASSERT(self != NULL, return NULL;); 238 IRDA_ASSERT(self != NULL, return NULL;);
239 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;); 239 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;);
240 240
241 IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __FUNCTION__, 241 IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __func__,
242 self->rx_sdu_size); 242 self->rx_sdu_size);
243 243
244 skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size); 244 skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size);
@@ -264,7 +264,7 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self)
264 264
265 IRDA_DEBUG(2, 265 IRDA_DEBUG(2,
266 "%s(), frame len=%d, rx_sdu_size=%d, rx_max_sdu_size=%d\n", 266 "%s(), frame len=%d, rx_sdu_size=%d, rx_max_sdu_size=%d\n",
267 __FUNCTION__, n, self->rx_sdu_size, self->rx_max_sdu_size); 267 __func__, n, self->rx_sdu_size, self->rx_max_sdu_size);
268 /* Note : irttp_run_rx_queue() calculate self->rx_sdu_size 268 /* Note : irttp_run_rx_queue() calculate self->rx_sdu_size
269 * by summing the size of all fragments, so we should always 269 * by summing the size of all fragments, so we should always
270 * have n == self->rx_sdu_size, except in cases where we 270 * have n == self->rx_sdu_size, except in cases where we
@@ -293,7 +293,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
293 struct sk_buff *frag; 293 struct sk_buff *frag;
294 __u8 *frame; 294 __u8 *frame;
295 295
296 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 296 IRDA_DEBUG(2, "%s()\n", __func__);
297 297
298 IRDA_ASSERT(self != NULL, return;); 298 IRDA_ASSERT(self != NULL, return;);
299 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 299 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
@@ -303,7 +303,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
303 * Split frame into a number of segments 303 * Split frame into a number of segments
304 */ 304 */
305 while (skb->len > self->max_seg_size) { 305 while (skb->len > self->max_seg_size) {
306 IRDA_DEBUG(2, "%s(), fragmenting ...\n", __FUNCTION__); 306 IRDA_DEBUG(2, "%s(), fragmenting ...\n", __func__);
307 307
308 /* Make new segment */ 308 /* Make new segment */
309 frag = alloc_skb(self->max_seg_size+self->max_header_size, 309 frag = alloc_skb(self->max_seg_size+self->max_header_size,
@@ -328,7 +328,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
328 skb_queue_tail(&self->tx_queue, frag); 328 skb_queue_tail(&self->tx_queue, frag);
329 } 329 }
330 /* Queue what is left of the original skb */ 330 /* Queue what is left of the original skb */
331 IRDA_DEBUG(2, "%s(), queuing last segment\n", __FUNCTION__); 331 IRDA_DEBUG(2, "%s(), queuing last segment\n", __func__);
332 332
333 frame = skb_push(skb, TTP_HEADER); 333 frame = skb_push(skb, TTP_HEADER);
334 frame[0] = 0x00; /* Clear more bit */ 334 frame[0] = 0x00; /* Clear more bit */
@@ -359,7 +359,7 @@ static int irttp_param_max_sdu_size(void *instance, irda_param_t *param,
359 else 359 else
360 self->tx_max_sdu_size = param->pv.i; 360 self->tx_max_sdu_size = param->pv.i;
361 361
362 IRDA_DEBUG(1, "%s(), MaxSduSize=%d\n", __FUNCTION__, param->pv.i); 362 IRDA_DEBUG(1, "%s(), MaxSduSize=%d\n", __func__, param->pv.i);
363 363
364 return 0; 364 return 0;
365} 365}
@@ -400,13 +400,13 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
400 * JeanII */ 400 * JeanII */
401 if((stsap_sel != LSAP_ANY) && 401 if((stsap_sel != LSAP_ANY) &&
402 ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) { 402 ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) {
403 IRDA_DEBUG(0, "%s(), invalid tsap!\n", __FUNCTION__); 403 IRDA_DEBUG(0, "%s(), invalid tsap!\n", __func__);
404 return NULL; 404 return NULL;
405 } 405 }
406 406
407 self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC); 407 self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC);
408 if (self == NULL) { 408 if (self == NULL) {
409 IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __FUNCTION__); 409 IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __func__);
410 return NULL; 410 return NULL;
411 } 411 }
412 412
@@ -438,7 +438,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
438 */ 438 */
439 lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); 439 lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0);
440 if (lsap == NULL) { 440 if (lsap == NULL) {
441 IRDA_WARNING("%s: unable to allocate LSAP!!\n", __FUNCTION__); 441 IRDA_WARNING("%s: unable to allocate LSAP!!\n", __func__);
442 return NULL; 442 return NULL;
443 } 443 }
444 444
@@ -448,7 +448,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
448 * the stsap_sel we have might not be valid anymore 448 * the stsap_sel we have might not be valid anymore
449 */ 449 */
450 self->stsap_sel = lsap->slsap_sel; 450 self->stsap_sel = lsap->slsap_sel;
451 IRDA_DEBUG(4, "%s(), stsap_sel=%02x\n", __FUNCTION__, self->stsap_sel); 451 IRDA_DEBUG(4, "%s(), stsap_sel=%02x\n", __func__, self->stsap_sel);
452 452
453 self->notify = *notify; 453 self->notify = *notify;
454 self->lsap = lsap; 454 self->lsap = lsap;
@@ -506,7 +506,7 @@ int irttp_close_tsap(struct tsap_cb *self)
506{ 506{
507 struct tsap_cb *tsap; 507 struct tsap_cb *tsap;
508 508
509 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 509 IRDA_DEBUG(4, "%s()\n", __func__);
510 510
511 IRDA_ASSERT(self != NULL, return -1;); 511 IRDA_ASSERT(self != NULL, return -1;);
512 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 512 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
@@ -516,7 +516,7 @@ int irttp_close_tsap(struct tsap_cb *self)
516 /* Check if disconnect is not pending */ 516 /* Check if disconnect is not pending */
517 if (!test_bit(0, &self->disconnect_pend)) { 517 if (!test_bit(0, &self->disconnect_pend)) {
518 IRDA_WARNING("%s: TSAP still connected!\n", 518 IRDA_WARNING("%s: TSAP still connected!\n",
519 __FUNCTION__); 519 __func__);
520 irttp_disconnect_request(self, NULL, P_NORMAL); 520 irttp_disconnect_request(self, NULL, P_NORMAL);
521 } 521 }
522 self->close_pend = TRUE; 522 self->close_pend = TRUE;
@@ -553,18 +553,18 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
553 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 553 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
554 IRDA_ASSERT(skb != NULL, return -1;); 554 IRDA_ASSERT(skb != NULL, return -1;);
555 555
556 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 556 IRDA_DEBUG(4, "%s()\n", __func__);
557 557
558 /* Check that nothing bad happens */ 558 /* Check that nothing bad happens */
559 if ((skb->len == 0) || (!self->connected)) { 559 if ((skb->len == 0) || (!self->connected)) {
560 IRDA_DEBUG(1, "%s(), No data, or not connected\n", 560 IRDA_DEBUG(1, "%s(), No data, or not connected\n",
561 __FUNCTION__); 561 __func__);
562 goto err; 562 goto err;
563 } 563 }
564 564
565 if (skb->len > self->max_seg_size) { 565 if (skb->len > self->max_seg_size) {
566 IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n", 566 IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n",
567 __FUNCTION__); 567 __func__);
568 goto err; 568 goto err;
569 } 569 }
570 570
@@ -595,12 +595,12 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
595 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 595 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
596 IRDA_ASSERT(skb != NULL, return -1;); 596 IRDA_ASSERT(skb != NULL, return -1;);
597 597
598 IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__, 598 IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__,
599 skb_queue_len(&self->tx_queue)); 599 skb_queue_len(&self->tx_queue));
600 600
601 /* Check that nothing bad happens */ 601 /* Check that nothing bad happens */
602 if ((skb->len == 0) || (!self->connected)) { 602 if ((skb->len == 0) || (!self->connected)) {
603 IRDA_WARNING("%s: No data, or not connected\n", __FUNCTION__); 603 IRDA_WARNING("%s: No data, or not connected\n", __func__);
604 ret = -ENOTCONN; 604 ret = -ENOTCONN;
605 goto err; 605 goto err;
606 } 606 }
@@ -611,7 +611,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
611 */ 611 */
612 if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) { 612 if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) {
613 IRDA_ERROR("%s: SAR disabled, and data is too large for IrLAP!\n", 613 IRDA_ERROR("%s: SAR disabled, and data is too large for IrLAP!\n",
614 __FUNCTION__); 614 __func__);
615 ret = -EMSGSIZE; 615 ret = -EMSGSIZE;
616 goto err; 616 goto err;
617 } 617 }
@@ -625,7 +625,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
625 (skb->len > self->tx_max_sdu_size)) 625 (skb->len > self->tx_max_sdu_size))
626 { 626 {
627 IRDA_ERROR("%s: SAR enabled, but data is larger than TxMaxSduSize!\n", 627 IRDA_ERROR("%s: SAR enabled, but data is larger than TxMaxSduSize!\n",
628 __FUNCTION__); 628 __func__);
629 ret = -EMSGSIZE; 629 ret = -EMSGSIZE;
630 goto err; 630 goto err;
631 } 631 }
@@ -704,7 +704,7 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
704 int n; 704 int n;
705 705
706 IRDA_DEBUG(2, "%s() : send_credit = %d, queue_len = %d\n", 706 IRDA_DEBUG(2, "%s() : send_credit = %d, queue_len = %d\n",
707 __FUNCTION__, 707 __func__,
708 self->send_credit, skb_queue_len(&self->tx_queue)); 708 self->send_credit, skb_queue_len(&self->tx_queue));
709 709
710 /* Get exclusive access to the tx queue, otherwise don't touch it */ 710 /* Get exclusive access to the tx queue, otherwise don't touch it */
@@ -813,7 +813,7 @@ static inline void irttp_give_credit(struct tsap_cb *self)
813 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 813 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
814 814
815 IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", 815 IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n",
816 __FUNCTION__, 816 __func__,
817 self->send_credit, self->avail_credit, self->remote_credit); 817 self->send_credit, self->avail_credit, self->remote_credit);
818 818
819 /* Give credit to peer */ 819 /* Give credit to peer */
@@ -862,7 +862,7 @@ static int irttp_udata_indication(void *instance, void *sap,
862 struct tsap_cb *self; 862 struct tsap_cb *self;
863 int err; 863 int err;
864 864
865 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 865 IRDA_DEBUG(4, "%s()\n", __func__);
866 866
867 self = (struct tsap_cb *) instance; 867 self = (struct tsap_cb *) instance;
868 868
@@ -979,7 +979,7 @@ static void irttp_status_indication(void *instance,
979{ 979{
980 struct tsap_cb *self; 980 struct tsap_cb *self;
981 981
982 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 982 IRDA_DEBUG(4, "%s()\n", __func__);
983 983
984 self = (struct tsap_cb *) instance; 984 self = (struct tsap_cb *) instance;
985 985
@@ -997,7 +997,7 @@ static void irttp_status_indication(void *instance,
997 self->notify.status_indication(self->notify.instance, 997 self->notify.status_indication(self->notify.instance,
998 link, lock); 998 link, lock);
999 else 999 else
1000 IRDA_DEBUG(2, "%s(), no handler\n", __FUNCTION__); 1000 IRDA_DEBUG(2, "%s(), no handler\n", __func__);
1001} 1001}
1002 1002
1003/* 1003/*
@@ -1015,7 +1015,7 @@ static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
1015 IRDA_ASSERT(self != NULL, return;); 1015 IRDA_ASSERT(self != NULL, return;);
1016 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 1016 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
1017 1017
1018 IRDA_DEBUG(4, "%s(instance=%p)\n", __FUNCTION__, self); 1018 IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self);
1019 1019
1020 /* We are "polled" directly from LAP, and the LAP want to fill 1020 /* We are "polled" directly from LAP, and the LAP want to fill
1021 * its Tx window. We want to do our best to send it data, so that 1021 * its Tx window. We want to do our best to send it data, so that
@@ -1053,18 +1053,18 @@ static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
1053 */ 1053 */
1054void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow) 1054void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow)
1055{ 1055{
1056 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 1056 IRDA_DEBUG(1, "%s()\n", __func__);
1057 1057
1058 IRDA_ASSERT(self != NULL, return;); 1058 IRDA_ASSERT(self != NULL, return;);
1059 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 1059 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
1060 1060
1061 switch (flow) { 1061 switch (flow) {
1062 case FLOW_STOP: 1062 case FLOW_STOP:
1063 IRDA_DEBUG(1, "%s(), flow stop\n", __FUNCTION__); 1063 IRDA_DEBUG(1, "%s(), flow stop\n", __func__);
1064 self->rx_sdu_busy = TRUE; 1064 self->rx_sdu_busy = TRUE;
1065 break; 1065 break;
1066 case FLOW_START: 1066 case FLOW_START:
1067 IRDA_DEBUG(1, "%s(), flow start\n", __FUNCTION__); 1067 IRDA_DEBUG(1, "%s(), flow start\n", __func__);
1068 self->rx_sdu_busy = FALSE; 1068 self->rx_sdu_busy = FALSE;
1069 1069
1070 /* Client say he can accept more data, try to free our 1070 /* Client say he can accept more data, try to free our
@@ -1073,7 +1073,7 @@ void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow)
1073 1073
1074 break; 1074 break;
1075 default: 1075 default:
1076 IRDA_DEBUG(1, "%s(), Unknown flow command!\n", __FUNCTION__); 1076 IRDA_DEBUG(1, "%s(), Unknown flow command!\n", __func__);
1077 } 1077 }
1078} 1078}
1079EXPORT_SYMBOL(irttp_flow_request); 1079EXPORT_SYMBOL(irttp_flow_request);
@@ -1093,7 +1093,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
1093 __u8 *frame; 1093 __u8 *frame;
1094 __u8 n; 1094 __u8 n;
1095 1095
1096 IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __FUNCTION__, max_sdu_size); 1096 IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __func__, max_sdu_size);
1097 1097
1098 IRDA_ASSERT(self != NULL, return -EBADR;); 1098 IRDA_ASSERT(self != NULL, return -EBADR;);
1099 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;); 1099 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;);
@@ -1191,7 +1191,7 @@ static void irttp_connect_confirm(void *instance, void *sap,
1191 __u8 plen; 1191 __u8 plen;
1192 __u8 n; 1192 __u8 n;
1193 1193
1194 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1194 IRDA_DEBUG(4, "%s()\n", __func__);
1195 1195
1196 self = (struct tsap_cb *) instance; 1196 self = (struct tsap_cb *) instance;
1197 1197
@@ -1215,7 +1215,7 @@ static void irttp_connect_confirm(void *instance, void *sap,
1215 1215
1216 n = skb->data[0] & 0x7f; 1216 n = skb->data[0] & 0x7f;
1217 1217
1218 IRDA_DEBUG(4, "%s(), Initial send_credit=%d\n", __FUNCTION__, n); 1218 IRDA_DEBUG(4, "%s(), Initial send_credit=%d\n", __func__, n);
1219 1219
1220 self->send_credit = n; 1220 self->send_credit = n;
1221 self->tx_max_sdu_size = 0; 1221 self->tx_max_sdu_size = 0;
@@ -1236,7 +1236,7 @@ static void irttp_connect_confirm(void *instance, void *sap,
1236 /* Any errors in the parameter list? */ 1236 /* Any errors in the parameter list? */
1237 if (ret < 0) { 1237 if (ret < 0) {
1238 IRDA_WARNING("%s: error extracting parameters\n", 1238 IRDA_WARNING("%s: error extracting parameters\n",
1239 __FUNCTION__); 1239 __func__);
1240 dev_kfree_skb(skb); 1240 dev_kfree_skb(skb);
1241 1241
1242 /* Do not accept this connection attempt */ 1242 /* Do not accept this connection attempt */
@@ -1246,10 +1246,10 @@ static void irttp_connect_confirm(void *instance, void *sap,
1246 skb_pull(skb, IRDA_MIN(skb->len, plen+1)); 1246 skb_pull(skb, IRDA_MIN(skb->len, plen+1));
1247 } 1247 }
1248 1248
1249 IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __FUNCTION__, 1249 IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __func__,
1250 self->send_credit, self->avail_credit, self->remote_credit); 1250 self->send_credit, self->avail_credit, self->remote_credit);
1251 1251
1252 IRDA_DEBUG(2, "%s(), MaxSduSize=%d\n", __FUNCTION__, 1252 IRDA_DEBUG(2, "%s(), MaxSduSize=%d\n", __func__,
1253 self->tx_max_sdu_size); 1253 self->tx_max_sdu_size);
1254 1254
1255 if (self->notify.connect_confirm) { 1255 if (self->notify.connect_confirm) {
@@ -1288,7 +1288,7 @@ void irttp_connect_indication(void *instance, void *sap, struct qos_info *qos,
1288 self->max_seg_size = max_seg_size - TTP_HEADER; 1288 self->max_seg_size = max_seg_size - TTP_HEADER;
1289 self->max_header_size = max_header_size+TTP_HEADER; 1289 self->max_header_size = max_header_size+TTP_HEADER;
1290 1290
1291 IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __FUNCTION__, self->stsap_sel); 1291 IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __func__, self->stsap_sel);
1292 1292
1293 /* Need to update dtsap_sel if its equal to LSAP_ANY */ 1293 /* Need to update dtsap_sel if its equal to LSAP_ANY */
1294 self->dtsap_sel = lsap->dlsap_sel; 1294 self->dtsap_sel = lsap->dlsap_sel;
@@ -1313,7 +1313,7 @@ void irttp_connect_indication(void *instance, void *sap, struct qos_info *qos,
1313 /* Any errors in the parameter list? */ 1313 /* Any errors in the parameter list? */
1314 if (ret < 0) { 1314 if (ret < 0) {
1315 IRDA_WARNING("%s: error extracting parameters\n", 1315 IRDA_WARNING("%s: error extracting parameters\n",
1316 __FUNCTION__); 1316 __func__);
1317 dev_kfree_skb(skb); 1317 dev_kfree_skb(skb);
1318 1318
1319 /* Do not accept this connection attempt */ 1319 /* Do not accept this connection attempt */
@@ -1350,7 +1350,7 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size,
1350 IRDA_ASSERT(self != NULL, return -1;); 1350 IRDA_ASSERT(self != NULL, return -1;);
1351 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 1351 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
1352 1352
1353 IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __FUNCTION__, 1353 IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __func__,
1354 self->stsap_sel); 1354 self->stsap_sel);
1355 1355
1356 /* Any userdata supplied? */ 1356 /* Any userdata supplied? */
@@ -1432,14 +1432,14 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
1432 struct tsap_cb *new; 1432 struct tsap_cb *new;
1433 unsigned long flags; 1433 unsigned long flags;
1434 1434
1435 IRDA_DEBUG(1, "%s()\n", __FUNCTION__); 1435 IRDA_DEBUG(1, "%s()\n", __func__);
1436 1436
1437 /* Protect our access to the old tsap instance */ 1437 /* Protect our access to the old tsap instance */
1438 spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags); 1438 spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags);
1439 1439
1440 /* Find the old instance */ 1440 /* Find the old instance */
1441 if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) { 1441 if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) {
1442 IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __FUNCTION__); 1442 IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __func__);
1443 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); 1443 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
1444 return NULL; 1444 return NULL;
1445 } 1445 }
@@ -1447,7 +1447,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
1447 /* Allocate a new instance */ 1447 /* Allocate a new instance */
1448 new = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC); 1448 new = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC);
1449 if (!new) { 1449 if (!new) {
1450 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __FUNCTION__); 1450 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__);
1451 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); 1451 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
1452 return NULL; 1452 return NULL;
1453 } 1453 }
@@ -1460,7 +1460,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
1460 /* Try to dup the LSAP (may fail if we were too slow) */ 1460 /* Try to dup the LSAP (may fail if we were too slow) */
1461 new->lsap = irlmp_dup(orig->lsap, new); 1461 new->lsap = irlmp_dup(orig->lsap, new);
1462 if (!new->lsap) { 1462 if (!new->lsap) {
1463 IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__); 1463 IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
1464 kfree(new); 1464 kfree(new);
1465 return NULL; 1465 return NULL;
1466 } 1466 }
@@ -1495,7 +1495,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1495 1495
1496 /* Already disconnected? */ 1496 /* Already disconnected? */
1497 if (!self->connected) { 1497 if (!self->connected) {
1498 IRDA_DEBUG(4, "%s(), already disconnected!\n", __FUNCTION__); 1498 IRDA_DEBUG(4, "%s(), already disconnected!\n", __func__);
1499 if (userdata) 1499 if (userdata)
1500 dev_kfree_skb(userdata); 1500 dev_kfree_skb(userdata);
1501 return -1; 1501 return -1;
@@ -1508,7 +1508,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1508 * Jean II */ 1508 * Jean II */
1509 if(test_and_set_bit(0, &self->disconnect_pend)) { 1509 if(test_and_set_bit(0, &self->disconnect_pend)) {
1510 IRDA_DEBUG(0, "%s(), disconnect already pending\n", 1510 IRDA_DEBUG(0, "%s(), disconnect already pending\n",
1511 __FUNCTION__); 1511 __func__);
1512 if (userdata) 1512 if (userdata)
1513 dev_kfree_skb(userdata); 1513 dev_kfree_skb(userdata);
1514 1514
@@ -1527,7 +1527,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1527 * disconnecting right now since the data will 1527 * disconnecting right now since the data will
1528 * not have any usable connection to be sent on 1528 * not have any usable connection to be sent on
1529 */ 1529 */
1530 IRDA_DEBUG(1, "%s(): High priority!!()\n", __FUNCTION__); 1530 IRDA_DEBUG(1, "%s(): High priority!!()\n", __func__);
1531 irttp_flush_queues(self); 1531 irttp_flush_queues(self);
1532 } else if (priority == P_NORMAL) { 1532 } else if (priority == P_NORMAL) {
1533 /* 1533 /*
@@ -1548,7 +1548,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1548 * be sent at the LMP level (so even if the peer has its Tx queue 1548 * be sent at the LMP level (so even if the peer has its Tx queue
1549 * full of data). - Jean II */ 1549 * full of data). - Jean II */
1550 1550
1551 IRDA_DEBUG(1, "%s(), Disconnecting ...\n", __FUNCTION__); 1551 IRDA_DEBUG(1, "%s(), Disconnecting ...\n", __func__);
1552 self->connected = FALSE; 1552 self->connected = FALSE;
1553 1553
1554 if (!userdata) { 1554 if (!userdata) {
@@ -1584,7 +1584,7 @@ void irttp_disconnect_indication(void *instance, void *sap, LM_REASON reason,
1584{ 1584{
1585 struct tsap_cb *self; 1585 struct tsap_cb *self;
1586 1586
1587 IRDA_DEBUG(4, "%s()\n", __FUNCTION__); 1587 IRDA_DEBUG(4, "%s()\n", __func__);
1588 1588
1589 self = (struct tsap_cb *) instance; 1589 self = (struct tsap_cb *) instance;
1590 1590
@@ -1644,7 +1644,7 @@ static void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb)
1644 * give an error back 1644 * give an error back
1645 */ 1645 */
1646 if (err) { 1646 if (err) {
1647 IRDA_DEBUG(0, "%s() requeueing skb!\n", __FUNCTION__); 1647 IRDA_DEBUG(0, "%s() requeueing skb!\n", __func__);
1648 1648
1649 /* Make sure we take a break */ 1649 /* Make sure we take a break */
1650 self->rx_sdu_busy = TRUE; 1650 self->rx_sdu_busy = TRUE;
@@ -1669,7 +1669,7 @@ void irttp_run_rx_queue(struct tsap_cb *self)
1669 struct sk_buff *skb; 1669 struct sk_buff *skb;
1670 int more = 0; 1670 int more = 0;
1671 1671
1672 IRDA_DEBUG(2, "%s() send=%d,avail=%d,remote=%d\n", __FUNCTION__, 1672 IRDA_DEBUG(2, "%s() send=%d,avail=%d,remote=%d\n", __func__,
1673 self->send_credit, self->avail_credit, self->remote_credit); 1673 self->send_credit, self->avail_credit, self->remote_credit);
1674 1674
1675 /* Get exclusive access to the rx queue, otherwise don't touch it */ 1675 /* Get exclusive access to the rx queue, otherwise don't touch it */
@@ -1710,7 +1710,7 @@ void irttp_run_rx_queue(struct tsap_cb *self)
1710 */ 1710 */
1711 if (self->rx_sdu_size <= self->rx_max_sdu_size) { 1711 if (self->rx_sdu_size <= self->rx_max_sdu_size) {
1712 IRDA_DEBUG(4, "%s(), queueing frag\n", 1712 IRDA_DEBUG(4, "%s(), queueing frag\n",
1713 __FUNCTION__); 1713 __func__);
1714 skb_queue_tail(&self->rx_fragments, skb); 1714 skb_queue_tail(&self->rx_fragments, skb);
1715 } else { 1715 } else {
1716 /* Free the part of the SDU that is too big */ 1716 /* Free the part of the SDU that is too big */
@@ -1740,7 +1740,7 @@ void irttp_run_rx_queue(struct tsap_cb *self)
1740 /* Now we can deliver the reassembled skb */ 1740 /* Now we can deliver the reassembled skb */
1741 irttp_do_data_indication(self, skb); 1741 irttp_do_data_indication(self, skb);
1742 } else { 1742 } else {
1743 IRDA_DEBUG(1, "%s(), Truncated frame\n", __FUNCTION__); 1743 IRDA_DEBUG(1, "%s(), Truncated frame\n", __func__);
1744 1744
1745 /* Free the part of the SDU that is too big */ 1745 /* Free the part of the SDU that is too big */
1746 dev_kfree_skb(skb); 1746 dev_kfree_skb(skb);
diff --git a/net/irda/parameters.c b/net/irda/parameters.c
index 722bbe044d9c..fc1a20565e2d 100644
--- a/net/irda/parameters.c
+++ b/net/irda/parameters.c
@@ -148,23 +148,23 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
148 */ 148 */
149 if (p.pl == 0) { 149 if (p.pl == 0) {
150 if (p.pv.i < 0xff) { 150 if (p.pv.i < 0xff) {
151 IRDA_DEBUG(2, "%s(), using 1 byte\n", __FUNCTION__); 151 IRDA_DEBUG(2, "%s(), using 1 byte\n", __func__);
152 p.pl = 1; 152 p.pl = 1;
153 } else if (p.pv.i < 0xffff) { 153 } else if (p.pv.i < 0xffff) {
154 IRDA_DEBUG(2, "%s(), using 2 bytes\n", __FUNCTION__); 154 IRDA_DEBUG(2, "%s(), using 2 bytes\n", __func__);
155 p.pl = 2; 155 p.pl = 2;
156 } else { 156 } else {
157 IRDA_DEBUG(2, "%s(), using 4 bytes\n", __FUNCTION__); 157 IRDA_DEBUG(2, "%s(), using 4 bytes\n", __func__);
158 p.pl = 4; /* Default length */ 158 p.pl = 4; /* Default length */
159 } 159 }
160 } 160 }
161 /* Check if buffer is long enough for insertion */ 161 /* Check if buffer is long enough for insertion */
162 if (len < (2+p.pl)) { 162 if (len < (2+p.pl)) {
163 IRDA_WARNING("%s: buffer too short for insertion!\n", 163 IRDA_WARNING("%s: buffer too short for insertion!\n",
164 __FUNCTION__); 164 __func__);
165 return -1; 165 return -1;
166 } 166 }
167 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__, 167 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
168 p.pi, p.pl, p.pv.i); 168 p.pi, p.pl, p.pv.i);
169 switch (p.pl) { 169 switch (p.pl) {
170 case 1: 170 case 1:
@@ -187,7 +187,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
187 break; 187 break;
188 default: 188 default:
189 IRDA_WARNING("%s: length %d not supported\n", 189 IRDA_WARNING("%s: length %d not supported\n",
190 __FUNCTION__, p.pl); 190 __func__, p.pl);
191 /* Skip parameter */ 191 /* Skip parameter */
192 return -1; 192 return -1;
193 } 193 }
@@ -218,7 +218,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
218 if (len < (2+p.pl)) { 218 if (len < (2+p.pl)) {
219 IRDA_WARNING("%s: buffer too short for parsing! " 219 IRDA_WARNING("%s: buffer too short for parsing! "
220 "Need %d bytes, but len is only %d\n", 220 "Need %d bytes, but len is only %d\n",
221 __FUNCTION__, p.pl, len); 221 __func__, p.pl, len);
222 return -1; 222 return -1;
223 } 223 }
224 224
@@ -230,7 +230,7 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
230 if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) { 230 if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) {
231 IRDA_ERROR("%s: invalid parameter length! " 231 IRDA_ERROR("%s: invalid parameter length! "
232 "Expected %d bytes, but value had %d bytes!\n", 232 "Expected %d bytes, but value had %d bytes!\n",
233 __FUNCTION__, type & PV_MASK, p.pl); 233 __func__, type & PV_MASK, p.pl);
234 234
235 /* Most parameters are bit/byte fields or little endian, 235 /* Most parameters are bit/byte fields or little endian,
236 * so it's ok to only extract a subset of it (the subset 236 * so it's ok to only extract a subset of it (the subset
@@ -268,13 +268,13 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
268 break; 268 break;
269 default: 269 default:
270 IRDA_WARNING("%s: length %d not supported\n", 270 IRDA_WARNING("%s: length %d not supported\n",
271 __FUNCTION__, p.pl); 271 __func__, p.pl);
272 272
273 /* Skip parameter */ 273 /* Skip parameter */
274 return p.pl+2; 274 return p.pl+2;
275 } 275 }
276 276
277 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__, 277 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
278 p.pi, p.pl, p.pv.i); 278 p.pi, p.pl, p.pv.i);
279 /* Call handler for this parameter */ 279 /* Call handler for this parameter */
280 err = (*func)(self, &p, PV_PUT); 280 err = (*func)(self, &p, PV_PUT);
@@ -294,19 +294,19 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
294 irda_param_t p; 294 irda_param_t p;
295 int err; 295 int err;
296 296
297 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 297 IRDA_DEBUG(2, "%s()\n", __func__);
298 298
299 p.pi = pi; /* In case handler needs to know */ 299 p.pi = pi; /* In case handler needs to know */
300 p.pl = buf[1]; /* Extract length of value */ 300 p.pl = buf[1]; /* Extract length of value */
301 301
302 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __FUNCTION__, 302 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __func__,
303 p.pi, p.pl); 303 p.pi, p.pl);
304 304
305 /* Check if buffer is long enough for parsing */ 305 /* Check if buffer is long enough for parsing */
306 if (len < (2+p.pl)) { 306 if (len < (2+p.pl)) {
307 IRDA_WARNING("%s: buffer too short for parsing! " 307 IRDA_WARNING("%s: buffer too short for parsing! "
308 "Need %d bytes, but len is only %d\n", 308 "Need %d bytes, but len is only %d\n",
309 __FUNCTION__, p.pl, len); 309 __func__, p.pl, len);
310 return -1; 310 return -1;
311 } 311 }
312 312
@@ -314,7 +314,7 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
314 * checked that the buffer is long enough */ 314 * checked that the buffer is long enough */
315 strncpy(str, buf+2, p.pl); 315 strncpy(str, buf+2, p.pl);
316 316
317 IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __FUNCTION__, 317 IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __func__,
318 (__u8) str[0], (__u8) str[1]); 318 (__u8) str[0], (__u8) str[1]);
319 319
320 /* Null terminate string */ 320 /* Null terminate string */
@@ -345,11 +345,11 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
345 if (len < (2+p.pl)) { 345 if (len < (2+p.pl)) {
346 IRDA_WARNING("%s: buffer too short for parsing! " 346 IRDA_WARNING("%s: buffer too short for parsing! "
347 "Need %d bytes, but len is only %d\n", 347 "Need %d bytes, but len is only %d\n",
348 __FUNCTION__, p.pl, len); 348 __func__, p.pl, len);
349 return -1; 349 return -1;
350 } 350 }
351 351
352 IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__); 352 IRDA_DEBUG(0, "%s(), not impl\n", __func__);
353 353
354 return p.pl+2; /* Extracted pl+2 bytes */ 354 return p.pl+2; /* Extracted pl+2 bytes */
355} 355}
@@ -473,7 +473,7 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
473 (pi_minor > info->tables[pi_major].len-1)) 473 (pi_minor > info->tables[pi_major].len-1))
474 { 474 {
475 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", 475 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
476 __FUNCTION__, pi); 476 __func__, pi);
477 477
478 /* Skip this parameter */ 478 /* Skip this parameter */
479 return -1; 479 return -1;
@@ -487,7 +487,7 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
487 487
488 /* Check if handler has been implemented */ 488 /* Check if handler has been implemented */
489 if (!pi_minor_info->func) { 489 if (!pi_minor_info->func) {
490 IRDA_MESSAGE("%s: no handler for pi=%#x\n", __FUNCTION__, pi); 490 IRDA_MESSAGE("%s: no handler for pi=%#x\n", __func__, pi);
491 /* Skip this parameter */ 491 /* Skip this parameter */
492 return -1; 492 return -1;
493 } 493 }
@@ -527,7 +527,7 @@ static int irda_param_extract(void *self, __u8 *buf, int len,
527 (pi_minor > info->tables[pi_major].len-1)) 527 (pi_minor > info->tables[pi_major].len-1))
528 { 528 {
529 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", 529 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
530 __FUNCTION__, buf[0]); 530 __func__, buf[0]);
531 531
532 /* Skip this parameter */ 532 /* Skip this parameter */
533 return 2 + buf[n + 1]; /* Continue */ 533 return 2 + buf[n + 1]; /* Continue */
@@ -539,13 +539,13 @@ static int irda_param_extract(void *self, __u8 *buf, int len,
539 /* Find expected data type for this parameter identifier (pi)*/ 539 /* Find expected data type for this parameter identifier (pi)*/
540 type = pi_minor_info->type; 540 type = pi_minor_info->type;
541 541
542 IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __FUNCTION__, 542 IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __func__,
543 pi_major, pi_minor, type); 543 pi_major, pi_minor, type);
544 544
545 /* Check if handler has been implemented */ 545 /* Check if handler has been implemented */
546 if (!pi_minor_info->func) { 546 if (!pi_minor_info->func) {
547 IRDA_MESSAGE("%s: no handler for pi=%#x\n", 547 IRDA_MESSAGE("%s: no handler for pi=%#x\n",
548 __FUNCTION__, buf[n]); 548 __func__, buf[n]);
549 /* Skip this parameter */ 549 /* Skip this parameter */
550 return 2 + buf[n + 1]; /* Continue */ 550 return 2 + buf[n + 1]; /* Continue */
551 } 551 }
diff --git a/net/irda/qos.c b/net/irda/qos.c
index aeb18cf1dcae..2b00974e5bae 100644
--- a/net/irda/qos.c
+++ b/net/irda/qos.c
@@ -201,7 +201,7 @@ static int msb_index (__u16 word)
201 * it's very likely the peer. - Jean II */ 201 * it's very likely the peer. - Jean II */
202 if (word == 0) { 202 if (word == 0) {
203 IRDA_WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n", 203 IRDA_WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n",
204 __FUNCTION__); 204 __func__);
205 /* The only safe choice (we don't know the array size) */ 205 /* The only safe choice (we don't know the array size) */
206 word = 0x1; 206 word = 0x1;
207 } 207 }
@@ -342,7 +342,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
342 __u32 line_capacity; 342 __u32 line_capacity;
343 int index; 343 int index;
344 344
345 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 345 IRDA_DEBUG(2, "%s()\n", __func__);
346 346
347 /* 347 /*
348 * Make sure the mintt is sensible. 348 * Make sure the mintt is sensible.
@@ -352,7 +352,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
352 int i; 352 int i;
353 353
354 IRDA_WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n", 354 IRDA_WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n",
355 __FUNCTION__, sysctl_min_tx_turn_time); 355 __func__, sysctl_min_tx_turn_time);
356 356
357 /* We don't really need bits, but easier this way */ 357 /* We don't really need bits, but easier this way */
358 i = value_highest_bit(sysctl_min_tx_turn_time, min_turn_times, 358 i = value_highest_bit(sysctl_min_tx_turn_time, min_turn_times,
@@ -370,7 +370,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
370 { 370 {
371 IRDA_DEBUG(0, 371 IRDA_DEBUG(0,
372 "%s(), adjusting max turn time from %d to 500 ms\n", 372 "%s(), adjusting max turn time from %d to 500 ms\n",
373 __FUNCTION__, qos->max_turn_time.value); 373 __func__, qos->max_turn_time.value);
374 qos->max_turn_time.value = 500; 374 qos->max_turn_time.value = 500;
375 } 375 }
376 376
@@ -386,7 +386,7 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
386 while ((qos->data_size.value > line_capacity) && (index > 0)) { 386 while ((qos->data_size.value > line_capacity) && (index > 0)) {
387 qos->data_size.value = data_sizes[index--]; 387 qos->data_size.value = data_sizes[index--];
388 IRDA_DEBUG(2, "%s(), reducing data size to %d\n", 388 IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
389 __FUNCTION__, qos->data_size.value); 389 __func__, qos->data_size.value);
390 } 390 }
391#else /* Use method described in section 6.6.11 of IrLAP */ 391#else /* Use method described in section 6.6.11 of IrLAP */
392 while (irlap_requested_line_capacity(qos) > line_capacity) { 392 while (irlap_requested_line_capacity(qos) > line_capacity) {
@@ -396,14 +396,14 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
396 if (qos->window_size.value > 1) { 396 if (qos->window_size.value > 1) {
397 qos->window_size.value--; 397 qos->window_size.value--;
398 IRDA_DEBUG(2, "%s(), reducing window size to %d\n", 398 IRDA_DEBUG(2, "%s(), reducing window size to %d\n",
399 __FUNCTION__, qos->window_size.value); 399 __func__, qos->window_size.value);
400 } else if (index > 1) { 400 } else if (index > 1) {
401 qos->data_size.value = data_sizes[index--]; 401 qos->data_size.value = data_sizes[index--];
402 IRDA_DEBUG(2, "%s(), reducing data size to %d\n", 402 IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
403 __FUNCTION__, qos->data_size.value); 403 __func__, qos->data_size.value);
404 } else { 404 } else {
405 IRDA_WARNING("%s(), nothing more we can do!\n", 405 IRDA_WARNING("%s(), nothing more we can do!\n",
406 __FUNCTION__); 406 __func__);
407 } 407 }
408 } 408 }
409#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */ 409#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
@@ -538,7 +538,7 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get)
538 if (get) { 538 if (get) {
539 param->pv.i = self->qos_rx.baud_rate.bits; 539 param->pv.i = self->qos_rx.baud_rate.bits;
540 IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n", 540 IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n",
541 __FUNCTION__, param->pv.i); 541 __func__, param->pv.i);
542 } else { 542 } else {
543 /* 543 /*
544 * Stations must agree on baud rate, so calculate 544 * Stations must agree on baud rate, so calculate
@@ -711,7 +711,7 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
711 int i,j; 711 int i,j;
712 712
713 IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n", 713 IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n",
714 __FUNCTION__, speed, max_turn_time); 714 __func__, speed, max_turn_time);
715 715
716 i = value_index(speed, baud_rates, 10); 716 i = value_index(speed, baud_rates, 10);
717 j = value_index(max_turn_time, max_turn_times, 4); 717 j = value_index(max_turn_time, max_turn_times, 4);
@@ -722,7 +722,7 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
722 line_capacity = max_line_capacities[i][j]; 722 line_capacity = max_line_capacities[i][j];
723 723
724 IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n", 724 IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n",
725 __FUNCTION__, line_capacity); 725 __func__, line_capacity);
726 726
727 return line_capacity; 727 return line_capacity;
728} 728}
@@ -738,7 +738,7 @@ static __u32 irlap_requested_line_capacity(struct qos_info *qos)
738 qos->min_turn_time.value); 738 qos->min_turn_time.value);
739 739
740 IRDA_DEBUG(2, "%s(), requested line capacity=%d\n", 740 IRDA_DEBUG(2, "%s(), requested line capacity=%d\n",
741 __FUNCTION__, line_capacity); 741 __func__, line_capacity);
742 742
743 return line_capacity; 743 return line_capacity;
744} 744}
diff --git a/net/irda/wrapper.c b/net/irda/wrapper.c
index c246983308b8..fd0995b1323a 100644
--- a/net/irda/wrapper.c
+++ b/net/irda/wrapper.c
@@ -106,16 +106,16 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize)
106 * Nothing to worry about, but we set the default number of 106 * Nothing to worry about, but we set the default number of
107 * BOF's 107 * BOF's
108 */ 108 */
109 IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __FUNCTION__); 109 IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __func__);
110 xbofs = 10; 110 xbofs = 10;
111 } else 111 } else
112 xbofs = cb->xbofs + cb->xbofs_delay; 112 xbofs = cb->xbofs + cb->xbofs_delay;
113 113
114 IRDA_DEBUG(4, "%s(), xbofs=%d\n", __FUNCTION__, xbofs); 114 IRDA_DEBUG(4, "%s(), xbofs=%d\n", __func__, xbofs);
115 115
116 /* Check that we never use more than 115 + 48 xbofs */ 116 /* Check that we never use more than 115 + 48 xbofs */
117 if (xbofs > 163) { 117 if (xbofs > 163) {
118 IRDA_DEBUG(0, "%s(), too many xbofs (%d)\n", __FUNCTION__, 118 IRDA_DEBUG(0, "%s(), too many xbofs (%d)\n", __func__,
119 xbofs); 119 xbofs);
120 xbofs = 163; 120 xbofs = 163;
121 } 121 }
@@ -135,7 +135,7 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize)
135 */ 135 */
136 if(n >= (buffsize-5)) { 136 if(n >= (buffsize-5)) {
137 IRDA_ERROR("%s(), tx buffer overflow (n=%d)\n", 137 IRDA_ERROR("%s(), tx buffer overflow (n=%d)\n",
138 __FUNCTION__, n); 138 __func__, n);
139 return n; 139 return n;
140 } 140 }
141 141
@@ -287,7 +287,7 @@ async_unwrap_bof(struct net_device *dev,
287 /* Not supposed to happen, the previous frame is not 287 /* Not supposed to happen, the previous frame is not
288 * finished - Jean II */ 288 * finished - Jean II */
289 IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n", 289 IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n",
290 __FUNCTION__); 290 __func__);
291 stats->rx_errors++; 291 stats->rx_errors++;
292 stats->rx_missed_errors++; 292 stats->rx_missed_errors++;
293 irda_device_set_media_busy(dev, TRUE); 293 irda_device_set_media_busy(dev, TRUE);
@@ -360,7 +360,7 @@ async_unwrap_eof(struct net_device *dev,
360 /* Wrong CRC, discard frame! */ 360 /* Wrong CRC, discard frame! */
361 irda_device_set_media_busy(dev, TRUE); 361 irda_device_set_media_busy(dev, TRUE);
362 362
363 IRDA_DEBUG(1, "%s(), crc error\n", __FUNCTION__); 363 IRDA_DEBUG(1, "%s(), crc error\n", __func__);
364 stats->rx_errors++; 364 stats->rx_errors++;
365 stats->rx_crc_errors++; 365 stats->rx_crc_errors++;
366 } 366 }
@@ -386,7 +386,7 @@ async_unwrap_ce(struct net_device *dev,
386 break; 386 break;
387 387
388 case LINK_ESCAPE: 388 case LINK_ESCAPE:
389 IRDA_WARNING("%s: state not defined\n", __FUNCTION__); 389 IRDA_WARNING("%s: state not defined\n", __func__);
390 break; 390 break;
391 391
392 case BEGIN_FRAME: 392 case BEGIN_FRAME:
@@ -421,7 +421,7 @@ async_unwrap_other(struct net_device *dev,
421#endif 421#endif
422 } else { 422 } else {
423 IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n", 423 IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n",
424 __FUNCTION__); 424 __func__);
425 rx_buff->state = OUTSIDE_FRAME; 425 rx_buff->state = OUTSIDE_FRAME;
426 } 426 }
427 break; 427 break;
@@ -440,7 +440,7 @@ async_unwrap_other(struct net_device *dev,
440 rx_buff->state = INSIDE_FRAME; 440 rx_buff->state = INSIDE_FRAME;
441 } else { 441 } else {
442 IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n", 442 IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n",
443 __FUNCTION__); 443 __func__);
444 rx_buff->state = OUTSIDE_FRAME; 444 rx_buff->state = OUTSIDE_FRAME;
445 } 445 }
446 break; 446 break;
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 46cf962f7f88..f93b57618582 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -185,7 +185,7 @@ static int llc_ui_release(struct socket *sock)
185 sock_hold(sk); 185 sock_hold(sk);
186 lock_sock(sk); 186 lock_sock(sk);
187 llc = llc_sk(sk); 187 llc = llc_sk(sk);
188 dprintk("%s: closing local(%02X) remote(%02X)\n", __FUNCTION__, 188 dprintk("%s: closing local(%02X) remote(%02X)\n", __func__,
189 llc->laddr.lsap, llc->daddr.lsap); 189 llc->laddr.lsap, llc->daddr.lsap);
190 if (!llc_send_disc(sk)) 190 if (!llc_send_disc(sk))
191 llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo); 191 llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo);
@@ -295,7 +295,7 @@ static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)
295 struct llc_sap *sap; 295 struct llc_sap *sap;
296 int rc = -EINVAL; 296 int rc = -EINVAL;
297 297
298 dprintk("%s: binding %02X\n", __FUNCTION__, addr->sllc_sap); 298 dprintk("%s: binding %02X\n", __func__, addr->sllc_sap);
299 if (unlikely(!sock_flag(sk, SOCK_ZAPPED) || addrlen != sizeof(*addr))) 299 if (unlikely(!sock_flag(sk, SOCK_ZAPPED) || addrlen != sizeof(*addr)))
300 goto out; 300 goto out;
301 rc = -EAFNOSUPPORT; 301 rc = -EAFNOSUPPORT;
@@ -432,7 +432,7 @@ static int llc_ui_connect(struct socket *sock, struct sockaddr *uaddr,
432 rc = llc_establish_connection(sk, llc->dev->dev_addr, 432 rc = llc_establish_connection(sk, llc->dev->dev_addr,
433 addr->sllc_mac, addr->sllc_sap); 433 addr->sllc_mac, addr->sllc_sap);
434 if (rc) { 434 if (rc) {
435 dprintk("%s: llc_ui_send_conn failed :-(\n", __FUNCTION__); 435 dprintk("%s: llc_ui_send_conn failed :-(\n", __func__);
436 sock->state = SS_UNCONNECTED; 436 sock->state = SS_UNCONNECTED;
437 sk->sk_state = TCP_CLOSE; 437 sk->sk_state = TCP_CLOSE;
438 goto out; 438 goto out;
@@ -604,7 +604,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags)
604 struct sk_buff *skb; 604 struct sk_buff *skb;
605 int rc = -EOPNOTSUPP; 605 int rc = -EOPNOTSUPP;
606 606
607 dprintk("%s: accepting on %02X\n", __FUNCTION__, 607 dprintk("%s: accepting on %02X\n", __func__,
608 llc_sk(sk)->laddr.lsap); 608 llc_sk(sk)->laddr.lsap);
609 lock_sock(sk); 609 lock_sock(sk);
610 if (unlikely(sk->sk_type != SOCK_STREAM)) 610 if (unlikely(sk->sk_type != SOCK_STREAM))
@@ -619,7 +619,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags)
619 if (rc) 619 if (rc)
620 goto out; 620 goto out;
621 } 621 }
622 dprintk("%s: got a new connection on %02X\n", __FUNCTION__, 622 dprintk("%s: got a new connection on %02X\n", __func__,
623 llc_sk(sk)->laddr.lsap); 623 llc_sk(sk)->laddr.lsap);
624 skb = skb_dequeue(&sk->sk_receive_queue); 624 skb = skb_dequeue(&sk->sk_receive_queue);
625 rc = -EINVAL; 625 rc = -EINVAL;
@@ -640,7 +640,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags)
640 /* put original socket back into a clean listen state. */ 640 /* put original socket back into a clean listen state. */
641 sk->sk_state = TCP_LISTEN; 641 sk->sk_state = TCP_LISTEN;
642 sk->sk_ack_backlog--; 642 sk->sk_ack_backlog--;
643 dprintk("%s: ok success on %02X, client on %02X\n", __FUNCTION__, 643 dprintk("%s: ok success on %02X, client on %02X\n", __func__,
644 llc_sk(sk)->addr.sllc_sap, newllc->daddr.lsap); 644 llc_sk(sk)->addr.sllc_sap, newllc->daddr.lsap);
645frees: 645frees:
646 kfree_skb(skb); 646 kfree_skb(skb);
@@ -833,7 +833,7 @@ static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock,
833 size_t size = 0; 833 size_t size = 0;
834 int rc = -EINVAL, copied = 0, hdrlen; 834 int rc = -EINVAL, copied = 0, hdrlen;
835 835
836 dprintk("%s: sending from %02X to %02X\n", __FUNCTION__, 836 dprintk("%s: sending from %02X to %02X\n", __func__,
837 llc->laddr.lsap, llc->daddr.lsap); 837 llc->laddr.lsap, llc->daddr.lsap);
838 lock_sock(sk); 838 lock_sock(sk);
839 if (addr) { 839 if (addr) {
@@ -891,7 +891,7 @@ out:
891 kfree_skb(skb); 891 kfree_skb(skb);
892release: 892release:
893 dprintk("%s: failed sending from %02X to %02X: %d\n", 893 dprintk("%s: failed sending from %02X to %02X: %d\n",
894 __FUNCTION__, llc->laddr.lsap, llc->daddr.lsap, rc); 894 __func__, llc->laddr.lsap, llc->daddr.lsap, rc);
895 } 895 }
896 release_sock(sk); 896 release_sock(sk);
897 return rc ? : copied; 897 return rc ? : copied;
diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c
index 860140caa6e0..f728ffe288aa 100644
--- a/net/llc/llc_c_ac.c
+++ b/net/llc/llc_c_ac.c
@@ -1427,7 +1427,7 @@ static void llc_process_tmr_ev(struct sock *sk, struct sk_buff *skb)
1427{ 1427{
1428 if (llc_sk(sk)->state == LLC_CONN_OUT_OF_SVC) { 1428 if (llc_sk(sk)->state == LLC_CONN_OUT_OF_SVC) {
1429 printk(KERN_WARNING "%s: timer called on closed connection\n", 1429 printk(KERN_WARNING "%s: timer called on closed connection\n",
1430 __FUNCTION__); 1430 __func__);
1431 kfree_skb(skb); 1431 kfree_skb(skb);
1432 } else { 1432 } else {
1433 if (!sock_owned_by_user(sk)) 1433 if (!sock_owned_by_user(sk))
diff --git a/net/llc/llc_c_ev.c b/net/llc/llc_c_ev.c
index c5deda246614..523fdd1cf781 100644
--- a/net/llc/llc_c_ev.c
+++ b/net/llc/llc_c_ev.c
@@ -228,7 +228,7 @@ int llc_conn_ev_rx_i_cmd_pbit_set_x_inval_ns(struct sock *sk,
228 llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1; 228 llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
229 if (!rc) 229 if (!rc)
230 dprintk("%s: matched, state=%d, ns=%d, vr=%d\n", 230 dprintk("%s: matched, state=%d, ns=%d, vr=%d\n",
231 __FUNCTION__, llc_sk(sk)->state, ns, vr); 231 __func__, llc_sk(sk)->state, ns, vr);
232 return rc; 232 return rc;
233} 233}
234 234
@@ -306,7 +306,7 @@ int llc_conn_ev_rx_i_rsp_fbit_set_x_inval_ns(struct sock *sk,
306 llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1; 306 llc_util_ns_inside_rx_window(ns, vr, llc_sk(sk)->rw) ? 0 : 1;
307 if (!rc) 307 if (!rc)
308 dprintk("%s: matched, state=%d, ns=%d, vr=%d\n", 308 dprintk("%s: matched, state=%d, ns=%d, vr=%d\n",
309 __FUNCTION__, llc_sk(sk)->state, ns, vr); 309 __func__, llc_sk(sk)->state, ns, vr);
310 return rc; 310 return rc;
311} 311}
312 312
@@ -511,7 +511,7 @@ int llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr(struct sock *sk,
511 (LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu)) && 511 (LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu)) &&
512 nr != vs && llc_util_nr_inside_tx_window(sk, nr)) { 512 nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
513 dprintk("%s: matched, state=%d, vs=%d, nr=%d\n", 513 dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
514 __FUNCTION__, llc_sk(sk)->state, vs, nr); 514 __func__, llc_sk(sk)->state, vs, nr);
515 rc = 0; 515 rc = 0;
516 } 516 }
517 return rc; 517 return rc;
@@ -530,7 +530,7 @@ int llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nr(struct sock *sk,
530 nr != vs && llc_util_nr_inside_tx_window(sk, nr)) { 530 nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
531 rc = 0; 531 rc = 0;
532 dprintk("%s: matched, state=%d, vs=%d, nr=%d\n", 532 dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
533 __FUNCTION__, llc_sk(sk)->state, vs, nr); 533 __func__, llc_sk(sk)->state, vs, nr);
534 } 534 }
535 return rc; 535 return rc;
536} 536}
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c
index 441bc18f996d..5ebfd93ff5e7 100644
--- a/net/llc/llc_conn.c
+++ b/net/llc/llc_conn.c
@@ -73,7 +73,7 @@ int llc_conn_state_process(struct sock *sk, struct sk_buff *skb)
73 */ 73 */
74 rc = llc_conn_service(skb->sk, skb); 74 rc = llc_conn_service(skb->sk, skb);
75 if (unlikely(rc != 0)) { 75 if (unlikely(rc != 0)) {
76 printk(KERN_ERR "%s: llc_conn_service failed\n", __FUNCTION__); 76 printk(KERN_ERR "%s: llc_conn_service failed\n", __func__);
77 goto out_kfree_skb; 77 goto out_kfree_skb;
78 } 78 }
79 79
@@ -99,7 +99,7 @@ int llc_conn_state_process(struct sock *sk, struct sk_buff *skb)
99 * shouldn't happen 99 * shouldn't happen
100 */ 100 */
101 printk(KERN_ERR "%s: sock_queue_rcv_skb failed!\n", 101 printk(KERN_ERR "%s: sock_queue_rcv_skb failed!\n",
102 __FUNCTION__); 102 __func__);
103 kfree_skb(skb); 103 kfree_skb(skb);
104 } 104 }
105 break; 105 break;
@@ -132,13 +132,13 @@ int llc_conn_state_process(struct sock *sk, struct sk_buff *skb)
132 * FIXME: 132 * FIXME:
133 * RESET is not being notified to upper layers for now 133 * RESET is not being notified to upper layers for now
134 */ 134 */
135 printk(KERN_INFO "%s: received a reset ind!\n", __FUNCTION__); 135 printk(KERN_INFO "%s: received a reset ind!\n", __func__);
136 kfree_skb(skb); 136 kfree_skb(skb);
137 break; 137 break;
138 default: 138 default:
139 if (ev->ind_prim) { 139 if (ev->ind_prim) {
140 printk(KERN_INFO "%s: received unknown %d prim!\n", 140 printk(KERN_INFO "%s: received unknown %d prim!\n",
141 __FUNCTION__, ev->ind_prim); 141 __func__, ev->ind_prim);
142 kfree_skb(skb); 142 kfree_skb(skb);
143 } 143 }
144 /* No indication */ 144 /* No indication */
@@ -179,12 +179,12 @@ int llc_conn_state_process(struct sock *sk, struct sk_buff *skb)
179 * FIXME: 179 * FIXME:
180 * RESET is not being notified to upper layers for now 180 * RESET is not being notified to upper layers for now
181 */ 181 */
182 printk(KERN_INFO "%s: received a reset conf!\n", __FUNCTION__); 182 printk(KERN_INFO "%s: received a reset conf!\n", __func__);
183 break; 183 break;
184 default: 184 default:
185 if (ev->cfm_prim) { 185 if (ev->cfm_prim) {
186 printk(KERN_INFO "%s: received unknown %d prim!\n", 186 printk(KERN_INFO "%s: received unknown %d prim!\n",
187 __FUNCTION__, ev->cfm_prim); 187 __func__, ev->cfm_prim);
188 break; 188 break;
189 } 189 }
190 goto out_skb_put; /* No confirmation */ 190 goto out_skb_put; /* No confirmation */
@@ -759,7 +759,7 @@ void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb)
759 if (!sock_owned_by_user(sk)) 759 if (!sock_owned_by_user(sk))
760 llc_conn_rcv(sk, skb); 760 llc_conn_rcv(sk, skb);
761 else { 761 else {
762 dprintk("%s: adding to backlog...\n", __FUNCTION__); 762 dprintk("%s: adding to backlog...\n", __func__);
763 llc_set_backlog_type(skb, LLC_PACKET); 763 llc_set_backlog_type(skb, LLC_PACKET);
764 sk_add_backlog(sk, skb); 764 sk_add_backlog(sk, skb);
765 } 765 }
@@ -807,7 +807,7 @@ static int llc_backlog_rcv(struct sock *sk, struct sk_buff *skb)
807 else 807 else
808 goto out_kfree_skb; 808 goto out_kfree_skb;
809 } else { 809 } else {
810 printk(KERN_ERR "%s: invalid skb in backlog\n", __FUNCTION__); 810 printk(KERN_ERR "%s: invalid skb in backlog\n", __func__);
811 goto out_kfree_skb; 811 goto out_kfree_skb;
812 } 812 }
813out: 813out:
@@ -874,7 +874,7 @@ struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct pr
874#ifdef LLC_REFCNT_DEBUG 874#ifdef LLC_REFCNT_DEBUG
875 atomic_inc(&llc_sock_nr); 875 atomic_inc(&llc_sock_nr);
876 printk(KERN_DEBUG "LLC socket %p created in %s, now we have %d alive\n", sk, 876 printk(KERN_DEBUG "LLC socket %p created in %s, now we have %d alive\n", sk,
877 __FUNCTION__, atomic_read(&llc_sock_nr)); 877 __func__, atomic_read(&llc_sock_nr));
878#endif 878#endif
879out: 879out:
880 return sk; 880 return sk;
@@ -894,7 +894,7 @@ void llc_sk_free(struct sock *sk)
894 /* Stop all (possibly) running timers */ 894 /* Stop all (possibly) running timers */
895 llc_conn_ac_stop_all_timers(sk, NULL); 895 llc_conn_ac_stop_all_timers(sk, NULL);
896#ifdef DEBUG_LLC_CONN_ALLOC 896#ifdef DEBUG_LLC_CONN_ALLOC
897 printk(KERN_INFO "%s: unackq=%d, txq=%d\n", __FUNCTION__, 897 printk(KERN_INFO "%s: unackq=%d, txq=%d\n", __func__,
898 skb_queue_len(&llc->pdu_unack_q), 898 skb_queue_len(&llc->pdu_unack_q),
899 skb_queue_len(&sk->sk_write_queue)); 899 skb_queue_len(&sk->sk_write_queue));
900#endif 900#endif
@@ -904,13 +904,13 @@ void llc_sk_free(struct sock *sk)
904#ifdef LLC_REFCNT_DEBUG 904#ifdef LLC_REFCNT_DEBUG
905 if (atomic_read(&sk->sk_refcnt) != 1) { 905 if (atomic_read(&sk->sk_refcnt) != 1) {
906 printk(KERN_DEBUG "Destruction of LLC sock %p delayed in %s, cnt=%d\n", 906 printk(KERN_DEBUG "Destruction of LLC sock %p delayed in %s, cnt=%d\n",
907 sk, __FUNCTION__, atomic_read(&sk->sk_refcnt)); 907 sk, __func__, atomic_read(&sk->sk_refcnt));
908 printk(KERN_DEBUG "%d LLC sockets are still alive\n", 908 printk(KERN_DEBUG "%d LLC sockets are still alive\n",
909 atomic_read(&llc_sock_nr)); 909 atomic_read(&llc_sock_nr));
910 } else { 910 } else {
911 atomic_dec(&llc_sock_nr); 911 atomic_dec(&llc_sock_nr);
912 printk(KERN_DEBUG "LLC socket %p released in %s, %d are still alive\n", sk, 912 printk(KERN_DEBUG "LLC socket %p released in %s, %d are still alive\n", sk,
913 __FUNCTION__, atomic_read(&llc_sock_nr)); 913 __func__, atomic_read(&llc_sock_nr));
914 } 914 }
915#endif 915#endif
916 sock_put(sk); 916 sock_put(sk);
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
index c40c9b2a345a..b9143d2a04e1 100644
--- a/net/llc/llc_input.c
+++ b/net/llc/llc_input.c
@@ -154,7 +154,7 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
154 * receives, do not try to analyse it. 154 * receives, do not try to analyse it.
155 */ 155 */
156 if (unlikely(skb->pkt_type == PACKET_OTHERHOST)) { 156 if (unlikely(skb->pkt_type == PACKET_OTHERHOST)) {
157 dprintk("%s: PACKET_OTHERHOST\n", __FUNCTION__); 157 dprintk("%s: PACKET_OTHERHOST\n", __func__);
158 goto drop; 158 goto drop;
159 } 159 }
160 skb = skb_share_check(skb, GFP_ATOMIC); 160 skb = skb_share_check(skb, GFP_ATOMIC);
@@ -167,7 +167,7 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
167 goto handle_station; 167 goto handle_station;
168 sap = llc_sap_find(pdu->dsap); 168 sap = llc_sap_find(pdu->dsap);
169 if (unlikely(!sap)) {/* unknown SAP */ 169 if (unlikely(!sap)) {/* unknown SAP */
170 dprintk("%s: llc_sap_find(%02X) failed!\n", __FUNCTION__, 170 dprintk("%s: llc_sap_find(%02X) failed!\n", __func__,
171 pdu->dsap); 171 pdu->dsap);
172 goto drop; 172 goto drop;
173 } 173 }
diff --git a/net/mac80211/ieee80211_iface.c b/net/mac80211/ieee80211_iface.c
index 0d6824bca92b..677705046c6d 100644
--- a/net/mac80211/ieee80211_iface.c
+++ b/net/mac80211/ieee80211_iface.c
@@ -165,7 +165,7 @@ void ieee80211_if_set_type(struct net_device *dev, int type)
165 break; 165 break;
166 default: 166 default:
167 printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x", 167 printk(KERN_WARNING "%s: %s: Unknown interface type 0x%x",
168 dev->name, __FUNCTION__, type); 168 dev->name, __func__, type);
169 } 169 }
170 ieee80211_debugfs_change_if_type(sdata, oldtype); 170 ieee80211_debugfs_change_if_type(sdata, oldtype);
171} 171}
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 1aaa2e804b0d..e58cc65728b5 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -619,8 +619,8 @@ void _dbprintk(const char *fmt, ...)
619{ 619{
620} 620}
621 621
622#define kenter(FMT,...) dbgprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__) 622#define kenter(FMT,...) dbgprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
623#define kleave(FMT,...) dbgprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__) 623#define kleave(FMT,...) dbgprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
624#define kdebug(FMT,...) dbgprintk(" "FMT ,##__VA_ARGS__) 624#define kdebug(FMT,...) dbgprintk(" "FMT ,##__VA_ARGS__)
625#define kproto(FMT,...) dbgprintk("### "FMT ,##__VA_ARGS__) 625#define kproto(FMT,...) dbgprintk("### "FMT ,##__VA_ARGS__)
626#define knet(FMT,...) dbgprintk("@@@ "FMT ,##__VA_ARGS__) 626#define knet(FMT,...) dbgprintk("@@@ "FMT ,##__VA_ARGS__)
@@ -671,8 +671,8 @@ do { \
671} while (0) 671} while (0)
672 672
673#else 673#else
674#define _enter(FMT,...) _dbprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__) 674#define _enter(FMT,...) _dbprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
675#define _leave(FMT,...) _dbprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__) 675#define _leave(FMT,...) _dbprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
676#define _debug(FMT,...) _dbprintk(" "FMT ,##__VA_ARGS__) 676#define _debug(FMT,...) _dbprintk(" "FMT ,##__VA_ARGS__)
677#define _proto(FMT,...) _dbprintk("### "FMT ,##__VA_ARGS__) 677#define _proto(FMT,...) _dbprintk("### "FMT ,##__VA_ARGS__)
678#define _net(FMT,...) _dbprintk("@@@ "FMT ,##__VA_ARGS__) 678#define _net(FMT,...) _dbprintk("@@@ "FMT ,##__VA_ARGS__)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index d29f792e0529..422c98aa9d5c 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1330,7 +1330,7 @@ void sctp_assoc_sync_pmtu(struct sctp_association *asoc)
1330 } 1330 }
1331 1331
1332 SCTP_DEBUG_PRINTK("%s: asoc:%p, pmtu:%d, frag_point:%d\n", 1332 SCTP_DEBUG_PRINTK("%s: asoc:%p, pmtu:%d, frag_point:%d\n",
1333 __FUNCTION__, asoc, asoc->pathmtu, asoc->frag_point); 1333 __func__, asoc, asoc->pathmtu, asoc->frag_point);
1334} 1334}
1335 1335
1336/* Should we send a SACK to update our peer? */ 1336/* Should we send a SACK to update our peer? */
@@ -1370,7 +1370,7 @@ void sctp_assoc_rwnd_increase(struct sctp_association *asoc, unsigned len)
1370 } 1370 }
1371 1371
1372 SCTP_DEBUG_PRINTK("%s: asoc %p rwnd increased by %d to (%u, %u) " 1372 SCTP_DEBUG_PRINTK("%s: asoc %p rwnd increased by %d to (%u, %u) "
1373 "- %u\n", __FUNCTION__, asoc, len, asoc->rwnd, 1373 "- %u\n", __func__, asoc, len, asoc->rwnd,
1374 asoc->rwnd_over, asoc->a_rwnd); 1374 asoc->rwnd_over, asoc->a_rwnd);
1375 1375
1376 /* Send a window update SACK if the rwnd has increased by at least the 1376 /* Send a window update SACK if the rwnd has increased by at least the
@@ -1381,7 +1381,7 @@ void sctp_assoc_rwnd_increase(struct sctp_association *asoc, unsigned len)
1381 if (sctp_peer_needs_update(asoc)) { 1381 if (sctp_peer_needs_update(asoc)) {
1382 asoc->a_rwnd = asoc->rwnd; 1382 asoc->a_rwnd = asoc->rwnd;
1383 SCTP_DEBUG_PRINTK("%s: Sending window update SACK- asoc: %p " 1383 SCTP_DEBUG_PRINTK("%s: Sending window update SACK- asoc: %p "
1384 "rwnd: %u a_rwnd: %u\n", __FUNCTION__, 1384 "rwnd: %u a_rwnd: %u\n", __func__,
1385 asoc, asoc->rwnd, asoc->a_rwnd); 1385 asoc, asoc->rwnd, asoc->a_rwnd);
1386 sack = sctp_make_sack(asoc); 1386 sack = sctp_make_sack(asoc);
1387 if (!sack) 1387 if (!sack)
@@ -1410,7 +1410,7 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned len)
1410 asoc->rwnd = 0; 1410 asoc->rwnd = 0;
1411 } 1411 }
1412 SCTP_DEBUG_PRINTK("%s: asoc %p rwnd decreased by %d to (%u, %u)\n", 1412 SCTP_DEBUG_PRINTK("%s: asoc %p rwnd decreased by %d to (%u, %u)\n",
1413 __FUNCTION__, asoc, len, asoc->rwnd, 1413 __func__, asoc, len, asoc->rwnd,
1414 asoc->rwnd_over); 1414 asoc->rwnd_over);
1415} 1415}
1416 1416
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c
index 4d3128f5ccc3..e1f355080026 100644
--- a/net/sctp/chunk.c
+++ b/net/sctp/chunk.c
@@ -189,7 +189,7 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
189 msecs_to_jiffies(sinfo->sinfo_timetolive); 189 msecs_to_jiffies(sinfo->sinfo_timetolive);
190 msg->can_abandon = 1; 190 msg->can_abandon = 1;
191 SCTP_DEBUG_PRINTK("%s: msg:%p expires_at: %ld jiffies:%ld\n", 191 SCTP_DEBUG_PRINTK("%s: msg:%p expires_at: %ld jiffies:%ld\n",
192 __FUNCTION__, msg, msg->expires_at, jiffies); 192 __func__, msg, msg->expires_at, jiffies);
193 } 193 }
194 194
195 max = asoc->frag_point; 195 max = asoc->frag_point;
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 57fe2f81eca8..4db5a75e01ce 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -409,7 +409,7 @@ void sctp_icmp_proto_unreachable(struct sock *sk,
409 struct sctp_association *asoc, 409 struct sctp_association *asoc,
410 struct sctp_transport *t) 410 struct sctp_transport *t)
411{ 411{
412 SCTP_DEBUG_PRINTK("%s\n", __FUNCTION__); 412 SCTP_DEBUG_PRINTK("%s\n", __func__);
413 413
414 sctp_do_sm(SCTP_EVENT_T_OTHER, 414 sctp_do_sm(SCTP_EVENT_T_OTHER,
415 SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH), 415 SCTP_ST_OTHER(SCTP_EVENT_ICMP_PROTO_UNREACH),
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 4862835b0c39..2622215cd357 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -223,7 +223,7 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport,
223 223
224 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, " 224 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, "
225 "src:" NIP6_FMT " dst:" NIP6_FMT "\n", 225 "src:" NIP6_FMT " dst:" NIP6_FMT "\n",
226 __FUNCTION__, skb, skb->len, 226 __func__, skb, skb->len,
227 NIP6(fl.fl6_src), NIP6(fl.fl6_dst)); 227 NIP6(fl.fl6_src), NIP6(fl.fl6_dst));
228 228
229 SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS); 229 SCTP_INC_STATS(SCTP_MIB_OUTSCTPPACKS);
@@ -248,7 +248,7 @@ static struct dst_entry *sctp_v6_get_dst(struct sctp_association *asoc,
248 248
249 249
250 SCTP_DEBUG_PRINTK("%s: DST=" NIP6_FMT " ", 250 SCTP_DEBUG_PRINTK("%s: DST=" NIP6_FMT " ",
251 __FUNCTION__, NIP6(fl.fl6_dst)); 251 __func__, NIP6(fl.fl6_dst));
252 252
253 if (saddr) { 253 if (saddr) {
254 ipv6_addr_copy(&fl.fl6_src, &saddr->v6.sin6_addr); 254 ipv6_addr_copy(&fl.fl6_src, &saddr->v6.sin6_addr);
@@ -310,7 +310,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
310 310
311 SCTP_DEBUG_PRINTK("%s: asoc:%p dst:%p " 311 SCTP_DEBUG_PRINTK("%s: asoc:%p dst:%p "
312 "daddr:" NIP6_FMT " ", 312 "daddr:" NIP6_FMT " ",
313 __FUNCTION__, asoc, dst, NIP6(daddr->v6.sin6_addr)); 313 __func__, asoc, dst, NIP6(daddr->v6.sin6_addr));
314 314
315 if (!asoc) { 315 if (!asoc) {
316 ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, 316 ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL,
@@ -349,7 +349,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
349 } else { 349 } else {
350 printk(KERN_ERR "%s: asoc:%p Could not find a valid source " 350 printk(KERN_ERR "%s: asoc:%p Could not find a valid source "
351 "address for the dest:" NIP6_FMT "\n", 351 "address for the dest:" NIP6_FMT "\n",
352 __FUNCTION__, asoc, NIP6(daddr->v6.sin6_addr)); 352 __func__, asoc, NIP6(daddr->v6.sin6_addr));
353 } 353 }
354 354
355 rcu_read_unlock(); 355 rcu_read_unlock();
diff --git a/net/sctp/output.c b/net/sctp/output.c
index aa700feea76c..cf4f9fb6819d 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -74,7 +74,7 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet,
74{ 74{
75 struct sctp_chunk *chunk = NULL; 75 struct sctp_chunk *chunk = NULL;
76 76
77 SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __FUNCTION__, 77 SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __func__,
78 packet, vtag); 78 packet, vtag);
79 79
80 packet->vtag = vtag; 80 packet->vtag = vtag;
@@ -106,7 +106,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
106 struct sctp_association *asoc = transport->asoc; 106 struct sctp_association *asoc = transport->asoc;
107 size_t overhead; 107 size_t overhead;
108 108
109 SCTP_DEBUG_PRINTK("%s: packet:%p transport:%p\n", __FUNCTION__, 109 SCTP_DEBUG_PRINTK("%s: packet:%p transport:%p\n", __func__,
110 packet, transport); 110 packet, transport);
111 111
112 packet->transport = transport; 112 packet->transport = transport;
@@ -138,7 +138,7 @@ void sctp_packet_free(struct sctp_packet *packet)
138{ 138{
139 struct sctp_chunk *chunk, *tmp; 139 struct sctp_chunk *chunk, *tmp;
140 140
141 SCTP_DEBUG_PRINTK("%s: packet:%p\n", __FUNCTION__, packet); 141 SCTP_DEBUG_PRINTK("%s: packet:%p\n", __func__, packet);
142 142
143 list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) { 143 list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) {
144 list_del_init(&chunk->list); 144 list_del_init(&chunk->list);
@@ -162,7 +162,7 @@ sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *packet,
162 sctp_xmit_t retval; 162 sctp_xmit_t retval;
163 int error = 0; 163 int error = 0;
164 164
165 SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __FUNCTION__, 165 SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __func__,
166 packet, chunk); 166 packet, chunk);
167 167
168 switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) { 168 switch ((retval = (sctp_packet_append_chunk(packet, chunk)))) {
@@ -264,7 +264,7 @@ sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *packet,
264 size_t pmtu; 264 size_t pmtu;
265 int too_big; 265 int too_big;
266 266
267 SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __FUNCTION__, packet, 267 SCTP_DEBUG_PRINTK("%s: packet:%p chunk:%p\n", __func__, packet,
268 chunk); 268 chunk);
269 269
270 /* Try to bundle AUTH chunk */ 270 /* Try to bundle AUTH chunk */
@@ -372,7 +372,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
372 unsigned char *auth = NULL; /* pointer to auth in skb data */ 372 unsigned char *auth = NULL; /* pointer to auth in skb data */
373 __u32 cksum_buf_len = sizeof(struct sctphdr); 373 __u32 cksum_buf_len = sizeof(struct sctphdr);
374 374
375 SCTP_DEBUG_PRINTK("%s: packet:%p\n", __FUNCTION__, packet); 375 SCTP_DEBUG_PRINTK("%s: packet:%p\n", __func__, packet);
376 376
377 /* Do NOT generate a chunkless packet. */ 377 /* Do NOT generate a chunkless packet. */
378 if (list_empty(&packet->chunk_list)) 378 if (list_empty(&packet->chunk_list))
@@ -677,7 +677,7 @@ static sctp_xmit_t sctp_packet_append_data(struct sctp_packet *packet,
677 "transport: %p, cwnd: %d, " 677 "transport: %p, cwnd: %d, "
678 "ssthresh: %d, flight_size: %d, " 678 "ssthresh: %d, flight_size: %d, "
679 "pba: %d\n", 679 "pba: %d\n",
680 __FUNCTION__, transport, 680 __func__, transport,
681 transport->cwnd, 681 transport->cwnd,
682 transport->ssthresh, 682 transport->ssthresh,
683 transport->flight_size, 683 transport->flight_size,
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index fd4deefab3cf..392012f5ab83 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -469,7 +469,7 @@ void sctp_retransmit_mark(struct sctp_outq *q,
469 469
470 SCTP_DEBUG_PRINTK("%s: transport: %p, reason: %d, " 470 SCTP_DEBUG_PRINTK("%s: transport: %p, reason: %d, "
471 "cwnd: %d, ssthresh: %d, flight_size: %d, " 471 "cwnd: %d, ssthresh: %d, flight_size: %d, "
472 "pba: %d\n", __FUNCTION__, 472 "pba: %d\n", __func__,
473 transport, reason, 473 transport, reason,
474 transport->cwnd, transport->ssthresh, 474 transport->cwnd, transport->ssthresh,
475 transport->flight_size, 475 transport->flight_size,
@@ -1206,10 +1206,10 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
1206 sctp_generate_fwdtsn(q, sack_ctsn); 1206 sctp_generate_fwdtsn(q, sack_ctsn);
1207 1207
1208 SCTP_DEBUG_PRINTK("%s: sack Cumulative TSN Ack is 0x%x.\n", 1208 SCTP_DEBUG_PRINTK("%s: sack Cumulative TSN Ack is 0x%x.\n",
1209 __FUNCTION__, sack_ctsn); 1209 __func__, sack_ctsn);
1210 SCTP_DEBUG_PRINTK("%s: Cumulative TSN Ack of association, " 1210 SCTP_DEBUG_PRINTK("%s: Cumulative TSN Ack of association, "
1211 "%p is 0x%x. Adv peer ack point: 0x%x\n", 1211 "%p is 0x%x. Adv peer ack point: 0x%x\n",
1212 __FUNCTION__, asoc, ctsn, asoc->adv_peer_ack_point); 1212 __func__, asoc, ctsn, asoc->adv_peer_ack_point);
1213 1213
1214 /* See if all chunks are acked. 1214 /* See if all chunks are acked.
1215 * Make sure the empty queue handler will get run later. 1215 * Make sure the empty queue handler will get run later.
@@ -1444,7 +1444,7 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1444 if (tchunk->tsn_gap_acked) { 1444 if (tchunk->tsn_gap_acked) {
1445 SCTP_DEBUG_PRINTK("%s: Receiver reneged on " 1445 SCTP_DEBUG_PRINTK("%s: Receiver reneged on "
1446 "data TSN: 0x%x\n", 1446 "data TSN: 0x%x\n",
1447 __FUNCTION__, 1447 __func__,
1448 tsn); 1448 tsn);
1449 tchunk->tsn_gap_acked = 0; 1449 tchunk->tsn_gap_acked = 0;
1450 1450
@@ -1561,7 +1561,7 @@ static void sctp_check_transmitted(struct sctp_outq *q,
1561 (sack_ctsn+2 == q->asoc->next_tsn)) { 1561 (sack_ctsn+2 == q->asoc->next_tsn)) {
1562 SCTP_DEBUG_PRINTK("%s: SACK received for zero " 1562 SCTP_DEBUG_PRINTK("%s: SACK received for zero "
1563 "window probe: %u\n", 1563 "window probe: %u\n",
1564 __FUNCTION__, sack_ctsn); 1564 __func__, sack_ctsn);
1565 q->asoc->overall_error_count = 0; 1565 q->asoc->overall_error_count = 0;
1566 transport->error_count = 0; 1566 transport->error_count = 0;
1567 } 1567 }
@@ -1626,7 +1626,7 @@ static void sctp_mark_missing(struct sctp_outq *q,
1626 1626
1627 SCTP_DEBUG_PRINTK( 1627 SCTP_DEBUG_PRINTK(
1628 "%s: TSN 0x%x missing counter: %d\n", 1628 "%s: TSN 0x%x missing counter: %d\n",
1629 __FUNCTION__, tsn, 1629 __func__, tsn,
1630 chunk->tsn_missing_report); 1630 chunk->tsn_missing_report);
1631 } 1631 }
1632 } 1632 }
@@ -1649,7 +1649,7 @@ static void sctp_mark_missing(struct sctp_outq *q,
1649 1649
1650 SCTP_DEBUG_PRINTK("%s: transport: %p, cwnd: %d, " 1650 SCTP_DEBUG_PRINTK("%s: transport: %p, cwnd: %d, "
1651 "ssthresh: %d, flight_size: %d, pba: %d\n", 1651 "ssthresh: %d, flight_size: %d, pba: %d\n",
1652 __FUNCTION__, transport, transport->cwnd, 1652 __func__, transport, transport->cwnd,
1653 transport->ssthresh, transport->flight_size, 1653 transport->ssthresh, transport->flight_size,
1654 transport->partial_bytes_acked); 1654 transport->partial_bytes_acked);
1655 } 1655 }
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 1afef08f6c1d..87512f14cf71 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -451,7 +451,7 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
451 fl.fl4_src = saddr->v4.sin_addr.s_addr; 451 fl.fl4_src = saddr->v4.sin_addr.s_addr;
452 452
453 SCTP_DEBUG_PRINTK("%s: DST:%u.%u.%u.%u, SRC:%u.%u.%u.%u - ", 453 SCTP_DEBUG_PRINTK("%s: DST:%u.%u.%u.%u, SRC:%u.%u.%u.%u - ",
454 __FUNCTION__, NIPQUAD(fl.fl4_dst), 454 __func__, NIPQUAD(fl.fl4_dst),
455 NIPQUAD(fl.fl4_src)); 455 NIPQUAD(fl.fl4_src));
456 456
457 if (!ip_route_output_key(&init_net, &rt, &fl)) { 457 if (!ip_route_output_key(&init_net, &rt, &fl)) {
@@ -827,7 +827,7 @@ static inline int sctp_v4_xmit(struct sk_buff *skb,
827{ 827{
828 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, " 828 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, "
829 "src:%u.%u.%u.%u, dst:%u.%u.%u.%u\n", 829 "src:%u.%u.%u.%u, dst:%u.%u.%u.%u\n",
830 __FUNCTION__, skb, skb->len, 830 __func__, skb, skb->len,
831 NIPQUAD(skb->rtable->rt_src), 831 NIPQUAD(skb->rtable->rt_src),
832 NIPQUAD(skb->rtable->rt_dst)); 832 NIPQUAD(skb->rtable->rt_dst));
833 833
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 28eb38eb6083..02bf32c30263 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -243,7 +243,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer)
243 243
244 sctp_bh_lock_sock(asoc->base.sk); 244 sctp_bh_lock_sock(asoc->base.sk);
245 if (sock_owned_by_user(asoc->base.sk)) { 245 if (sock_owned_by_user(asoc->base.sk)) {
246 SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __FUNCTION__); 246 SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __func__);
247 247
248 /* Try again later. */ 248 /* Try again later. */
249 if (!mod_timer(&transport->T3_rtx_timer, jiffies + (HZ/20))) 249 if (!mod_timer(&transport->T3_rtx_timer, jiffies + (HZ/20)))
@@ -283,7 +283,7 @@ static void sctp_generate_timeout_event(struct sctp_association *asoc,
283 sctp_bh_lock_sock(asoc->base.sk); 283 sctp_bh_lock_sock(asoc->base.sk);
284 if (sock_owned_by_user(asoc->base.sk)) { 284 if (sock_owned_by_user(asoc->base.sk)) {
285 SCTP_DEBUG_PRINTK("%s:Sock is busy: timer %d\n", 285 SCTP_DEBUG_PRINTK("%s:Sock is busy: timer %d\n",
286 __FUNCTION__, 286 __func__,
287 timeout_type); 287 timeout_type);
288 288
289 /* Try again later. */ 289 /* Try again later. */
@@ -361,7 +361,7 @@ void sctp_generate_heartbeat_event(unsigned long data)
361 361
362 sctp_bh_lock_sock(asoc->base.sk); 362 sctp_bh_lock_sock(asoc->base.sk);
363 if (sock_owned_by_user(asoc->base.sk)) { 363 if (sock_owned_by_user(asoc->base.sk)) {
364 SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __FUNCTION__); 364 SCTP_DEBUG_PRINTK("%s:Sock is busy.\n", __func__);
365 365
366 /* Try again later. */ 366 /* Try again later. */
367 if (!mod_timer(&transport->hb_timer, jiffies + (HZ/20))) 367 if (!mod_timer(&transport->hb_timer, jiffies + (HZ/20)))
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index ade0cbd3a52b..c0c6bee77cf5 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1124,7 +1124,7 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1124 printk(KERN_WARNING 1124 printk(KERN_WARNING
1125 "%s association %p could not find address " 1125 "%s association %p could not find address "
1126 NIP6_FMT "\n", 1126 NIP6_FMT "\n",
1127 __FUNCTION__, 1127 __func__,
1128 asoc, 1128 asoc,
1129 NIP6(from_addr.v6.sin6_addr)); 1129 NIP6(from_addr.v6.sin6_addr));
1130 } else { 1130 } else {
@@ -1132,7 +1132,7 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1132 printk(KERN_WARNING 1132 printk(KERN_WARNING
1133 "%s association %p could not find address " 1133 "%s association %p could not find address "
1134 NIPQUAD_FMT "\n", 1134 NIPQUAD_FMT "\n",
1135 __FUNCTION__, 1135 __func__,
1136 asoc, 1136 asoc,
1137 NIPQUAD(from_addr.v4.sin_addr.s_addr)); 1137 NIPQUAD(from_addr.v4.sin_addr.s_addr));
1138 } 1138 }
@@ -1150,7 +1150,7 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1150 time_after(jiffies, hbinfo->sent_at + max_interval)) { 1150 time_after(jiffies, hbinfo->sent_at + max_interval)) {
1151 SCTP_DEBUG_PRINTK("%s: HEARTBEAT ACK with invalid timestamp " 1151 SCTP_DEBUG_PRINTK("%s: HEARTBEAT ACK with invalid timestamp "
1152 "received for transport: %p\n", 1152 "received for transport: %p\n",
1153 __FUNCTION__, link); 1153 __func__, link);
1154 return SCTP_DISPOSITION_DISCARD; 1154 return SCTP_DISPOSITION_DISCARD;
1155 } 1155 }
1156 1156
@@ -3668,7 +3668,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep,
3668 skb_pull(chunk->skb, len); 3668 skb_pull(chunk->skb, len);
3669 3669
3670 tsn = ntohl(fwdtsn_hdr->new_cum_tsn); 3670 tsn = ntohl(fwdtsn_hdr->new_cum_tsn);
3671 SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __FUNCTION__, tsn); 3671 SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __func__, tsn);
3672 3672
3673 /* The TSN is too high--silently discard the chunk and count on it 3673 /* The TSN is too high--silently discard the chunk and count on it
3674 * getting retransmitted later. 3674 * getting retransmitted later.
@@ -3728,7 +3728,7 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
3728 skb_pull(chunk->skb, len); 3728 skb_pull(chunk->skb, len);
3729 3729
3730 tsn = ntohl(fwdtsn_hdr->new_cum_tsn); 3730 tsn = ntohl(fwdtsn_hdr->new_cum_tsn);
3731 SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __FUNCTION__, tsn); 3731 SCTP_DEBUG_PRINTK("%s: TSN 0x%x.\n", __func__, tsn);
3732 3732
3733 /* The TSN is too high--silently discard the chunk and count on it 3733 /* The TSN is too high--silently discard the chunk and count on it
3734 * getting retransmitted later. 3734 * getting retransmitted later.
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 939892691a26..1316694d0a21 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -525,7 +525,7 @@ static int sctp_send_asconf_add_ip(struct sock *sk,
525 ep = sp->ep; 525 ep = sp->ep;
526 526
527 SCTP_DEBUG_PRINTK("%s: (sk: %p, addrs: %p, addrcnt: %d)\n", 527 SCTP_DEBUG_PRINTK("%s: (sk: %p, addrs: %p, addrcnt: %d)\n",
528 __FUNCTION__, sk, addrs, addrcnt); 528 __func__, sk, addrs, addrcnt);
529 529
530 list_for_each(pos, &ep->asocs) { 530 list_for_each(pos, &ep->asocs) {
531 asoc = list_entry(pos, struct sctp_association, asocs); 531 asoc = list_entry(pos, struct sctp_association, asocs);
@@ -711,7 +711,7 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
711 ep = sp->ep; 711 ep = sp->ep;
712 712
713 SCTP_DEBUG_PRINTK("%s: (sk: %p, addrs: %p, addrcnt: %d)\n", 713 SCTP_DEBUG_PRINTK("%s: (sk: %p, addrs: %p, addrcnt: %d)\n",
714 __FUNCTION__, sk, addrs, addrcnt); 714 __func__, sk, addrs, addrcnt);
715 715
716 list_for_each(pos, &ep->asocs) { 716 list_for_each(pos, &ep->asocs) {
717 asoc = list_entry(pos, struct sctp_association, asocs); 717 asoc = list_entry(pos, struct sctp_association, asocs);
@@ -1197,7 +1197,7 @@ SCTP_STATIC int sctp_setsockopt_connectx(struct sock* sk,
1197 struct sockaddr *kaddrs; 1197 struct sockaddr *kaddrs;
1198 1198
1199 SCTP_DEBUG_PRINTK("%s - sk %p addrs %p addrs_size %d\n", 1199 SCTP_DEBUG_PRINTK("%s - sk %p addrs %p addrs_size %d\n",
1200 __FUNCTION__, sk, addrs, addrs_size); 1200 __func__, sk, addrs, addrs_size);
1201 1201
1202 if (unlikely(addrs_size <= 0)) 1202 if (unlikely(addrs_size <= 0))
1203 return -EINVAL; 1203 return -EINVAL;
@@ -3280,7 +3280,7 @@ SCTP_STATIC int sctp_connect(struct sock *sk, struct sockaddr *addr,
3280 sctp_lock_sock(sk); 3280 sctp_lock_sock(sk);
3281 3281
3282 SCTP_DEBUG_PRINTK("%s - sk: %p, sockaddr: %p, addr_len: %d\n", 3282 SCTP_DEBUG_PRINTK("%s - sk: %p, sockaddr: %p, addr_len: %d\n",
3283 __FUNCTION__, sk, addr, addr_len); 3283 __func__, sk, addr, addr_len);
3284 3284
3285 /* Validate addr_len before calling common connect/connectx routine. */ 3285 /* Validate addr_len before calling common connect/connectx routine. */
3286 af = sctp_get_af_specific(addr->sa_family); 3286 af = sctp_get_af_specific(addr->sa_family);
@@ -3801,7 +3801,7 @@ static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval
3801 goto out; 3801 goto out;
3802 } 3802 }
3803 3803
3804 SCTP_DEBUG_PRINTK("%s: sk: %p asoc: %p\n", __FUNCTION__, sk, asoc); 3804 SCTP_DEBUG_PRINTK("%s: sk: %p asoc: %p\n", __func__, sk, asoc);
3805 3805
3806 retval = sctp_do_peeloff(asoc, &newsock); 3806 retval = sctp_do_peeloff(asoc, &newsock);
3807 if (retval < 0) 3807 if (retval < 0)
@@ -3815,7 +3815,7 @@ static int sctp_getsockopt_peeloff(struct sock *sk, int len, char __user *optval
3815 } 3815 }
3816 3816
3817 SCTP_DEBUG_PRINTK("%s: sk: %p asoc: %p newsk: %p sd: %d\n", 3817 SCTP_DEBUG_PRINTK("%s: sk: %p asoc: %p newsk: %p sd: %d\n",
3818 __FUNCTION__, sk, asoc, newsock->sk, retval); 3818 __func__, sk, asoc, newsock->sk, retval);
3819 3819
3820 /* Return the fd mapped to the new socket. */ 3820 /* Return the fd mapped to the new socket. */
3821 peeloff.sd = retval; 3821 peeloff.sd = retval;
@@ -6186,7 +6186,7 @@ static int sctp_wait_for_connect(struct sctp_association *asoc, long *timeo_p)
6186 long current_timeo = *timeo_p; 6186 long current_timeo = *timeo_p;
6187 DEFINE_WAIT(wait); 6187 DEFINE_WAIT(wait);
6188 6188
6189 SCTP_DEBUG_PRINTK("%s: asoc=%p, timeo=%ld\n", __FUNCTION__, asoc, 6189 SCTP_DEBUG_PRINTK("%s: asoc=%p, timeo=%ld\n", __func__, asoc,
6190 (long)(*timeo_p)); 6190 (long)(*timeo_p));
6191 6191
6192 /* Increment the association's refcnt. */ 6192 /* Increment the association's refcnt. */
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index d9f8af852b56..f4938f6c5abe 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -260,7 +260,7 @@ void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu)
260 if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) { 260 if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) {
261 printk(KERN_WARNING "%s: Reported pmtu %d too low, " 261 printk(KERN_WARNING "%s: Reported pmtu %d too low, "
262 "using default minimum of %d\n", 262 "using default minimum of %d\n",
263 __FUNCTION__, pmtu, 263 __func__, pmtu,
264 SCTP_DEFAULT_MINSEGMENT); 264 SCTP_DEFAULT_MINSEGMENT);
265 /* Use default minimum segment size and disable 265 /* Use default minimum segment size and disable
266 * pmtu discovery on this transport. 266 * pmtu discovery on this transport.
@@ -388,7 +388,7 @@ void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt)
388 tp->rto_pending = 0; 388 tp->rto_pending = 0;
389 389
390 SCTP_DEBUG_PRINTK("%s: transport: %p, rtt: %d, srtt: %d " 390 SCTP_DEBUG_PRINTK("%s: transport: %p, rtt: %d, srtt: %d "
391 "rttvar: %d, rto: %ld\n", __FUNCTION__, 391 "rttvar: %d, rto: %ld\n", __func__,
392 tp, rtt, tp->srtt, tp->rttvar, tp->rto); 392 tp, rtt, tp->srtt, tp->rttvar, tp->rto);
393} 393}
394 394
@@ -434,7 +434,7 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport,
434 SCTP_DEBUG_PRINTK("%s: SLOW START: transport: %p, " 434 SCTP_DEBUG_PRINTK("%s: SLOW START: transport: %p, "
435 "bytes_acked: %d, cwnd: %d, ssthresh: %d, " 435 "bytes_acked: %d, cwnd: %d, ssthresh: %d, "
436 "flight_size: %d, pba: %d\n", 436 "flight_size: %d, pba: %d\n",
437 __FUNCTION__, 437 __func__,
438 transport, bytes_acked, cwnd, 438 transport, bytes_acked, cwnd,
439 ssthresh, flight_size, pba); 439 ssthresh, flight_size, pba);
440 } else { 440 } else {
@@ -460,7 +460,7 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport,
460 SCTP_DEBUG_PRINTK("%s: CONGESTION AVOIDANCE: " 460 SCTP_DEBUG_PRINTK("%s: CONGESTION AVOIDANCE: "
461 "transport: %p, bytes_acked: %d, cwnd: %d, " 461 "transport: %p, bytes_acked: %d, cwnd: %d, "
462 "ssthresh: %d, flight_size: %d, pba: %d\n", 462 "ssthresh: %d, flight_size: %d, pba: %d\n",
463 __FUNCTION__, 463 __func__,
464 transport, bytes_acked, cwnd, 464 transport, bytes_acked, cwnd,
465 ssthresh, flight_size, pba); 465 ssthresh, flight_size, pba);
466 } 466 }
@@ -546,7 +546,7 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport,
546 546
547 transport->partial_bytes_acked = 0; 547 transport->partial_bytes_acked = 0;
548 SCTP_DEBUG_PRINTK("%s: transport: %p reason: %d cwnd: " 548 SCTP_DEBUG_PRINTK("%s: transport: %p reason: %d cwnd: "
549 "%d ssthresh: %d\n", __FUNCTION__, 549 "%d ssthresh: %d\n", __func__,
550 transport, reason, 550 transport, reason,
551 transport->cwnd, transport->ssthresh); 551 transport->cwnd, transport->ssthresh);
552} 552}
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 6dac38792288..5828e5c060ca 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -625,7 +625,7 @@ gss_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
625 gss_auth->mech = gss_mech_get_by_pseudoflavor(flavor); 625 gss_auth->mech = gss_mech_get_by_pseudoflavor(flavor);
626 if (!gss_auth->mech) { 626 if (!gss_auth->mech) {
627 printk(KERN_WARNING "%s: Pseudoflavor %d not found!\n", 627 printk(KERN_WARNING "%s: Pseudoflavor %d not found!\n",
628 __FUNCTION__, flavor); 628 __func__, flavor);
629 goto err_free; 629 goto err_free;
630 } 630 }
631 gss_auth->service = gss_pseudoflavor_to_service(gss_auth->mech, flavor); 631 gss_auth->service = gss_pseudoflavor_to_service(gss_auth->mech, flavor);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 8c6a7f1a25e9..13a3718e7cc9 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -43,7 +43,7 @@
43 43
44#define dprint_status(t) \ 44#define dprint_status(t) \
45 dprintk("RPC: %5u %s (status %d)\n", t->tk_pid, \ 45 dprintk("RPC: %5u %s (status %d)\n", t->tk_pid, \
46 __FUNCTION__, t->tk_status) 46 __func__, t->tk_status)
47 47
48/* 48/*
49 * All RPC clients are linked into this list 49 * All RPC clients are linked into this list
@@ -372,7 +372,7 @@ out_no_path:
372out_no_stats: 372out_no_stats:
373 kfree(new); 373 kfree(new);
374out_no_clnt: 374out_no_clnt:
375 dprintk("RPC: %s: returned error %d\n", __FUNCTION__, err); 375 dprintk("RPC: %s: returned error %d\n", __func__, err);
376 return ERR_PTR(err); 376 return ERR_PTR(err);
377} 377}
378EXPORT_SYMBOL_GPL(rpc_clone_client); 378EXPORT_SYMBOL_GPL(rpc_clone_client);
@@ -756,7 +756,7 @@ call_reserveresult(struct rpc_task *task)
756 } 756 }
757 757
758 printk(KERN_ERR "%s: status=%d, but no request slot, exiting\n", 758 printk(KERN_ERR "%s: status=%d, but no request slot, exiting\n",
759 __FUNCTION__, status); 759 __func__, status);
760 rpc_exit(task, -EIO); 760 rpc_exit(task, -EIO);
761 return; 761 return;
762 } 762 }
@@ -767,7 +767,7 @@ call_reserveresult(struct rpc_task *task)
767 */ 767 */
768 if (task->tk_rqstp) { 768 if (task->tk_rqstp) {
769 printk(KERN_ERR "%s: status=%d, request allocated anyway\n", 769 printk(KERN_ERR "%s: status=%d, request allocated anyway\n",
770 __FUNCTION__, status); 770 __func__, status);
771 xprt_release(task); 771 xprt_release(task);
772 } 772 }
773 773
@@ -779,7 +779,7 @@ call_reserveresult(struct rpc_task *task)
779 break; 779 break;
780 default: 780 default:
781 printk(KERN_ERR "%s: unrecognized error %d, exiting\n", 781 printk(KERN_ERR "%s: unrecognized error %d, exiting\n",
782 __FUNCTION__, status); 782 __func__, status);
783 break; 783 break;
784 } 784 }
785 rpc_exit(task, status); 785 rpc_exit(task, status);
@@ -1327,7 +1327,7 @@ call_verify(struct rpc_task *task)
1327 * undefined results 1327 * undefined results
1328 */ 1328 */
1329 dprintk("RPC: %5u %s: XDR representation not a multiple of" 1329 dprintk("RPC: %5u %s: XDR representation not a multiple of"
1330 " 4 bytes: 0x%x\n", task->tk_pid, __FUNCTION__, 1330 " 4 bytes: 0x%x\n", task->tk_pid, __func__,
1331 task->tk_rqstp->rq_rcv_buf.len); 1331 task->tk_rqstp->rq_rcv_buf.len);
1332 goto out_eio; 1332 goto out_eio;
1333 } 1333 }
@@ -1337,7 +1337,7 @@ call_verify(struct rpc_task *task)
1337 1337
1338 if ((n = ntohl(*p++)) != RPC_REPLY) { 1338 if ((n = ntohl(*p++)) != RPC_REPLY) {
1339 dprintk("RPC: %5u %s: not an RPC reply: %x\n", 1339 dprintk("RPC: %5u %s: not an RPC reply: %x\n",
1340 task->tk_pid, __FUNCTION__, n); 1340 task->tk_pid, __func__, n);
1341 goto out_garbage; 1341 goto out_garbage;
1342 } 1342 }
1343 if ((n = ntohl(*p++)) != RPC_MSG_ACCEPTED) { 1343 if ((n = ntohl(*p++)) != RPC_MSG_ACCEPTED) {
@@ -1349,13 +1349,13 @@ call_verify(struct rpc_task *task)
1349 case RPC_MISMATCH: 1349 case RPC_MISMATCH:
1350 dprintk("RPC: %5u %s: RPC call version " 1350 dprintk("RPC: %5u %s: RPC call version "
1351 "mismatch!\n", 1351 "mismatch!\n",
1352 task->tk_pid, __FUNCTION__); 1352 task->tk_pid, __func__);
1353 error = -EPROTONOSUPPORT; 1353 error = -EPROTONOSUPPORT;
1354 goto out_err; 1354 goto out_err;
1355 default: 1355 default:
1356 dprintk("RPC: %5u %s: RPC call rejected, " 1356 dprintk("RPC: %5u %s: RPC call rejected, "
1357 "unknown error: %x\n", 1357 "unknown error: %x\n",
1358 task->tk_pid, __FUNCTION__, n); 1358 task->tk_pid, __func__, n);
1359 goto out_eio; 1359 goto out_eio;
1360 } 1360 }
1361 if (--len < 0) 1361 if (--len < 0)
@@ -1369,7 +1369,7 @@ call_verify(struct rpc_task *task)
1369 break; 1369 break;
1370 task->tk_cred_retry--; 1370 task->tk_cred_retry--;
1371 dprintk("RPC: %5u %s: retry stale creds\n", 1371 dprintk("RPC: %5u %s: retry stale creds\n",
1372 task->tk_pid, __FUNCTION__); 1372 task->tk_pid, __func__);
1373 rpcauth_invalcred(task); 1373 rpcauth_invalcred(task);
1374 /* Ensure we obtain a new XID! */ 1374 /* Ensure we obtain a new XID! */
1375 xprt_release(task); 1375 xprt_release(task);
@@ -1382,7 +1382,7 @@ call_verify(struct rpc_task *task)
1382 break; 1382 break;
1383 task->tk_garb_retry--; 1383 task->tk_garb_retry--;
1384 dprintk("RPC: %5u %s: retry garbled creds\n", 1384 dprintk("RPC: %5u %s: retry garbled creds\n",
1385 task->tk_pid, __FUNCTION__); 1385 task->tk_pid, __func__);
1386 task->tk_action = call_bind; 1386 task->tk_action = call_bind;
1387 goto out_retry; 1387 goto out_retry;
1388 case RPC_AUTH_TOOWEAK: 1388 case RPC_AUTH_TOOWEAK:
@@ -1391,16 +1391,16 @@ call_verify(struct rpc_task *task)
1391 break; 1391 break;
1392 default: 1392 default:
1393 dprintk("RPC: %5u %s: unknown auth error: %x\n", 1393 dprintk("RPC: %5u %s: unknown auth error: %x\n",
1394 task->tk_pid, __FUNCTION__, n); 1394 task->tk_pid, __func__, n);
1395 error = -EIO; 1395 error = -EIO;
1396 } 1396 }
1397 dprintk("RPC: %5u %s: call rejected %d\n", 1397 dprintk("RPC: %5u %s: call rejected %d\n",
1398 task->tk_pid, __FUNCTION__, n); 1398 task->tk_pid, __func__, n);
1399 goto out_err; 1399 goto out_err;
1400 } 1400 }
1401 if (!(p = rpcauth_checkverf(task, p))) { 1401 if (!(p = rpcauth_checkverf(task, p))) {
1402 dprintk("RPC: %5u %s: auth check failed\n", 1402 dprintk("RPC: %5u %s: auth check failed\n",
1403 task->tk_pid, __FUNCTION__); 1403 task->tk_pid, __func__);
1404 goto out_garbage; /* bad verifier, retry */ 1404 goto out_garbage; /* bad verifier, retry */
1405 } 1405 }
1406 len = p - (__be32 *)iov->iov_base - 1; 1406 len = p - (__be32 *)iov->iov_base - 1;
@@ -1411,14 +1411,14 @@ call_verify(struct rpc_task *task)
1411 return p; 1411 return p;
1412 case RPC_PROG_UNAVAIL: 1412 case RPC_PROG_UNAVAIL:
1413 dprintk("RPC: %5u %s: program %u is unsupported by server %s\n", 1413 dprintk("RPC: %5u %s: program %u is unsupported by server %s\n",
1414 task->tk_pid, __FUNCTION__, 1414 task->tk_pid, __func__,
1415 (unsigned int)task->tk_client->cl_prog, 1415 (unsigned int)task->tk_client->cl_prog,
1416 task->tk_client->cl_server); 1416 task->tk_client->cl_server);
1417 error = -EPFNOSUPPORT; 1417 error = -EPFNOSUPPORT;
1418 goto out_err; 1418 goto out_err;
1419 case RPC_PROG_MISMATCH: 1419 case RPC_PROG_MISMATCH:
1420 dprintk("RPC: %5u %s: program %u, version %u unsupported by " 1420 dprintk("RPC: %5u %s: program %u, version %u unsupported by "
1421 "server %s\n", task->tk_pid, __FUNCTION__, 1421 "server %s\n", task->tk_pid, __func__,
1422 (unsigned int)task->tk_client->cl_prog, 1422 (unsigned int)task->tk_client->cl_prog,
1423 (unsigned int)task->tk_client->cl_vers, 1423 (unsigned int)task->tk_client->cl_vers,
1424 task->tk_client->cl_server); 1424 task->tk_client->cl_server);
@@ -1427,7 +1427,7 @@ call_verify(struct rpc_task *task)
1427 case RPC_PROC_UNAVAIL: 1427 case RPC_PROC_UNAVAIL:
1428 dprintk("RPC: %5u %s: proc %p unsupported by program %u, " 1428 dprintk("RPC: %5u %s: proc %p unsupported by program %u, "
1429 "version %u on server %s\n", 1429 "version %u on server %s\n",
1430 task->tk_pid, __FUNCTION__, 1430 task->tk_pid, __func__,
1431 task->tk_msg.rpc_proc, 1431 task->tk_msg.rpc_proc,
1432 task->tk_client->cl_prog, 1432 task->tk_client->cl_prog,
1433 task->tk_client->cl_vers, 1433 task->tk_client->cl_vers,
@@ -1436,11 +1436,11 @@ call_verify(struct rpc_task *task)
1436 goto out_err; 1436 goto out_err;
1437 case RPC_GARBAGE_ARGS: 1437 case RPC_GARBAGE_ARGS:
1438 dprintk("RPC: %5u %s: server saw garbage\n", 1438 dprintk("RPC: %5u %s: server saw garbage\n",
1439 task->tk_pid, __FUNCTION__); 1439 task->tk_pid, __func__);
1440 break; /* retry */ 1440 break; /* retry */
1441 default: 1441 default:
1442 dprintk("RPC: %5u %s: server accept status: %x\n", 1442 dprintk("RPC: %5u %s: server accept status: %x\n",
1443 task->tk_pid, __FUNCTION__, n); 1443 task->tk_pid, __func__, n);
1444 /* Also retry */ 1444 /* Also retry */
1445 } 1445 }
1446 1446
@@ -1449,7 +1449,7 @@ out_garbage:
1449 if (task->tk_garb_retry) { 1449 if (task->tk_garb_retry) {
1450 task->tk_garb_retry--; 1450 task->tk_garb_retry--;
1451 dprintk("RPC: %5u %s: retrying\n", 1451 dprintk("RPC: %5u %s: retrying\n",
1452 task->tk_pid, __FUNCTION__); 1452 task->tk_pid, __func__);
1453 task->tk_action = call_bind; 1453 task->tk_action = call_bind;
1454out_retry: 1454out_retry:
1455 return ERR_PTR(-EAGAIN); 1455 return ERR_PTR(-EAGAIN);
@@ -1459,11 +1459,11 @@ out_eio:
1459out_err: 1459out_err:
1460 rpc_exit(task, error); 1460 rpc_exit(task, error);
1461 dprintk("RPC: %5u %s: call failed with error %d\n", task->tk_pid, 1461 dprintk("RPC: %5u %s: call failed with error %d\n", task->tk_pid,
1462 __FUNCTION__, error); 1462 __func__, error);
1463 return ERR_PTR(error); 1463 return ERR_PTR(error);
1464out_overflow: 1464out_overflow:
1465 dprintk("RPC: %5u %s: server reply was truncated.\n", task->tk_pid, 1465 dprintk("RPC: %5u %s: server reply was truncated.\n", task->tk_pid,
1466 __FUNCTION__); 1466 __func__);
1467 goto out_garbage; 1467 goto out_garbage;
1468} 1468}
1469 1469
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 1b395a41a8b2..5a9b0e7828cd 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -479,13 +479,13 @@ rpc_lookup_parent(char *path, struct nameidata *nd)
479 mnt = rpc_get_mount(); 479 mnt = rpc_get_mount();
480 if (IS_ERR(mnt)) { 480 if (IS_ERR(mnt)) {
481 printk(KERN_WARNING "%s: %s failed to mount " 481 printk(KERN_WARNING "%s: %s failed to mount "
482 "pseudofilesystem \n", __FILE__, __FUNCTION__); 482 "pseudofilesystem \n", __FILE__, __func__);
483 return PTR_ERR(mnt); 483 return PTR_ERR(mnt);
484 } 484 }
485 485
486 if (vfs_path_lookup(mnt->mnt_root, mnt, path, LOOKUP_PARENT, nd)) { 486 if (vfs_path_lookup(mnt->mnt_root, mnt, path, LOOKUP_PARENT, nd)) {
487 printk(KERN_WARNING "%s: %s failed to find path %s\n", 487 printk(KERN_WARNING "%s: %s failed to find path %s\n",
488 __FILE__, __FUNCTION__, path); 488 __FILE__, __func__, path);
489 rpc_put_mount(); 489 rpc_put_mount();
490 return -ENOENT; 490 return -ENOENT;
491 } 491 }
@@ -604,7 +604,7 @@ rpc_populate(struct dentry *parent,
604out_bad: 604out_bad:
605 mutex_unlock(&dir->i_mutex); 605 mutex_unlock(&dir->i_mutex);
606 printk(KERN_WARNING "%s: %s failed to populate directory %s\n", 606 printk(KERN_WARNING "%s: %s failed to populate directory %s\n",
607 __FILE__, __FUNCTION__, parent->d_name.name); 607 __FILE__, __func__, parent->d_name.name);
608 return -ENOMEM; 608 return -ENOMEM;
609} 609}
610 610
@@ -623,7 +623,7 @@ __rpc_mkdir(struct inode *dir, struct dentry *dentry)
623 return 0; 623 return 0;
624out_err: 624out_err:
625 printk(KERN_WARNING "%s: %s failed to allocate inode for dentry %s\n", 625 printk(KERN_WARNING "%s: %s failed to allocate inode for dentry %s\n",
626 __FILE__, __FUNCTION__, dentry->d_name.name); 626 __FILE__, __func__, dentry->d_name.name);
627 return -ENOMEM; 627 return -ENOMEM;
628} 628}
629 629
@@ -715,7 +715,7 @@ err_depopulate:
715err_dput: 715err_dput:
716 dput(dentry); 716 dput(dentry);
717 printk(KERN_WARNING "%s: %s() failed to create directory %s (errno = %d)\n", 717 printk(KERN_WARNING "%s: %s() failed to create directory %s (errno = %d)\n",
718 __FILE__, __FUNCTION__, path, error); 718 __FILE__, __func__, path, error);
719 dentry = ERR_PTR(error); 719 dentry = ERR_PTR(error);
720 goto out; 720 goto out;
721} 721}
@@ -804,7 +804,7 @@ err_dput:
804 dput(dentry); 804 dput(dentry);
805 dentry = ERR_PTR(-ENOMEM); 805 dentry = ERR_PTR(-ENOMEM);
806 printk(KERN_WARNING "%s: %s() failed to create pipe %s/%s (errno = %d)\n", 806 printk(KERN_WARNING "%s: %s() failed to create pipe %s/%s (errno = %d)\n",
807 __FILE__, __FUNCTION__, parent->d_name.name, name, 807 __FILE__, __func__, parent->d_name.name, name,
808 -ENOMEM); 808 -ENOMEM);
809 goto out; 809 goto out;
810} 810}
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 3164a0871cf0..56aa018dce3a 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -224,7 +224,7 @@ int rpcb_getport_sync(struct sockaddr_in *sin, u32 prog, u32 vers, int prot)
224 int status; 224 int status;
225 225
226 dprintk("RPC: %s(" NIPQUAD_FMT ", %u, %u, %d)\n", 226 dprintk("RPC: %s(" NIPQUAD_FMT ", %u, %u, %d)\n",
227 __FUNCTION__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot); 227 __func__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot);
228 228
229 rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin, 229 rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin,
230 sizeof(*sin), prot, 2, 0); 230 sizeof(*sin), prot, 2, 0);
@@ -283,7 +283,7 @@ void rpcb_getport_async(struct rpc_task *task)
283 struct rpcb_info *info; 283 struct rpcb_info *info;
284 284
285 dprintk("RPC: %5u %s(%s, %u, %u, %d)\n", 285 dprintk("RPC: %5u %s(%s, %u, %u, %d)\n",
286 task->tk_pid, __FUNCTION__, 286 task->tk_pid, __func__,
287 clnt->cl_server, clnt->cl_prog, clnt->cl_vers, xprt->prot); 287 clnt->cl_server, clnt->cl_prog, clnt->cl_vers, xprt->prot);
288 288
289 /* Autobind on cloned rpc clients is discouraged */ 289 /* Autobind on cloned rpc clients is discouraged */
@@ -292,7 +292,7 @@ void rpcb_getport_async(struct rpc_task *task)
292 if (xprt_test_and_set_binding(xprt)) { 292 if (xprt_test_and_set_binding(xprt)) {
293 status = -EAGAIN; /* tell caller to check again */ 293 status = -EAGAIN; /* tell caller to check again */
294 dprintk("RPC: %5u %s: waiting for another binder\n", 294 dprintk("RPC: %5u %s: waiting for another binder\n",
295 task->tk_pid, __FUNCTION__); 295 task->tk_pid, __func__);
296 goto bailout_nowake; 296 goto bailout_nowake;
297 } 297 }
298 298
@@ -304,7 +304,7 @@ void rpcb_getport_async(struct rpc_task *task)
304 if (xprt_bound(xprt)) { 304 if (xprt_bound(xprt)) {
305 status = 0; 305 status = 0;
306 dprintk("RPC: %5u %s: already bound\n", 306 dprintk("RPC: %5u %s: already bound\n",
307 task->tk_pid, __FUNCTION__); 307 task->tk_pid, __func__);
308 goto bailout_nofree; 308 goto bailout_nofree;
309 } 309 }
310 310
@@ -321,27 +321,27 @@ void rpcb_getport_async(struct rpc_task *task)
321 default: 321 default:
322 status = -EAFNOSUPPORT; 322 status = -EAFNOSUPPORT;
323 dprintk("RPC: %5u %s: bad address family\n", 323 dprintk("RPC: %5u %s: bad address family\n",
324 task->tk_pid, __FUNCTION__); 324 task->tk_pid, __func__);
325 goto bailout_nofree; 325 goto bailout_nofree;
326 } 326 }
327 if (info[xprt->bind_index].rpc_proc == NULL) { 327 if (info[xprt->bind_index].rpc_proc == NULL) {
328 xprt->bind_index = 0; 328 xprt->bind_index = 0;
329 status = -EPFNOSUPPORT; 329 status = -EPFNOSUPPORT;
330 dprintk("RPC: %5u %s: no more getport versions available\n", 330 dprintk("RPC: %5u %s: no more getport versions available\n",
331 task->tk_pid, __FUNCTION__); 331 task->tk_pid, __func__);
332 goto bailout_nofree; 332 goto bailout_nofree;
333 } 333 }
334 bind_version = info[xprt->bind_index].rpc_vers; 334 bind_version = info[xprt->bind_index].rpc_vers;
335 335
336 dprintk("RPC: %5u %s: trying rpcbind version %u\n", 336 dprintk("RPC: %5u %s: trying rpcbind version %u\n",
337 task->tk_pid, __FUNCTION__, bind_version); 337 task->tk_pid, __func__, bind_version);
338 338
339 rpcb_clnt = rpcb_create(clnt->cl_server, sap, salen, xprt->prot, 339 rpcb_clnt = rpcb_create(clnt->cl_server, sap, salen, xprt->prot,
340 bind_version, 0); 340 bind_version, 0);
341 if (IS_ERR(rpcb_clnt)) { 341 if (IS_ERR(rpcb_clnt)) {
342 status = PTR_ERR(rpcb_clnt); 342 status = PTR_ERR(rpcb_clnt);
343 dprintk("RPC: %5u %s: rpcb_create failed, error %ld\n", 343 dprintk("RPC: %5u %s: rpcb_create failed, error %ld\n",
344 task->tk_pid, __FUNCTION__, PTR_ERR(rpcb_clnt)); 344 task->tk_pid, __func__, PTR_ERR(rpcb_clnt));
345 goto bailout_nofree; 345 goto bailout_nofree;
346 } 346 }
347 347
@@ -349,7 +349,7 @@ void rpcb_getport_async(struct rpc_task *task)
349 if (!map) { 349 if (!map) {
350 status = -ENOMEM; 350 status = -ENOMEM;
351 dprintk("RPC: %5u %s: no memory available\n", 351 dprintk("RPC: %5u %s: no memory available\n",
352 task->tk_pid, __FUNCTION__); 352 task->tk_pid, __func__);
353 goto bailout_nofree; 353 goto bailout_nofree;
354 } 354 }
355 map->r_prog = clnt->cl_prog; 355 map->r_prog = clnt->cl_prog;
@@ -366,7 +366,7 @@ void rpcb_getport_async(struct rpc_task *task)
366 if (IS_ERR(child)) { 366 if (IS_ERR(child)) {
367 status = -EIO; 367 status = -EIO;
368 dprintk("RPC: %5u %s: rpc_run_task failed\n", 368 dprintk("RPC: %5u %s: rpc_run_task failed\n",
369 task->tk_pid, __FUNCTION__); 369 task->tk_pid, __func__);
370 goto bailout; 370 goto bailout;
371 } 371 }
372 rpc_put_task(child); 372 rpc_put_task(child);
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 30e7ac243a90..613daf8c1ff7 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1359,7 +1359,7 @@ static int xs_bind4(struct sock_xprt *transport, struct socket *sock)
1359 nloop++; 1359 nloop++;
1360 } while (err == -EADDRINUSE && nloop != 2); 1360 } while (err == -EADDRINUSE && nloop != 2);
1361 dprintk("RPC: %s "NIPQUAD_FMT":%u: %s (%d)\n", 1361 dprintk("RPC: %s "NIPQUAD_FMT":%u: %s (%d)\n",
1362 __FUNCTION__, NIPQUAD(myaddr.sin_addr), 1362 __func__, NIPQUAD(myaddr.sin_addr),
1363 port, err ? "failed" : "ok", err); 1363 port, err ? "failed" : "ok", err);
1364 return err; 1364 return err;
1365} 1365}
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index b8788fd5e3c6..ae584356852c 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2176,7 +2176,7 @@ static int __init af_unix_init(void)
2176 rc = proto_register(&unix_proto, 1); 2176 rc = proto_register(&unix_proto, 1);
2177 if (rc != 0) { 2177 if (rc != 0) {
2178 printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n", 2178 printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n",
2179 __FUNCTION__); 2179 __func__);
2180 goto out; 2180 goto out;
2181 } 2181 }
2182 2182