net: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Thu, 6 Mar 2008 04:47:47 +0000 (20:47 -0800)]
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

84 files changed:
net/8021q/vlan_dev.c
net/8021q/vlanproc.c
net/9p/error.c
net/bridge/br_sysfs_br.c
net/core/sock.c
net/dccp/dccp.h
net/ieee80211/softmac/ieee80211softmac_priv.h
net/ipv4/af_inet.c
net/ipv4/ipvs/ip_vs_proto_tcp.c
net/ipv4/ipvs/ip_vs_proto_udp.c
net/ipv4/ipvs/ip_vs_sync.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/tcp_input.c
net/ipv4/udplite_ipv4.c
net/ipv6/addrconf.c
net/ipv6/addrlabel.c
net/ipv6/ip6_tunnel.c
net/ipv6/mip6.c
net/ipv6/ndisc.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_REJECT.c
net/ipv6/route.c
net/ipv6/tcp_ipv6.c
net/irda/af_irda.c
net/irda/discovery.c
net/irda/ircomm/ircomm_core.c
net/irda/ircomm/ircomm_event.c
net/irda/ircomm/ircomm_lmp.c
net/irda/ircomm/ircomm_param.c
net/irda/ircomm/ircomm_ttp.c
net/irda/ircomm/ircomm_tty.c
net/irda/ircomm/ircomm_tty_attach.c
net/irda/ircomm/ircomm_tty_ioctl.c
net/irda/irda_device.c
net/irda/iriap.c
net/irda/iriap_event.c
net/irda/irias_object.c
net/irda/irlan/irlan_client.c
net/irda/irlan/irlan_client_event.c
net/irda/irlan/irlan_common.c
net/irda/irlan/irlan_eth.c
net/irda/irlan/irlan_event.c
net/irda/irlan/irlan_filter.c
net/irda/irlan/irlan_provider.c
net/irda/irlan/irlan_provider_event.c
net/irda/irlap.c
net/irda/irlap_event.c
net/irda/irlap_frame.c
net/irda/irlmp.c
net/irda/irlmp_event.c
net/irda/irlmp_frame.c
net/irda/irmod.c
net/irda/irnet/irnet.h
net/irda/irnetlink.c
net/irda/irqueue.c
net/irda/irttp.c
net/irda/parameters.c
net/irda/qos.c
net/irda/wrapper.c
net/llc/af_llc.c
net/llc/llc_c_ac.c
net/llc/llc_c_ev.c
net/llc/llc_conn.c
net/llc/llc_input.c
net/mac80211/ieee80211_iface.c
net/rxrpc/ar-internal.h
net/sctp/associola.c
net/sctp/chunk.c
net/sctp/input.c
net/sctp/ipv6.c
net/sctp/output.c
net/sctp/outqueue.c
net/sctp/protocol.c
net/sctp/sm_sideeffect.c
net/sctp/sm_statefuns.c
net/sctp/socket.c
net/sctp/transport.c
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/clnt.c
net/sunrpc/rpc_pipe.c
net/sunrpc/rpcb_clnt.c
net/sunrpc/xprtsock.c
net/unix/af_unix.c

index 77f04e4..556b289 100644 (file)
@@ -171,7 +171,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
        skb->dev = __find_vlan_dev(dev, vid);
        if (!skb->dev) {
                pr_debug("%s: ERROR: No net_device for VID: %u on dev: %s\n",
-                        __FUNCTION__, (unsigned int)vid, dev->name);
+                        __func__, (unsigned int)vid, dev->name);
                goto err_unlock;
        }
 
@@ -187,7 +187,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
                                                  ntohs(vhdr->h_vlan_TCI));
 
        pr_debug("%s: priority: %u for TCI: %hu\n",
-                __FUNCTION__, skb->priority, ntohs(vhdr->h_vlan_TCI));
+                __func__, skb->priority, ntohs(vhdr->h_vlan_TCI));
 
        switch (skb->pkt_type) {
        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,
        struct net_device *vdev = dev;
 
        pr_debug("%s: skb: %p type: %hx len: %u vlan_id: %hx, daddr: %p\n",
-                __FUNCTION__, skb, type, len, vlan_dev_info(dev)->vlan_id,
+                __func__, skb, type, len, vlan_dev_info(dev)->vlan_id,
                 daddr);
 
        /* 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,
                        return -ENOMEM;
                }
                vlan_dev_info(vdev)->cnt_inc_headroom_on_tx++;
-               pr_debug("%s: %s: had to grow skb\n", __FUNCTION__, vdev->name);
+               pr_debug("%s: %s: had to grow skb\n", __func__, vdev->name);
        }
 
        if (build_vlan_header) {
@@ -382,7 +382,7 @@ static int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
                vlan_dev_info(dev)->cnt_encap_on_xmit++;
 
                pr_debug("%s: proto to encap: 0x%hx\n",
-                        __FUNCTION__, htons(veth->h_vlan_proto));
+                        __func__, htons(veth->h_vlan_proto));
                /* Construct the second two bytes. This field looks something
                 * like:
                 * 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)
        }
 
        pr_debug("%s: about to send skb: %p to dev: %s\n",
-               __FUNCTION__, skb, skb->dev->name);
+               __func__, skb, skb->dev->name);
        pr_debug("  " MAC_FMT " " MAC_FMT " %4hx %4hx %4hx\n",
                 veth->h_dest[0], veth->h_dest[1], veth->h_dest[2],
                 veth->h_dest[3], veth->h_dest[4], veth->h_dest[5],
index 146cfb0..3b8657a 100644 (file)
@@ -168,7 +168,7 @@ int __init vlan_proc_init(void)
        return 0;
 
 err:
-       pr_err("%s: can't create entry in proc filesystem!\n", __FUNCTION__);
+       pr_err("%s: can't create entry in proc filesystem!\n", __func__);
        vlan_proc_cleanup();
        return -ENOBUFS;
 }
index ab2458b..64104b9 100644 (file)
@@ -230,7 +230,7 @@ int p9_errstr2errno(char *errstr, int len)
        if (errno == 0) {
                /* TODO: if error isn't found, add it dynamically */
                errstr[len] = 0;
-               printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__,
+               printk(KERN_ERR "%s: errstr :%s: not found\n", __func__,
                       errstr);
                errno = 1;
        }
index 9cf0538..27d6a51 100644 (file)
@@ -415,21 +415,21 @@ int br_sysfs_addbr(struct net_device *dev)
        err = sysfs_create_group(brobj, &bridge_group);
        if (err) {
                pr_info("%s: can't create group %s/%s\n",
-                       __FUNCTION__, dev->name, bridge_group.name);
+                       __func__, dev->name, bridge_group.name);
                goto out1;
        }
 
        err = sysfs_create_bin_file(brobj, &bridge_forward);
        if (err) {
                pr_info("%s: can't create attribute file %s/%s\n",
-                       __FUNCTION__, dev->name, bridge_forward.attr.name);
+                       __func__, dev->name, bridge_forward.attr.name);
                goto out2;
        }
 
        br->ifobj = kobject_create_and_add(SYSFS_BRIDGE_PORT_SUBDIR, brobj);
        if (!br->ifobj) {
                pr_info("%s: can't add kobject (directory) %s/%s\n",
-                       __FUNCTION__, dev->name, SYSFS_BRIDGE_PORT_SUBDIR);
+                       __func__, dev->name, SYSFS_BRIDGE_PORT_SUBDIR);
                goto out3;
        }
        return 0;
index 0ca0697..bb5236a 100644 (file)
@@ -981,7 +981,7 @@ void sk_free(struct sock *sk)
 
        if (atomic_read(&sk->sk_omem_alloc))
                printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n",
-                      __FUNCTION__, atomic_read(&sk->sk_omem_alloc));
+                      __func__, atomic_read(&sk->sk_omem_alloc));
 
        put_net(sk->sk_net);
        sk_prot_free(sk->sk_prot_creator, sk);
index 287a62b..e1b7c9c 100644 (file)
@@ -23,9 +23,9 @@
  *     DCCP - specific warning and debugging macros.
  */
 #define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt,       \
-                                                       __FUNCTION__, ##a)
+                                                       __func__, ##a)
 #define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
-                                        __FILE__, __LINE__, __FUNCTION__)
+                                        __FILE__, __LINE__, __func__)
 #define DCCP_BUG(a...)       do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
 #define DCCP_BUG_ON(cond)    do { if (unlikely((cond) != 0))              \
                                     DCCP_BUG("\"%s\" holds (exception!)", \
@@ -36,7 +36,7 @@
                                                        printk(fmt, ##args); \
                                                } while(0)
 #define DCCP_PR_DEBUG(enable, fmt, a...)       DCCP_PRINTK(enable, KERN_DEBUG \
-                                                 "%s: " fmt, __FUNCTION__, ##a)
+                                                 "%s: " fmt, __func__, ##a)
 
 #ifdef CONFIG_IP_DCCP_DEBUG
 extern int dccp_debug;
index c43b189..f9232c8 100644 (file)
@@ -43,7 +43,7 @@
        do {                                                                            \
                if (unlikely(!(expr))) {                                                \
                printkl(KERN_ERR PFX "ASSERTION FAILED (%s) at: %s:%d:%s()\n", #expr,   \
-                       __FILE__, __LINE__, __FUNCTION__);                              \
+                       __FILE__, __LINE__, __func__);                          \
                }                                                                       \
        } while (0)
 #else
index 67260c0..25871c6 100644 (file)
@@ -1060,7 +1060,7 @@ static int inet_sk_reselect_saddr(struct sock *sk)
        if (sysctl_ip_dynaddr > 1) {
                printk(KERN_INFO "%s(): shifting inet->"
                                 "saddr from %d.%d.%d.%d to %d.%d.%d.%d\n",
-                      __FUNCTION__,
+                      __func__,
                       NIPQUAD(old_saddr),
                       NIPQUAD(new_saddr));
        }
index 12dc0d6..620e40f 100644 (file)
@@ -550,7 +550,7 @@ tcp_app_conn_bind(struct ip_vs_conn *cp)
 
                        IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
                                  "%u.%u.%u.%u:%u to app %s on port %u\n",
-                                 __FUNCTION__,
+                                 __func__,
                                  NIPQUAD(cp->caddr), ntohs(cp->cport),
                                  NIPQUAD(cp->vaddr), ntohs(cp->vport),
                                  inc->name, ntohs(inc->port));
index 1fa7b33..1caa290 100644 (file)
@@ -344,7 +344,7 @@ static int udp_app_conn_bind(struct ip_vs_conn *cp)
 
                        IP_VS_DBG(9, "%s: Binding conn %u.%u.%u.%u:%u->"
                                  "%u.%u.%u.%u:%u to app %s on port %u\n",
-                                 __FUNCTION__,
+                                 __func__,
                                  NIPQUAD(cp->caddr), ntohs(cp->cport),
                                  NIPQUAD(cp->vaddr), ntohs(cp->vport),
                                  inc->name, ntohs(inc->port));
index 948378d..69c5666 100644 (file)
@@ -916,7 +916,7 @@ int start_sync_thread(int state, char *mcast_ifn, __u8 syncid)
        if (!tinfo)
                return -ENOMEM;
 
-       IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current));
+       IP_VS_DBG(7, "%s: pid %d\n", __func__, task_pid_nr(current));
        IP_VS_DBG(7, "Each ip_vs_sync_conn entry need %Zd bytes\n",
                  sizeof(struct ip_vs_sync_conn));
 
@@ -956,7 +956,7 @@ int stop_sync_thread(int state)
            (state == IP_VS_STATE_BACKUP && !sync_backup_pid))
                return -ESRCH;
 
-       IP_VS_DBG(7, "%s: pid %d\n", __FUNCTION__, task_pid_nr(current));
+       IP_VS_DBG(7, "%s: pid %d\n", __func__, task_pid_nr(current));
        IP_VS_INFO("stopping sync thread %d ...\n",
                   (state == IP_VS_STATE_MASTER) ?
                   sync_master_pid : sync_backup_pid);
index 9b59044..756bc0e 100644 (file)
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("arptables core");
 do {                                                           \
        if (!(x))                                               \
                printk("ARP_NF_ASSERT: %s:%s:%u\n",             \
-                      __FUNCTION__, __FILE__, __LINE__);       \
+                      __func__, __FILE__, __LINE__);   \
 } while(0)
 #else
 #define ARP_NF_ASSERT(x)
index 600737f..85a75e1 100644 (file)
@@ -53,7 +53,7 @@ MODULE_DESCRIPTION("IPv4 packet filter");
 do {                                                           \
        if (!(x))                                               \
                printk("IP_NF_ASSERT: %s:%s:%u\n",              \
-                      __FUNCTION__, __FILE__, __LINE__);       \
+                      __func__, __FILE__, __LINE__);   \
 } while(0)
 #else
 #define IP_NF_ASSERT(x)
index c4679f3..9cf4464 100644 (file)
@@ -3561,7 +3561,7 @@ static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
                 * cases we should never reach this piece of code.
                 */
                printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n",
-                      __FUNCTION__, sk->sk_state);
+                      __func__, sk->sk_state);
                break;
        }
 
index 001b881..d49c6d6 100644 (file)
@@ -106,14 +106,14 @@ void __init udplite4_register(void)
 
 #ifdef CONFIG_PROC_FS
        if (udp_proc_register(&udplite4_seq_afinfo)) /* udplite4_proc_init() */
-               printk(KERN_ERR "%s: Cannot register /proc!\n", __FUNCTION__);
+               printk(KERN_ERR "%s: Cannot register /proc!\n", __func__);
 #endif
        return;
 
 out_unregister_proto:
        proto_unregister(&udplite_prot);
 out_register_err:
-       printk(KERN_CRIT "%s: Cannot add UDP-Lite protocol.\n", __FUNCTION__);
+       printk(KERN_CRIT "%s: Cannot add UDP-Lite protocol.\n", __func__);
 }
 
 EXPORT_SYMBOL(udplite_hash);
index 2ad07c7..4b86d38 100644 (file)
@@ -349,7 +349,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
        if (snmp6_alloc_dev(ndev) < 0) {
                ADBG((KERN_WARNING
                        "%s(): cannot allocate memory for statistics; dev=%s.\n",
-                       __FUNCTION__, dev->name));
+                       __func__, dev->name));
                neigh_parms_release(&nd_tbl, ndev->nd_parms);
                ndev->dead = 1;
                in6_dev_finish_destroy(ndev);
@@ -359,7 +359,7 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
        if (snmp6_register_dev(ndev) < 0) {
                ADBG((KERN_WARNING
                        "%s(): cannot create /proc/net/dev_snmp6/%s\n",
-                       __FUNCTION__, dev->name));
+                       __func__, dev->name));
                neigh_parms_release(&nd_tbl, ndev->nd_parms);
                ndev->dead = 1;
                in6_dev_finish_destroy(ndev);
index 3a8b3f5..de371b5 100644 (file)
@@ -166,7 +166,7 @@ u32 ipv6_addr_label(const struct in6_addr *addr, int type, int ifindex)
        rcu_read_unlock();
 
        ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n",
-                       __FUNCTION__,
+                       __func__,
                        NIP6(*addr), type, ifindex,
                        label);
 
@@ -182,7 +182,7 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(const struct in6_addr *prefix,
        int addrtype;
 
        ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n",
-                       __FUNCTION__,
+                       __func__,
                        NIP6(*prefix), prefixlen,
                        ifindex,
                        (unsigned int)label);
@@ -226,7 +226,7 @@ static int __ip6addrlbl_add(struct ip6addrlbl_entry *newp, int replace)
        int ret = 0;
 
        ADDRLABEL(KERN_DEBUG "%s(newp=%p, replace=%d)\n",
-                       __FUNCTION__,
+                       __func__,
                        newp, replace);
 
        if (hlist_empty(&ip6addrlbl_table.head)) {
@@ -268,7 +268,7 @@ static int ip6addrlbl_add(const struct in6_addr *prefix, int prefixlen,
        int ret = 0;
 
        ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n",
-                       __FUNCTION__,
+                       __func__,
                        NIP6(*prefix), prefixlen,
                        ifindex,
                        (unsigned int)label,
@@ -294,7 +294,7 @@ static int __ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen,
        int ret = -ESRCH;
 
        ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
-                       __FUNCTION__,
+                       __func__,
                        NIP6(*prefix), prefixlen,
                        ifindex);
 
@@ -318,7 +318,7 @@ static int ip6addrlbl_del(const struct in6_addr *prefix, int prefixlen,
        int ret;
 
        ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
-                       __FUNCTION__,
+                       __func__,
                        NIP6(*prefix), prefixlen,
                        ifindex);
 
@@ -335,7 +335,7 @@ static __init int ip6addrlbl_init(void)
        int err = 0;
        int i;
 
-       ADDRLABEL(KERN_DEBUG "%s()\n", __FUNCTION__);
+       ADDRLABEL(KERN_DEBUG "%s()\n", __func__);
 
        for (i = 0; i < ARRAY_SIZE(ip6addrlbl_init_table); i++) {
                int ret = ip6addrlbl_add(ip6addrlbl_init_table[i].prefix,
index 1e1ad1e..61517fe 100644 (file)
@@ -60,7 +60,7 @@ MODULE_LICENSE("GPL");
 #define IPV6_TLV_TEL_DST_SIZE 8
 
 #ifdef IP6_TNL_DEBUG
-#define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __FUNCTION__)
+#define IP6_TNL_TRACE(x...) printk(KERN_DEBUG "%s:" x "\n", __func__)
 #else
 #define IP6_TNL_TRACE(x...) do {;} while(0)
 #endif
index cd8a5bd..42403c6 100644 (file)
@@ -304,13 +304,13 @@ static int mip6_destopt_offset(struct xfrm_state *x, struct sk_buff *skb,
 static int mip6_destopt_init_state(struct xfrm_state *x)
 {
        if (x->id.spi) {
-               printk(KERN_INFO "%s: spi is not 0: %u\n", __FUNCTION__,
+               printk(KERN_INFO "%s: spi is not 0: %u\n", __func__,
                       x->id.spi);
                return -EINVAL;
        }
        if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
                printk(KERN_INFO "%s: state's mode is not %u: %u\n",
-                      __FUNCTION__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
+                      __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
                return -EINVAL;
        }
 
@@ -439,13 +439,13 @@ static int mip6_rthdr_offset(struct xfrm_state *x, struct sk_buff *skb,
 static int mip6_rthdr_init_state(struct xfrm_state *x)
 {
        if (x->id.spi) {
-               printk(KERN_INFO "%s: spi is not 0: %u\n", __FUNCTION__,
+               printk(KERN_INFO "%s: spi is not 0: %u\n", __func__,
                       x->id.spi);
                return -EINVAL;
        }
        if (x->props.mode != XFRM_MODE_ROUTEOPTIMIZATION) {
                printk(KERN_INFO "%s: state's mode is not %u: %u\n",
-                      __FUNCTION__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
+                      __func__, XFRM_MODE_ROUTEOPTIMIZATION, x->props.mode);
                return -EINVAL;
        }
 
@@ -480,15 +480,15 @@ static int __init mip6_init(void)
        printk(KERN_INFO "Mobile IPv6\n");
 
        if (xfrm_register_type(&mip6_destopt_type, AF_INET6) < 0) {
-               printk(KERN_INFO "%s: can't add xfrm type(destopt)\n", __FUNCTION__);
+               printk(KERN_INFO "%s: can't add xfrm type(destopt)\n", __func__);
                goto mip6_destopt_xfrm_fail;
        }
        if (xfrm_register_type(&mip6_rthdr_type, AF_INET6) < 0) {
-               printk(KERN_INFO "%s: can't add xfrm type(rthdr)\n", __FUNCTION__);
+               printk(KERN_INFO "%s: can't add xfrm type(rthdr)\n", __func__);
                goto mip6_rthdr_xfrm_fail;
        }
        if (rawv6_mh_filter_register(mip6_mh_filter) < 0) {
-               printk(KERN_INFO "%s: can't add rawv6 mh filter\n", __FUNCTION__);
+               printk(KERN_INFO "%s: can't add rawv6 mh filter\n", __func__);
                goto mip6_rawv6_mh_fail;
        }
 
@@ -506,11 +506,11 @@ static int __init mip6_init(void)
 static void __exit mip6_fini(void)
 {
        if (rawv6_mh_filter_unregister(mip6_mh_filter) < 0)
-               printk(KERN_INFO "%s: can't remove rawv6 mh filter\n", __FUNCTION__);
+               printk(KERN_INFO "%s: can't remove rawv6 mh filter\n", __func__);
        if (xfrm_unregister_type(&mip6_rthdr_type, AF_INET6) < 0)
-               printk(KERN_INFO "%s: can't remove xfrm type(rthdr)\n", __FUNCTION__);
+               printk(KERN_INFO "%s: can't remove xfrm type(rthdr)\n", __func__);
        if (xfrm_unregister_type(&mip6_destopt_type, AF_INET6) < 0)
-               printk(KERN_INFO "%s: can't remove xfrm type(destopt)\n", __FUNCTION__);
+               printk(KERN_INFO "%s: can't remove xfrm type(destopt)\n", __func__);
 }
 
 module_init(mip6_init);
index b5b4fd1..e0d0233 100644 (file)
@@ -270,7 +270,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
                        if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) {
                                ND_PRINTK2(KERN_WARNING
                                           "%s(): duplicated ND6 option found: type=%d\n",
-                                          __FUNCTION__,
+                                          __func__,
                                           nd_opt->nd_opt_type);
                        } else {
                                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,
                                 */
                                ND_PRINTK2(KERN_NOTICE
                                           "%s(): ignored unsupported option; type=%d, len=%d\n",
-                                          __FUNCTION__,
+                                          __func__,
                                           nd_opt->nd_opt_type, nd_opt->nd_opt_len);
                        }
                }
@@ -484,7 +484,7 @@ static void __ndisc_send(struct net_device *dev,
        if (!skb) {
                ND_PRINTK0(KERN_ERR
                           "ICMPv6 ND: %s() failed to allocate an skb.\n",
-                          __FUNCTION__);
+                          __func__);
                dst_release(dst);
                return;
        }
@@ -647,7 +647,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
                        ND_PRINTK1(KERN_DEBUG
                                   "%s(): trying to ucast probe in NUD_INVALID: "
                                   NIP6_FMT "\n",
-                                  __FUNCTION__,
+                                  __func__,
                                   NIP6(*target));
                }
                ndisc_send_ns(dev, neigh, target, target, saddr);
@@ -1149,7 +1149,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
                if (rt == NULL) {
                        ND_PRINTK0(KERN_ERR
                                   "ICMPv6 RA: %s() failed to add default route.\n",
-                                  __FUNCTION__);
+                                  __func__);
                        in6_dev_put(in6_dev);
                        return;
                }
@@ -1158,7 +1158,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
                if (neigh == NULL) {
                        ND_PRINTK0(KERN_ERR
                                   "ICMPv6 RA: %s() got default router without neighbour.\n",
-                                  __FUNCTION__);
+                                  __func__);
                        dst_release(&rt->u.dst);
                        in6_dev_put(in6_dev);
                        return;
@@ -1471,7 +1471,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
        if (buff == NULL) {
                ND_PRINTK0(KERN_ERR
                           "ICMPv6 Redirect: %s() failed to allocate an skb.\n",
-                          __FUNCTION__);
+                          __func__);
                dst_release(dst);
                return;
        }
index bf9bb6e..af1ec7b 100644 (file)
@@ -55,7 +55,7 @@ MODULE_DESCRIPTION("IPv6 packet filter");
 do {                                                           \
        if (!(x))                                               \
                printk("IP_NF_ASSERT: %s:%s:%u\n",              \
-                      __FUNCTION__, __FILE__, __LINE__);       \
+                      __func__, __FILE__, __LINE__);   \
 } while(0)
 #else
 #define IP_NF_ASSERT(x)
index 831708a..baf8290 100644 (file)
@@ -177,7 +177,7 @@ reject_tg6(struct sk_buff *skb, const struct net_device *in,
 {
        const struct ip6t_reject_info *reject = targinfo;
 
-       pr_debug("%s: medium point\n", __FUNCTION__);
+       pr_debug("%s: medium point\n", __func__);
        /* WARNING: This code causes reentry within ip6tables.
           This means that the ip6tables jump stack is now crap.  We
           must return an absolute verdict. --RR */
index f31d7dc..15e9a86 100644 (file)
@@ -410,7 +410,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict)
        struct net *net;
 
        RT6_TRACE("%s(fn->leaf=%p, oif=%d)\n",
-                 __FUNCTION__, fn->leaf, oif);
+                 __func__, fn->leaf, oif);
 
        rt0 = fn->rr_ptr;
        if (!rt0)
@@ -431,7 +431,7 @@ static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict)
        }
 
        RT6_TRACE("%s() => %p\n",
-                 __FUNCTION__, match);
+                 __func__, match);
 
        net = rt0->rt6i_dev->nd_net;
        return (match ? match : net->ipv6.ip6_null_entry);
index aacbb76..b47cce8 100644 (file)
@@ -753,7 +753,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
 
        hp = tcp_get_md5sig_pool();
        if (!hp) {
-               printk(KERN_WARNING "%s(): hash pool not found...\n", __FUNCTION__);
+               printk(KERN_WARNING "%s(): hash pool not found...\n", __func__);
                goto clear_hash_noput;
        }
        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,
        /* Now store the hash into the packet */
        err = crypto_hash_init(desc);
        if (err) {
-               printk(KERN_WARNING "%s(): hash_init failed\n", __FUNCTION__);
+               printk(KERN_WARNING "%s(): hash_init failed\n", __func__);
                goto clear_hash;
        }
        err = crypto_hash_update(desc, sg, nbytes);
        if (err) {
-               printk(KERN_WARNING "%s(): hash_update failed\n", __FUNCTION__);
+               printk(KERN_WARNING "%s(): hash_update failed\n", __func__);
                goto clear_hash;
        }
        err = crypto_hash_final(desc, md5_hash);
        if (err) {
-               printk(KERN_WARNING "%s(): hash_final failed\n", __FUNCTION__);
+               printk(KERN_WARNING "%s(): hash_final failed\n", __func__);
                goto clear_hash;
        }
 
index 240b0cb..6f21a53 100644 (file)
@@ -85,14 +85,14 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb)
        struct sock *sk;
        int err;
 
-       IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(3, "%s()\n", __func__);
 
        self = instance;
        sk = instance;
 
        err = sock_queue_rcv_skb(sk, skb);
        if (err) {
-               IRDA_DEBUG(1, "%s(), error: no more mem!\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s(), error: no more mem!\n", __func__);
                self->rx_flow = FLOW_STOP;
 
                /* When we return error, TTP will need to requeue the skb */
@@ -116,7 +116,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
 
        self = instance;
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        /* Don't care about it, but let's not leak it */
        if(skb)
@@ -125,7 +125,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
        sk = instance;
        if (sk == NULL) {
                IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n",
-                          __FUNCTION__, self);
+                          __func__, self);
                return;
        }
 
@@ -181,7 +181,7 @@ static void irda_connect_confirm(void *instance, void *sap,
 
        self = instance;
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        sk = instance;
        if (sk == NULL) {
@@ -203,7 +203,7 @@ static void irda_connect_confirm(void *instance, void *sap,
        case SOCK_STREAM:
                if (max_sdu_size != 0) {
                        IRDA_ERROR("%s: max_sdu_size must be 0\n",
-                                  __FUNCTION__);
+                                  __func__);
                        return;
                }
                self->max_data_size = irttp_get_max_seg_size(self->tsap);
@@ -211,7 +211,7 @@ static void irda_connect_confirm(void *instance, void *sap,
        case SOCK_SEQPACKET:
                if (max_sdu_size == 0) {
                        IRDA_ERROR("%s: max_sdu_size cannot be 0\n",
-                                  __FUNCTION__);
+                                  __func__);
                        return;
                }
                self->max_data_size = max_sdu_size;
@@ -220,7 +220,7 @@ static void irda_connect_confirm(void *instance, void *sap,
                self->max_data_size = irttp_get_max_seg_size(self->tsap);
        }
 
-       IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__,
+       IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__,
                   self->max_data_size);
 
        memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
@@ -245,7 +245,7 @@ static void irda_connect_indication(void *instance, void *sap,
 
        self = instance;
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        sk = instance;
        if (sk == NULL) {
@@ -264,7 +264,7 @@ static void irda_connect_indication(void *instance, void *sap,
        case SOCK_STREAM:
                if (max_sdu_size != 0) {
                        IRDA_ERROR("%s: max_sdu_size must be 0\n",
-                                  __FUNCTION__);
+                                  __func__);
                        kfree_skb(skb);
                        return;
                }
@@ -273,7 +273,7 @@ static void irda_connect_indication(void *instance, void *sap,
        case SOCK_SEQPACKET:
                if (max_sdu_size == 0) {
                        IRDA_ERROR("%s: max_sdu_size cannot be 0\n",
-                                  __FUNCTION__);
+                                  __func__);
                        kfree_skb(skb);
                        return;
                }
@@ -283,7 +283,7 @@ static void irda_connect_indication(void *instance, void *sap,
                self->max_data_size = irttp_get_max_seg_size(self->tsap);
        }
 
-       IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__,
+       IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__,
                   self->max_data_size);
 
        memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
@@ -302,13 +302,13 @@ static void irda_connect_response(struct irda_sock *self)
 {
        struct sk_buff *skb;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER,
                        GFP_ATOMIC);
        if (skb == NULL) {
                IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n",
-                          __FUNCTION__);
+                          __func__);
                return;
        }
 
@@ -329,7 +329,7 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
        struct irda_sock *self;
        struct sock *sk;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        self = instance;
        sk = instance;
@@ -338,17 +338,17 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
        switch (flow) {
        case FLOW_STOP:
                IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n",
-                          __FUNCTION__);
+                          __func__);
                self->tx_flow = flow;
                break;
        case FLOW_START:
                self->tx_flow = flow;
                IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n",
-                          __FUNCTION__);
+                          __func__);
                wake_up_interruptible(sk->sk_sleep);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __func__);
                /* Unknown flow command, better stop */
                self->tx_flow = flow;
                break;
@@ -370,11 +370,11 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
 
        self = (struct irda_sock *) priv;
        if (!self) {
-               IRDA_WARNING("%s: lost myself!\n", __FUNCTION__);
+               IRDA_WARNING("%s: lost myself!\n", __func__);
                return;
        }
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        /* We probably don't need to make any more queries */
        iriap_close(self->iriap);
@@ -382,7 +382,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
 
        /* Check if request succeeded */
        if (result != IAS_SUCCESS) {
-               IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __func__,
                           result);
 
                self->errno = result;   /* We really need it later */
@@ -415,11 +415,11 @@ static void irda_selective_discovery_indication(discinfo_t *discovery,
 {
        struct irda_sock *self;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        self = (struct irda_sock *) priv;
        if (!self) {
-               IRDA_WARNING("%s: lost myself!\n", __FUNCTION__);
+               IRDA_WARNING("%s: lost myself!\n", __func__);
                return;
        }
 
@@ -442,7 +442,7 @@ static void irda_discovery_timeout(u_long priv)
 {
        struct irda_sock *self;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        self = (struct irda_sock *) priv;
        BUG_ON(self == NULL);
@@ -467,7 +467,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
        notify_t notify;
 
        if (self->tsap) {
-               IRDA_WARNING("%s: busy!\n", __FUNCTION__);
+               IRDA_WARNING("%s: busy!\n", __func__);
                return -EBUSY;
        }
 
@@ -486,7 +486,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
                                     &notify);
        if (self->tsap == NULL) {
                IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n",
-                          __FUNCTION__);
+                          __func__);
                return -ENOMEM;
        }
        /* Remember which TSAP selector we actually got */
@@ -507,7 +507,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
        notify_t notify;
 
        if (self->lsap) {
-               IRDA_WARNING("%s(), busy!\n", __FUNCTION__);
+               IRDA_WARNING("%s(), busy!\n", __func__);
                return -EBUSY;
        }
 
@@ -519,7 +519,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
 
        self->lsap = irlmp_open_lsap(LSAP_CONNLESS, &notify, pid);
        if (self->lsap == NULL) {
-               IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __FUNCTION__);
+               IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __func__);
                return -ENOMEM;
        }
 
@@ -540,11 +540,11 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
  */
 static int irda_find_lsap_sel(struct irda_sock *self, char *name)
 {
-       IRDA_DEBUG(2, "%s(%p, %s)\n", __FUNCTION__, self, name);
+       IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name);
 
        if (self->iriap) {
                IRDA_WARNING("%s(): busy with a previous query\n",
-                            __FUNCTION__);
+                            __func__);
                return -EBUSY;
        }
 
@@ -580,7 +580,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
        switch (self->ias_result->type) {
        case IAS_INTEGER:
                IRDA_DEBUG(4, "%s() int=%d\n",
-                          __FUNCTION__, self->ias_result->t.integer);
+                          __func__, self->ias_result->t.integer);
 
                if (self->ias_result->t.integer != -1)
                        self->dtsap_sel = self->ias_result->t.integer;
@@ -589,7 +589,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
                break;
        default:
                self->dtsap_sel = 0;
-               IRDA_DEBUG(0, "%s(), bad type!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), bad type!\n", __func__);
                break;
        }
        if (self->ias_result)
@@ -627,7 +627,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
        __u32   daddr = DEV_ADDR_ANY;   /* Address we found the service on */
        __u8    dtsap_sel = 0x0;        /* TSAP associated with it */
 
-       IRDA_DEBUG(2, "%s(), name=%s\n", __FUNCTION__, name);
+       IRDA_DEBUG(2, "%s(), name=%s\n", __func__, name);
 
        /* Ask lmp for the current discovery log
         * 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)
                self->daddr = discoveries[i].daddr;
                self->saddr = 0x0;
                IRDA_DEBUG(1, "%s(), trying daddr = %08x\n",
-                          __FUNCTION__, self->daddr);
+                          __func__, self->daddr);
 
                /* Query remote LM-IAS for this service */
                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)
                        /* We found the requested service */
                        if(daddr != DEV_ADDR_ANY) {
                                IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n",
-                                          __FUNCTION__, name);
+                                          __func__, name);
                                self->daddr = DEV_ADDR_ANY;
                                kfree(discoveries);
                                return(-ENOTUNIQ);
@@ -672,7 +672,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
                        break;
                default:
                        /* Something bad did happen :-( */
-                       IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __FUNCTION__);
+                       IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__);
                        self->daddr = DEV_ADDR_ANY;
                        kfree(discoveries);
                        return(-EHOSTUNREACH);
@@ -685,7 +685,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
        /* Check out what we found */
        if(daddr == DEV_ADDR_ANY) {
                IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n",
-                          __FUNCTION__, name);
+                          __func__, name);
                self->daddr = DEV_ADDR_ANY;
                return(-EADDRNOTAVAIL);
        }
@@ -696,7 +696,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
        self->dtsap_sel = dtsap_sel;
 
        IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n",
-                  __FUNCTION__, name, self->daddr);
+                  __func__, name, self->daddr);
 
        return 0;
 }
@@ -727,8 +727,8 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
                saddr.sir_addr = self->saddr;
        }
 
-       IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __FUNCTION__, saddr.sir_lsap_sel);
-       IRDA_DEBUG(1, "%s(), addr = %08x\n", __FUNCTION__, saddr.sir_addr);
+       IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel);
+       IRDA_DEBUG(1, "%s(), addr = %08x\n", __func__, saddr.sir_addr);
 
        /* uaddr_len come to us uninitialised */
        *uaddr_len = sizeof (struct sockaddr_irda);
@@ -747,7 +747,7 @@ static int irda_listen(struct socket *sock, int backlog)
 {
        struct sock *sk = sock->sk;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) &&
            (sk->sk_type != SOCK_DGRAM))
@@ -776,7 +776,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
        struct irda_sock *self = irda_sk(sk);
        int err;
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        if (addr_len != sizeof(struct sockaddr_irda))
                return -EINVAL;
@@ -787,7 +787,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
            (sk->sk_protocol == IRDAPROTO_ULTRA)) {
                self->pid = addr->sir_lsap_sel;
                if (self->pid & 0x80) {
-                       IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__);
+                       IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__);
                        return -EOPNOTSUPP;
                }
                err = irda_open_lsap(self, self->pid);
@@ -835,7 +835,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
        struct sk_buff *skb;
        int err;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        err = irda_create(sk->sk_net, newsock, sk->sk_protocol);
        if (err)
@@ -893,7 +893,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
        /* Now attach up the new socket */
        new->tsap = irttp_dup(self->tsap, new);
        if (!new->tsap) {
-               IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
                kfree_skb(skb);
                return -1;
        }
@@ -954,7 +954,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
        struct irda_sock *self = irda_sk(sk);
        int err;
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        /* Don't allow connect for Ultra sockets */
        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,
                /* Try to find one suitable */
                err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name);
                if (err) {
-                       IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __FUNCTION__);
+                       IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __func__);
                        return err;
                }
        } else {
                /* Use the one provided by the user */
                self->daddr = addr->sir_addr;
-               IRDA_DEBUG(1, "%s(), daddr = %08x\n", __FUNCTION__, self->daddr);
+               IRDA_DEBUG(1, "%s(), daddr = %08x\n", __func__, self->daddr);
 
                /* If we don't have a valid service name, we assume the
                 * user want to connect on a specific LSAP. Prevent
@@ -1000,7 +1000,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
                        /* Query remote LM-IAS using service name */
                        err = irda_find_lsap_sel(self, addr->sir_name);
                        if (err) {
-                               IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
+                               IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
                                return err;
                        }
                } else {
@@ -1025,7 +1025,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
                                    self->saddr, self->daddr, NULL,
                                    self->max_sdu_size_rx, NULL);
        if (err) {
-               IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
                return err;
        }
 
@@ -1068,7 +1068,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
        struct sock *sk;
        struct irda_sock *self;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        if (net != &init_net)
                return -EAFNOSUPPORT;
@@ -1089,7 +1089,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
                return -ENOMEM;
 
        self = irda_sk(sk);
-       IRDA_DEBUG(2, "%s() : self is %p\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s() : self is %p\n", __func__, self);
 
        init_waitqueue_head(&self->query_wait);
 
@@ -1149,7 +1149,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
  */
 static void irda_destroy_socket(struct irda_sock *self)
 {
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        /* Unregister with IrLMP */
        irlmp_unregister_client(self->ckey);
@@ -1186,7 +1186,7 @@ static int irda_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        if (sk == NULL)
                return 0;
@@ -1254,7 +1254,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
        struct sk_buff *skb;
        int err = -EPIPE;
 
-       IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len);
+       IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
 
        /* Note : socket.c set MSG_EOR on SEQPACKET sockets */
        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,
        /* Check that we don't send out too big frames */
        if (len > self->max_data_size) {
                IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n",
-                          __FUNCTION__, len, self->max_data_size);
+                          __func__, len, self->max_data_size);
                len = self->max_data_size;
        }
 
@@ -1306,7 +1306,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
         */
        err = irttp_data_request(self->tsap, skb);
        if (err) {
-               IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
+               IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
                goto out_err;
        }
        /* Tell client how much data we actually sent */
@@ -1332,7 +1332,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
        size_t copied;
        int err;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        if ((err = sock_error(sk)) < 0)
                return err;
@@ -1347,7 +1347,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
 
        if (copied > size) {
                IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n",
-                          __FUNCTION__, copied, size);
+                          __func__, copied, size);
                copied = size;
                msg->msg_flags |= MSG_TRUNC;
        }
@@ -1363,7 +1363,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
         */
        if (self->rx_flow == FLOW_STOP) {
                if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
-                       IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__);
+                       IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__);
                        self->rx_flow = FLOW_START;
                        irttp_flow_request(self->tsap, FLOW_START);
                }
@@ -1385,7 +1385,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
        int target, err;
        long timeo;
 
-       IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(3, "%s()\n", __func__);
 
        if ((err = sock_error(sk)) < 0)
                return err;
@@ -1459,14 +1459,14 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
                        /* put the skb back if we didn't use it up.. */
                        if (skb->len) {
                                IRDA_DEBUG(1, "%s(), back on q!\n",
-                                          __FUNCTION__);
+                                          __func__);
                                skb_queue_head(&sk->sk_receive_queue, skb);
                                break;
                        }
 
                        kfree_skb(skb);
                } else {
-                       IRDA_DEBUG(0, "%s() questionable!?\n", __FUNCTION__);
+                       IRDA_DEBUG(0, "%s() questionable!?\n", __func__);
 
                        /* put message back and return */
                        skb_queue_head(&sk->sk_receive_queue, skb);
@@ -1482,7 +1482,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
         */
        if (self->rx_flow == FLOW_STOP) {
                if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
-                       IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__);
+                       IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__);
                        self->rx_flow = FLOW_START;
                        irttp_flow_request(self->tsap, FLOW_START);
                }
@@ -1506,7 +1506,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
        struct sk_buff *skb;
        int err;
 
-       IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len);
+       IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
 
        if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
                return -EINVAL;
@@ -1528,7 +1528,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
        if (len > self->max_data_size) {
                IRDA_DEBUG(0, "%s(), Warning to much data! "
                           "Chopping frame from %zd to %d bytes!\n",
-                          __FUNCTION__, len, self->max_data_size);
+                          __func__, len, self->max_data_size);
                len = self->max_data_size;
        }
 
@@ -1540,7 +1540,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
        skb_reserve(skb, self->max_header_size);
        skb_reset_transport_header(skb);
 
-       IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s(), appending user data\n", __func__);
        skb_put(skb, len);
        err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
        if (err) {
@@ -1554,7 +1554,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
         */
        err = irttp_udata_request(self->tsap, skb);
        if (err) {
-               IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
+               IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
                return err;
        }
        return len;
@@ -1577,7 +1577,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
        struct sk_buff *skb;
        int err;
 
-       IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len);
+       IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len);
 
        if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
                return -EINVAL;
@@ -1600,7 +1600,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
 
                pid = addr->sir_lsap_sel;
                if (pid & 0x80) {
-                       IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__);
+                       IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__);
                        return -EOPNOTSUPP;
                }
        } else {
@@ -1609,7 +1609,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
                if ((self->lsap == NULL) ||
                    (sk->sk_state != TCP_ESTABLISHED)) {
                        IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n",
-                                  __FUNCTION__);
+                                  __func__);
                        return -ENOTCONN;
                }
                /* Use PID from socket */
@@ -1623,7 +1623,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
        if (len > self->max_data_size) {
                IRDA_DEBUG(0, "%s(), Warning to much data! "
                           "Chopping frame from %zd to %d bytes!\n",
-                          __FUNCTION__, len, self->max_data_size);
+                          __func__, len, self->max_data_size);
                len = self->max_data_size;
        }
 
@@ -1635,7 +1635,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
        skb_reserve(skb, self->max_header_size);
        skb_reset_transport_header(skb);
 
-       IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s(), appending user data\n", __func__);
        skb_put(skb, len);
        err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
        if (err) {
@@ -1646,7 +1646,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
        err = irlmp_connless_data_request((bound ? self->lsap : NULL),
                                          skb, pid);
        if (err) {
-               IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
+               IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err);
                return err;
        }
        return len;
@@ -1661,7 +1661,7 @@ static int irda_shutdown(struct socket *sock, int how)
        struct sock *sk = sock->sk;
        struct irda_sock *self = irda_sk(sk);
 
-       IRDA_DEBUG(1, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(1, "%s(%p)\n", __func__, self);
 
        sk->sk_state       = TCP_CLOSE;
        sk->sk_shutdown   |= SEND_SHUTDOWN;
@@ -1696,7 +1696,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
        struct irda_sock *self = irda_sk(sk);
        unsigned int mask;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        poll_wait(file, sk->sk_sleep, wait);
        mask = 0;
@@ -1705,7 +1705,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
        if (sk->sk_err)
                mask |= POLLERR;
        if (sk->sk_shutdown & RCV_SHUTDOWN) {
-               IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__);
                mask |= POLLHUP;
        }
 
@@ -1719,7 +1719,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
        switch (sk->sk_type) {
        case SOCK_STREAM:
                if (sk->sk_state == TCP_CLOSE) {
-                       IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__);
+                       IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__);
                        mask |= POLLHUP;
                }
 
@@ -1755,7 +1755,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 {
        struct sock *sk = sock->sk;
 
-       IRDA_DEBUG(4, "%s(), cmd=%#x\n", __FUNCTION__, cmd);
+       IRDA_DEBUG(4, "%s(), cmd=%#x\n", __func__, cmd);
 
        switch (cmd) {
        case TIOCOUTQ: {
@@ -1796,7 +1796,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
        case SIOCSIFMETRIC:
                return -EINVAL;
        default:
-               IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __func__);
                return -ENOIOCTLCMD;
        }
 
@@ -1833,7 +1833,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
        struct ias_attrib *     ias_attr;       /* Attribute in IAS object */
        int opt, free_ias = 0;
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        if (level != SOL_IRLMP)
                return -ENOPROTOOPT;
@@ -2012,7 +2012,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
 
                /* Check is the user space own the object */
                if(ias_attr->value->owner != IAS_USER_ATTR) {
-                       IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __FUNCTION__);
+                       IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __func__);
                        kfree(ias_opt);
                        return -EPERM;
                }
@@ -2031,11 +2031,11 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
                /* Only possible for a seqpacket service (TTP with SAR) */
                if (sk->sk_type != SOCK_SEQPACKET) {
                        IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n",
-                                  __FUNCTION__, opt);
+                                  __func__, opt);
                        self->max_sdu_size_rx = opt;
                } else {
                        IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n",
-                                    __FUNCTION__);
+                                    __func__);
                        return -ENOPROTOOPT;
                }
                break;
@@ -2149,7 +2149,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
        int err;
        int offset, total;
 
-       IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
+       IRDA_DEBUG(2, "%s(%p)\n", __func__, self);
 
        if (level != SOL_IRLMP)
                return -ENOPROTOOPT;
@@ -2310,7 +2310,7 @@ bed:
                /* Check that we can proceed with IAP */
                if (self->iriap) {
                        IRDA_WARNING("%s: busy with a previous query\n",
-                                    __FUNCTION__);
+                                    __func__);
                        kfree(ias_opt);
                        return -EBUSY;
                }
@@ -2406,7 +2406,7 @@ bed:
                if (!self->cachedaddr) {
                        int ret = 0;
 
-                       IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __FUNCTION__);
+                       IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __func__);
 
                        /* Set watchdog timer to expire in <val> ms. */
                        self->errno = 0;
@@ -2424,14 +2424,14 @@ bed:
                        if(timer_pending(&(self->watchdog)))
                                del_timer(&(self->watchdog));
 
-                       IRDA_DEBUG(1, "%s(), ...waking up !\n", __FUNCTION__);
+                       IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__);
 
                        if (ret != 0)
                                return ret;
                }
                else
                        IRDA_DEBUG(1, "%s(), found immediately !\n",
-                                  __FUNCTION__);
+                                  __func__);
 
                /* Tell IrLMP that we have been notified */
                irlmp_update_client(self->ckey, self->mask.word,
index 80c33f4..bfacef8 100644 (file)
@@ -110,7 +110,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
 {
        discovery_t *discovery;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        /*
         *  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)
        int                     i = 0;          /* How many we expired */
 
        IRDA_ASSERT(log != NULL, return;);
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        spin_lock_irqsave(&log->hb_spinlock, flags);
 
index 6eef1f2..018c929 100644 (file)
@@ -70,7 +70,7 @@ static int __init ircomm_init(void)
 {
        ircomm = hashbin_new(HB_LOCK);
        if (ircomm == NULL) {
-               IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__);
+               IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
                return -ENOMEM;
        }
 
@@ -91,7 +91,7 @@ static int __init ircomm_init(void)
 
 static void __exit ircomm_cleanup(void)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
 
@@ -111,7 +111,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
        struct ircomm_cb *self = NULL;
        int ret;
 
-       IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ ,
                   service_type);
 
        IRDA_ASSERT(ircomm != NULL, return NULL;);
@@ -155,7 +155,7 @@ EXPORT_SYMBOL(ircomm_open);
  */
 static int __ircomm_close(struct ircomm_cb *self)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Disconnect link if any */
        ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
@@ -191,7 +191,7 @@ int ircomm_close(struct ircomm_cb *self)
        IRDA_ASSERT(self != NULL, return -EIO;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        entry = hashbin_remove(ircomm, self->line, NULL);
 
@@ -216,7 +216,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
        struct ircomm_info info;
        int ret;
 
-       IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2 , "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -245,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
 {
        int clen = 0;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Check if the packet contains data on the control channel */
        if (skb->len > 0)
@@ -261,7 +261,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
                                                info->qos, info->max_data_size,
                                                info->max_header_size, skb);
        else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -278,7 +278,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
 
@@ -296,7 +296,7 @@ EXPORT_SYMBOL(ircomm_connect_response);
 void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
                            struct ircomm_info *info)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        if (self->notify.connect_confirm )
                self->notify.connect_confirm(self->notify.instance,
@@ -304,7 +304,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
                                             info->max_data_size,
                                             info->max_header_size, skb);
        else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -318,7 +318,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
 {
        int ret;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -EFAULT;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -339,14 +339,14 @@ EXPORT_SYMBOL(ircomm_data_request);
  */
 void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(skb->len > 0, return;);
 
        if (self->notify.data_indication)
                self->notify.data_indication(self->notify.instance, self, skb);
        else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -372,7 +372,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
         */
        if (unlikely(skb->len < (clen + 1))) {
                IRDA_DEBUG(2, "%s() throwing away illegal frame\n",
-                          __FUNCTION__ );
+                          __func__ );
                return;
        }
 
@@ -391,7 +391,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
                ircomm_data_indication(self, skb);
        else {
                IRDA_DEBUG(4, "%s(), data was control info only!\n",
-                          __FUNCTION__ );
+                          __func__ );
        }
 }
 
@@ -405,7 +405,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
 {
        int ret;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -EFAULT;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -427,7 +427,7 @@ EXPORT_SYMBOL(ircomm_control_request);
 static void ircomm_control_indication(struct ircomm_cb *self,
                                      struct sk_buff *skb, int clen)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Use udata for delivering data on the control channel */
        if (self->notify.udata_indication) {
@@ -448,7 +448,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
                 * see ircomm_tty_control_indication(). */
                dev_kfree_skb(ctrl_skb);
        } else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -463,7 +463,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
        struct ircomm_info info;
        int ret;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -484,7 +484,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request);
 void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
                                  struct ircomm_info *info)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(info != NULL, return;);
 
@@ -492,7 +492,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
                self->notify.disconnect_indication(self->notify.instance, self,
                                                   info->reason, skb);
        } else {
-               IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
        }
 }
 
@@ -504,7 +504,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
  */
 void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
index 8ba4e59..c35b3ef 100644 (file)
@@ -108,7 +108,7 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event,
                ircomm_connect_indication(self, skb, info);
                break;
        default:
-               IRDA_DEBUG(4, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_event[event]);
                ret = -EINVAL;
        }
@@ -138,7 +138,7 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event,
                ircomm_disconnect_indication(self, skb, info);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_event[event]);
                ret = -EINVAL;
        }
@@ -171,7 +171,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
                ircomm_disconnect_indication(self, skb, info);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
                           ircomm_event[event]);
                ret = -EINVAL;
        }
@@ -213,7 +213,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
                ret = self->issue.disconnect_request(self, skb, info);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ ,
                           ircomm_event[event]);
                ret = -EINVAL;
        }
@@ -229,7 +229,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
 int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
                    struct sk_buff *skb, struct ircomm_info *info)
 {
-       IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __FUNCTION__ ,
+       IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __func__ ,
                   ircomm_state[self->state], ircomm_event[event]);
 
        return (*state[self->state])(self, event, skb, info);
@@ -245,6 +245,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state)
 {
        self->state = state;
 
-       IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __FUNCTION__ ,
+       IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __func__ ,
                   ircomm_state[self->state], self->service_type);
 }
index 55860ee..67c99d2 100644 (file)
@@ -53,7 +53,7 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self,
 {
        int ret = 0;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        /* Don't forget to refcount it - should be NULL anyway */
        if(userdata)
@@ -76,7 +76,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self,
        struct sk_buff *tx_skb;
        int ret;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        /* Any userdata supplied? */
        if (userdata == NULL) {
@@ -111,7 +111,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self,
        struct sk_buff *tx_skb;
        int ret;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        if (!userdata) {
                tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
@@ -148,13 +148,13 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
 
        cb = (struct irda_skb_cb *) skb->cb;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        line = cb->line;
 
        self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
        if (!self) {
-               IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ );
                return;
        }
 
@@ -164,7 +164,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
        self->pkt_count--;
 
        if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) {
-               IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __func__ );
                self->flow_status = FLOW_START;
                if (self->notify.flow_indication)
                        self->notify.flow_indication(self->notify.instance,
@@ -191,7 +191,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
 
        cb->line = self->line;
 
-       IRDA_DEBUG(4, "%s(), sending frame\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s(), sending frame\n", __func__ );
 
        /* Don't forget to refcount it - see ircomm_tty_do_softint() */
        skb_get(skb);
@@ -199,7 +199,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
        skb->destructor = ircomm_lmp_flow_control;
 
        if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
-               IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __func__ );
                self->flow_status = FLOW_STOP;
                if (self->notify.flow_indication)
                        self->notify.flow_indication(self->notify.instance,
@@ -207,7 +207,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
        }
        ret = irlmp_data_request(self->lsap, skb);
        if (ret) {
-               IRDA_ERROR("%s(), failed\n", __FUNCTION__);
+               IRDA_ERROR("%s(), failed\n", __func__);
                /* irlmp_data_request already free the packet */
        }
 
@@ -225,7 +225,7 @@ static int ircomm_lmp_data_indication(void *instance, void *sap,
 {
        struct ircomm_cb *self = (struct ircomm_cb *) instance;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -255,7 +255,7 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap,
        struct ircomm_cb *self = (struct ircomm_cb *) instance;
        struct ircomm_info info;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -288,7 +288,7 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap,
        struct ircomm_cb *self = (struct ircomm_cb *)instance;
        struct ircomm_info info;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -318,7 +318,7 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap,
        struct ircomm_cb *self = (struct ircomm_cb *) instance;
        struct ircomm_info info;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -341,7 +341,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
 {
        notify_t notify;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        /* Register callbacks */
        irda_notify_init(&notify);
@@ -354,7 +354,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
 
        self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
        if (!self->lsap) {
-               IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ );
+               IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ );
                return -1;
        }
        self->slsap_sel = self->lsap->slsap_sel;
index 598dcbe..d57aefd 100644 (file)
@@ -103,7 +103,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
        struct sk_buff *skb;
        int count;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        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)
        count = irda_param_insert(self, pi, skb_tail_pointer(skb),
                                  skb_tailroom(skb), &ircomm_param_info);
        if (count < 0) {
-               IRDA_WARNING("%s(), no room for parameter!\n", __FUNCTION__);
+               IRDA_WARNING("%s(), no room for parameter!\n", __func__);
                spin_unlock_irqrestore(&self->spinlock, flags);
                return -1;
        }
@@ -144,7 +144,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
 
        spin_unlock_irqrestore(&self->spinlock, flags);
 
-       IRDA_DEBUG(2, "%s(), skb->len=%d\n", __FUNCTION__ , skb->len);
+       IRDA_DEBUG(2, "%s(), skb->len=%d\n", __func__ , skb->len);
 
        if (flush) {
                /* 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,
        service_type &= self->service_type;
        if (!service_type) {
                IRDA_DEBUG(2,
-                          "%s(), No common service type to use!\n", __FUNCTION__ );
+                          "%s(), No common service type to use!\n", __func__ );
                return -1;
        }
-       IRDA_DEBUG(0, "%s(), services in common=%02x\n", __FUNCTION__ ,
+       IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ ,
                   service_type);
 
        /*
@@ -197,7 +197,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
        else if (service_type & IRCOMM_3_WIRE_RAW)
                self->settings.service_type = IRCOMM_3_WIRE_RAW;
 
-       IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __FUNCTION__ ,
+       IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __func__ ,
                   self->settings.service_type);
 
        /*
@@ -240,7 +240,7 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get)
        else {
                self->settings.port_type = (__u8) param->pv.i;
 
-               IRDA_DEBUG(0, "%s(), port type=%d\n", __FUNCTION__ ,
+               IRDA_DEBUG(0, "%s(), port type=%d\n", __func__ ,
                           self->settings.port_type);
        }
        return 0;
@@ -260,9 +260,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get)
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
 
        if (get) {
-               IRDA_DEBUG(0, "%s(), not imp!\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), not imp!\n", __func__ );
        } else {
-               IRDA_DEBUG(0, "%s(), port-name=%s\n", __FUNCTION__ , param->pv.c);
+               IRDA_DEBUG(0, "%s(), port-name=%s\n", __func__ , param->pv.c);
                strncpy(self->settings.port_name, param->pv.c, 32);
        }
 
@@ -287,7 +287,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get)
        else
                self->settings.data_rate = param->pv.i;
 
-       IRDA_DEBUG(2, "%s(), data rate = %d\n", __FUNCTION__ , param->pv.i);
+       IRDA_DEBUG(2, "%s(), data rate = %d\n", __func__ , param->pv.i);
 
        return 0;
 }
@@ -333,7 +333,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param,
        else
                self->settings.flow_control = (__u8) param->pv.i;
 
-       IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i);
+       IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __func__ , (__u8) param->pv.i);
 
        return 0;
 }
@@ -359,7 +359,7 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get)
                self->settings.xonxoff[1] = (__u16) param->pv.i >> 8;
        }
 
-       IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __FUNCTION__ ,
+       IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ ,
                   param->pv.i & 0xff, param->pv.i >> 8);
 
        return 0;
@@ -386,7 +386,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
                self->settings.enqack[1] = (__u16) param->pv.i >> 8;
        }
 
-       IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __FUNCTION__ ,
+       IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ ,
                   param->pv.i & 0xff, param->pv.i >> 8);
 
        return 0;
@@ -401,7 +401,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
 static int ircomm_param_line_status(void *instance, irda_param_t *param,
                                    int get)
 {
-       IRDA_DEBUG(2, "%s(), not impl.\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s(), not impl.\n", __func__ );
 
        return 0;
 }
@@ -462,7 +462,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
        __u8 dce;
 
-       IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i);
+       IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __func__ , (__u8) param->pv.i);
 
        dce = (__u8) param->pv.i;
 
@@ -474,7 +474,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
        /* Check if any of the settings have changed */
        if (dce & 0x0f) {
                if (dce & IRCOMM_DELTA_CTS) {
-                       IRDA_DEBUG(2, "%s(), CTS \n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), CTS \n", __func__ );
                }
        }
 
index 712eafd..6e6509f 100644 (file)
@@ -78,7 +78,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
 {
        notify_t notify;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        /* Register callbacks */
        irda_notify_init(&notify);
@@ -93,7 +93,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
        self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT,
                                     &notify);
        if (!self->tsap) {
-               IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ );
                return -1;
        }
        self->slsap_sel = self->tsap->stsap_sel;
@@ -121,7 +121,7 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self,
 {
        int ret = 0;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        /* Don't forget to refcount it - should be NULL anyway */
        if(userdata)
@@ -145,7 +145,7 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self,
 {
        int ret;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        /* Don't forget to refcount it - should be NULL anyway */
        if(userdata)
@@ -173,7 +173,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
 
        IRDA_ASSERT(skb != NULL, return -1;);
 
-       IRDA_DEBUG(2, "%s(), clen=%d\n", __FUNCTION__ , clen);
+       IRDA_DEBUG(2, "%s(), clen=%d\n", __func__ , clen);
 
        /*
         * 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,
 
        ret = irttp_data_request(self->tsap, skb);
        if (ret) {
-               IRDA_ERROR("%s(), failed\n", __FUNCTION__);
+               IRDA_ERROR("%s(), failed\n", __func__);
                /* irttp_data_request already free the packet */
        }
 
@@ -208,7 +208,7 @@ static int ircomm_ttp_data_indication(void *instance, void *sap,
 {
        struct ircomm_cb *self = (struct ircomm_cb *) instance;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -231,7 +231,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
        struct ircomm_cb *self = (struct ircomm_cb *) instance;
        struct ircomm_info info;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -240,7 +240,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
 
        if (max_sdu_size != TTP_SAR_DISABLE) {
                IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
-                          __FUNCTION__);
+                          __func__);
                goto out;
        }
 
@@ -272,7 +272,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
        struct ircomm_cb *self = (struct ircomm_cb *)instance;
        struct ircomm_info info;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -281,7 +281,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
 
        if (max_sdu_size != TTP_SAR_DISABLE) {
                IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n",
-                          __FUNCTION__);
+                          __func__);
                goto out;
        }
 
@@ -331,7 +331,7 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap,
        struct ircomm_cb *self = (struct ircomm_cb *) instance;
        struct ircomm_info info;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
@@ -356,7 +356,7 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap,
 {
        struct ircomm_cb *self = (struct ircomm_cb *) instance;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
index be627e1..d262041 100644 (file)
@@ -115,7 +115,7 @@ static int __init ircomm_tty_init(void)
                return -ENOMEM;
        ircomm_tty = hashbin_new(HB_LOCK);
        if (ircomm_tty == NULL) {
-               IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__);
+               IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
                put_tty_driver(driver);
                return -ENOMEM;
        }
@@ -133,7 +133,7 @@ static int __init ircomm_tty_init(void)
        tty_set_operations(driver, &ops);
        if (tty_register_driver(driver)) {
                IRDA_ERROR("%s(): Couldn't register serial driver\n",
-                          __FUNCTION__);
+                          __func__);
                put_tty_driver(driver);
                return -1;
        }
@@ -142,7 +142,7 @@ static int __init ircomm_tty_init(void)
 
 static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
 {
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -163,12 +163,12 @@ static void __exit ircomm_tty_cleanup(void)
 {
        int ret;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        ret = tty_unregister_driver(driver);
        if (ret) {
                IRDA_ERROR("%s(), failed to unregister driver\n",
-                          __FUNCTION__);
+                          __func__);
                return;
        }
 
@@ -187,14 +187,14 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
        notify_t notify;
        int ret = -ENODEV;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
 
        /* Check if already open */
        if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) {
-               IRDA_DEBUG(2, "%s(), already open so break out!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), already open so break out!\n", __func__ );
                return 0;
        }
 
@@ -224,7 +224,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
        /* Connect IrCOMM link with remote device */
        ret = ircomm_tty_attach_cable(self);
        if (ret < 0) {
-               IRDA_ERROR("%s(), error attaching cable!\n", __FUNCTION__);
+               IRDA_ERROR("%s(), error attaching cable!\n", __func__);
                goto err;
        }
 
@@ -249,7 +249,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
        unsigned long   flags;
        struct tty_struct *tty;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        tty = self->tty;
 
@@ -260,12 +260,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
        if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){
                /* nonblock mode is set or port is not enabled */
                self->flags |= ASYNC_NORMAL_ACTIVE;
-               IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __FUNCTION__ );
+               IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __func__ );
                return 0;
        }
 
        if (tty->termios->c_cflag & CLOCAL) {
-               IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __FUNCTION__ );
+               IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __func__ );
                do_clocal = 1;
        }
 
@@ -368,7 +368,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
        unsigned long   flags;
        int ret;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        line = tty->index;
        if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
@@ -381,7 +381,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
                /* No, so make new instance */
                self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
                if (self == NULL) {
-                       IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__);
+                       IRDA_ERROR("%s(), kmalloc failed!\n", __func__);
                        return -ENOMEM;
                }
 
@@ -420,7 +420,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
        self->tty = tty;
        spin_unlock_irqrestore(&self->spinlock, flags);
 
-       IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver->name,
+       IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name,
                   self->line, self->open_count);
 
        /* 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)
 
                if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) {
                        IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n",
-                                    __FUNCTION__);
+                                    __func__);
                        return -ERESTARTSYS;
                }
 
@@ -460,9 +460,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
                self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
                /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
                self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */
-               IRDA_DEBUG(2, "%s(), IrCOMM device\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IrCOMM device\n", __func__ );
        } else {
-               IRDA_DEBUG(2, "%s(), IrLPT device\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ );
                self->service_type = IRCOMM_3_WIRE_RAW;
                self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */
        }
@@ -474,7 +474,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
        ret = ircomm_tty_block_til_ready(self, filp);
        if (ret) {
                IRDA_DEBUG(2,
-                     "%s(), returning after block_til_ready with %d\n", __FUNCTION__ ,
+                     "%s(), returning after block_til_ready with %d\n", __func__ ,
                      ret);
 
                return ret;
@@ -493,7 +493,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
        unsigned long flags;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        if (!tty)
                return;
@@ -506,7 +506,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
        if (tty_hung_up_p(filp)) {
                spin_unlock_irqrestore(&self->spinlock, flags);
 
-               IRDA_DEBUG(0, "%s(), returning 1\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), returning 1\n", __func__ );
                return;
        }
 
@@ -519,20 +519,20 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
                 * serial port won't be shutdown.
                 */
                IRDA_DEBUG(0, "%s(), bad serial port count; "
-                          "tty->count is 1, state->count is %d\n", __FUNCTION__ ,
+                          "tty->count is 1, state->count is %d\n", __func__ ,
                           self->open_count);
                self->open_count = 1;
        }
 
        if (--self->open_count < 0) {
                IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n",
-                          __FUNCTION__, self->line, self->open_count);
+                          __func__, self->line, self->open_count);
                self->open_count = 0;
        }
        if (self->open_count) {
                spin_unlock_irqrestore(&self->spinlock, flags);
 
-               IRDA_DEBUG(0, "%s(), open count > 0\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
                return;
        }
 
@@ -608,7 +608,7 @@ static void ircomm_tty_do_softint(struct work_struct *work)
        unsigned long flags;
        struct sk_buff *skb, *ctrl_skb;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if (!self || self->magic != IRCOMM_TTY_MAGIC)
                return;
@@ -678,7 +678,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
        int len = 0;
        int size;
 
-       IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __FUNCTION__ , count,
+       IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __func__ , count,
                   tty->hw_stopped);
 
        IRDA_ASSERT(self != NULL, return -1;);
@@ -701,7 +701,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
         * we don't mess up the original "safe skb" (see tx_data_size).
         * Jean II */
        if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) {
-               IRDA_DEBUG(1, "%s() : not initialised\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s() : not initialised\n", __func__);
 #ifdef IRCOMM_NO_TX_BEFORE_INIT
                /* We didn't consume anything, TTY will retry */
                return 0;
@@ -830,7 +830,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty)
                        ret = self->max_data_size;
                spin_unlock_irqrestore(&self->spinlock, flags);
        }
-       IRDA_DEBUG(2, "%s(), ret=%d\n", __FUNCTION__ , ret);
+       IRDA_DEBUG(2, "%s(), ret=%d\n", __func__ , ret);
 
        return ret;
 }
@@ -847,7 +847,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
        unsigned long orig_jiffies, poll_time;
        unsigned long flags;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -882,7 +882,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty)
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -913,7 +913,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -928,7 +928,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
                self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS);
 
                ircomm_param_request(self, IRCOMM_DTE, TRUE);
-               IRDA_DEBUG(1, "%s(), FLOW_START\n", __FUNCTION__ );
+               IRDA_DEBUG(1, "%s(), FLOW_START\n", __func__ );
        }
        ircomm_flow_request(self->ircomm, FLOW_START);
 }
@@ -965,7 +965,7 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self)
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        if (!test_and_clear_bit(ASYNC_B_INITIALIZED, &self->flags))
                return;
@@ -1008,7 +1008,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
        unsigned long   flags;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -1037,7 +1037,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
  */
 static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch)
 {
-       IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s(), not impl\n", __func__ );
 }
 
 /*
@@ -1081,7 +1081,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
        struct tty_struct *tty;
        int status;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -1095,14 +1095,14 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
        }
        if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) {
                IRDA_DEBUG(2,
-                          "%s(), ircomm%d CD now %s...\n", __FUNCTION__ , self->line,
+                          "%s(), ircomm%d CD now %s...\n", __func__ , self->line,
                           (status & IRCOMM_CD) ? "on" : "off");
 
                if (status & IRCOMM_CD) {
                        wake_up_interruptible(&self->open_wait);
                } else {
                        IRDA_DEBUG(2,
-                                  "%s(), Doing serial hangup..\n", __FUNCTION__ );
+                                  "%s(), Doing serial hangup..\n", __func__ );
                        if (tty)
                                tty_hangup(tty);
 
@@ -1114,7 +1114,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
                if (tty->hw_stopped) {
                        if (status & IRCOMM_CTS) {
                                IRDA_DEBUG(2,
-                                          "%s(), CTS tx start...\n", __FUNCTION__ );
+                                          "%s(), CTS tx start...\n", __func__ );
                                tty->hw_stopped = 0;
 
                                /* Wake up processes blocked on open */
@@ -1126,7 +1126,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
                } else {
                        if (!(status & IRCOMM_CTS)) {
                                IRDA_DEBUG(2,
-                                          "%s(), CTS tx stop...\n", __FUNCTION__ );
+                                          "%s(), CTS tx stop...\n", __func__ );
                                tty->hw_stopped = 1;
                        }
                }
@@ -1144,14 +1144,14 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
        IRDA_ASSERT(skb != NULL, return -1;);
 
        if (!self->tty) {
-               IRDA_DEBUG(0, "%s(), no tty!\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), no tty!\n", __func__ );
                return 0;
        }
 
@@ -1162,7 +1162,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
         * params, we can just as well declare the hardware for running.
         */
        if (self->tty->hw_stopped && (self->flow == FLOW_START)) {
-               IRDA_DEBUG(0, "%s(), polling for line settings!\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), polling for line settings!\n", __func__ );
                ircomm_param_request(self, IRCOMM_POLL, TRUE);
 
                /* We can just as well declare the hardware for running */
@@ -1194,7 +1194,7 @@ static int ircomm_tty_control_indication(void *instance, void *sap,
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
        int clen;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
@@ -1230,7 +1230,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
 
        switch (cmd) {
        case FLOW_START:
-               IRDA_DEBUG(2, "%s(), hw start!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), hw start!\n", __func__ );
                tty->hw_stopped = 0;
 
                /* ircomm_tty_do_softint will take care of the rest */
@@ -1238,7 +1238,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
                break;
        default:  /* If we get here, something is very wrong, better stop */
        case FLOW_STOP:
-               IRDA_DEBUG(2, "%s(), hw stopped!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ );
                tty->hw_stopped = 1;
                break;
        }
index b5a1388..9032a1d 100644 (file)
@@ -129,14 +129,14 @@ static int (*state[])(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
  */
 int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
 {
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
 
        /* Check if somebody has already connected to us */
        if (ircomm_is_connected(self->ircomm)) {
-               IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), already connected!\n", __func__ );
                return 0;
        }
 
@@ -158,7 +158,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
  */
 void ircomm_tty_detach_cable(struct ircomm_tty_cb *self)
 {
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -207,7 +207,7 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self)
        __u8 oct_seq[6];
        __u16 hints;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -308,16 +308,16 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self)
         * Set default values, but only if the application for some reason
         * haven't set them already
         */
-       IRDA_DEBUG(2, "%s(), data-rate = %d\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s(), data-rate = %d\n", __func__ ,
                   self->settings.data_rate);
        if (!self->settings.data_rate)
                self->settings.data_rate = 9600;
-       IRDA_DEBUG(2, "%s(), data-format = %d\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s(), data-format = %d\n", __func__ ,
                   self->settings.data_format);
        if (!self->settings.data_format)
                self->settings.data_format = IRCOMM_WSIZE_8;  /* 8N1 */
 
-       IRDA_DEBUG(2, "%s(), flow-control = %d\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s(), flow-control = %d\n", __func__ ,
                   self->settings.flow_control);
        /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/
 
@@ -362,7 +362,7 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery,
        struct ircomm_tty_cb *self;
        struct ircomm_tty_info info;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Important note :
         * We need to drop all passive discoveries.
@@ -398,7 +398,7 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap,
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -428,7 +428,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -439,13 +439,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
 
        /* Check if request succeeded */
        if (result != IAS_SUCCESS) {
-               IRDA_DEBUG(4, "%s(), got NULL value!\n", __FUNCTION__ );
+               IRDA_DEBUG(4, "%s(), got NULL value!\n", __func__ );
                return;
        }
 
        switch (value->type) {
        case IAS_OCT_SEQ:
-               IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), got octet sequence\n", __func__ );
 
                irda_param_extract_all(self, value->t.oct_seq, value->len,
                                       &ircomm_param_info);
@@ -455,21 +455,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
                break;
        case IAS_INTEGER:
                /* Got LSAP selector */
-               IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __func__ ,
                           value->t.integer);
 
                if (value->t.integer == -1) {
-                       IRDA_DEBUG(0, "%s(), invalid value!\n", __FUNCTION__ );
+                       IRDA_DEBUG(0, "%s(), invalid value!\n", __func__ );
                } else
                        self->dlsap_sel = value->t.integer;
 
                ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL);
                break;
        case IAS_MISSING:
-               IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(0, "%s(), got unknown type!\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), got unknown type!\n", __func__ );
                break;
        }
        irias_delete_value(value);
@@ -489,7 +489,7 @@ void ircomm_tty_connect_confirm(void *instance, void *sap,
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -520,7 +520,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
        int clen;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -549,7 +549,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
  */
 void ircomm_tty_link_established(struct ircomm_tty_cb *self)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -566,10 +566,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self)
         * line.
         */
        if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) {
-               IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __func__ );
                return;
        } else {
-               IRDA_DEBUG(1, "%s(), starting hardware!\n", __FUNCTION__ );
+               IRDA_DEBUG(1, "%s(), starting hardware!\n", __func__ );
 
                self->tty->hw_stopped = 0;
 
@@ -607,7 +607,7 @@ static void ircomm_tty_watchdog_timer_expired(void *data)
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        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,
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
 
-       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
                   ircomm_tty_state[self->state], ircomm_tty_event[event]);
 
        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_
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
 
-       IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __func__ ,
                   ircomm_tty_state[self->state], self->service_type);
        */
        self->state = state;
@@ -665,7 +665,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
 {
        int ret = 0;
 
-       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
                   ircomm_tty_state[self->state], ircomm_tty_event[event]);
        switch (event) {
        case IRCOMM_TTY_ATTACH_CABLE:
@@ -681,7 +681,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
 
                if (self->iriap) {
                        IRDA_WARNING("%s(), busy with a previous query\n",
-                                    __FUNCTION__);
+                                    __func__);
                        return -EBUSY;
                }
 
@@ -709,7 +709,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
                ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_tty_event[event]);
                ret = -EINVAL;
        }
@@ -729,7 +729,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
 {
        int ret = 0;
 
-       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
                   ircomm_tty_state[self->state], ircomm_tty_event[event]);
 
        switch (event) {
@@ -739,7 +739,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
 
                if (self->iriap) {
                        IRDA_WARNING("%s(), busy with a previous query\n",
-                                    __FUNCTION__);
+                                    __func__);
                        return -EBUSY;
                }
 
@@ -782,7 +782,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
                ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_tty_event[event]);
                ret = -EINVAL;
        }
@@ -802,14 +802,14 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
 {
        int ret = 0;
 
-       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
                   ircomm_tty_state[self->state], ircomm_tty_event[event]);
 
        switch (event) {
        case IRCOMM_TTY_GOT_PARAMETERS:
                if (self->iriap) {
                        IRDA_WARNING("%s(), busy with a previous query\n",
-                                    __FUNCTION__);
+                                    __func__);
                        return -EBUSY;
                }
 
@@ -840,7 +840,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
                ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_tty_event[event]);
                ret = -EINVAL;
        }
@@ -860,7 +860,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
 {
        int ret = 0;
 
-       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
                   ircomm_tty_state[self->state], ircomm_tty_event[event]);
 
        switch (event) {
@@ -889,7 +889,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
                ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_tty_event[event]);
                ret = -EINVAL;
        }
@@ -909,7 +909,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
 {
        int ret = 0;
 
-       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
+       IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ ,
                   ircomm_tty_state[self->state], ircomm_tty_event[event]);
 
        switch (event) {
@@ -943,7 +943,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
                ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_tty_event[event]);
                ret = -EINVAL;
        }
@@ -981,13 +981,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self,
                        self->settings.dce = IRCOMM_DELTA_CD;
                        ircomm_tty_check_modem_status(self);
                } else {
-                       IRDA_DEBUG(0, "%s(), hanging up!\n", __FUNCTION__ );
+                       IRDA_DEBUG(0, "%s(), hanging up!\n", __func__ );
                        if (self->tty)
                                tty_hangup(self->tty);
                }
                break;
        default:
-               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ ,
                           ircomm_tty_event[event]);
                ret = -EINVAL;
        }
index 6030947..24cb3aa 100644 (file)
@@ -57,7 +57,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
        unsigned cflag, cval;
        int baud;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if (!self->tty || !self->tty->termios || !self->ircomm)
                return;
@@ -94,7 +94,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
                self->settings.flow_control |= IRCOMM_RTS_CTS_IN;
                /* This got me. Bummer. Jean II */
                if (self->service_type == IRCOMM_3_WIRE_RAW)
-                       IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __FUNCTION__);
+                       IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __func__);
        } else {
                self->flags &= ~ASYNC_CTS_FLOW;
                self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN;
@@ -150,7 +150,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty,
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
        unsigned int cflag = tty->termios->c_cflag;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if ((cflag == old_termios->c_cflag) &&
            (RELEVANT_IFLAG(tty->termios->c_iflag) ==
@@ -199,7 +199,7 @@ int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file)
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
        unsigned int result;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if (tty->flags & (1 << TTY_IO_ERROR))
                return -EIO;
@@ -224,7 +224,7 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file,
 {
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if (tty->flags & (1 << TTY_IO_ERROR))
                return -EIO;
@@ -266,7 +266,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
        if (!retinfo)
                return -EFAULT;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        memset(&info, 0, sizeof(info));
        info.line = self->line;
@@ -302,7 +302,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self,
        struct serial_struct new_serial;
        struct ircomm_tty_cb old_state, *state;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
                return -EFAULT;
@@ -376,7 +376,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
        struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
        int ret = 0;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
            (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
@@ -397,7 +397,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
                break;
 
        case TIOCGICOUNT:
-               IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ );
 #if 0
                save_flags(flags); cli();
                cnow = driver->icount;
index 8718591..ea319e3 100644 (file)
@@ -90,7 +90,7 @@ static void leftover_dongle(void *arg)
 
 void irda_device_cleanup(void)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
 
@@ -107,7 +107,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
 {
        struct irlap_cb *self;
 
-       IRDA_DEBUG(4, "%s(%s)\n", __FUNCTION__, status ? "TRUE" : "FALSE");
+       IRDA_DEBUG(4, "%s(%s)\n", __func__, status ? "TRUE" : "FALSE");
 
        self = (struct irlap_cb *) dev->atalk_ptr;
 
@@ -147,11 +147,11 @@ int irda_device_is_receiving(struct net_device *dev)
        struct if_irda_req req;
        int ret;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        if (!dev->do_ioctl) {
                IRDA_ERROR("%s: do_ioctl not impl. by device driver\n",
-                          __FUNCTION__);
+                          __func__);
                return -1;
        }
 
@@ -191,7 +191,7 @@ static int irda_task_kick(struct irda_task *task)
        int count = 0;
        int timeout;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        IRDA_ASSERT(task != NULL, return -1;);
        IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
@@ -201,14 +201,14 @@ static int irda_task_kick(struct irda_task *task)
                timeout = task->function(task);
                if (count++ > 100) {
                        IRDA_ERROR("%s: error in task handler!\n",
-                                  __FUNCTION__);
+                                  __func__);
                        irda_task_delete(task);
                        return TRUE;
                }
        } while ((timeout == 0) && (task->state != IRDA_TASK_DONE));
 
        if (timeout < 0) {
-               IRDA_ERROR("%s: Error executing task!\n", __FUNCTION__);
+               IRDA_ERROR("%s: Error executing task!\n", __func__);
                irda_task_delete(task);
                return TRUE;
        }
@@ -241,7 +241,7 @@ static int irda_task_kick(struct irda_task *task)
                finished = FALSE;
        } else {
                IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n",
-                          __FUNCTION__);
+                          __func__);
                finished = FALSE;
        }
 
@@ -258,7 +258,7 @@ static void irda_task_timer_expired(void *data)
 {
        struct irda_task *task;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        task = (struct irda_task *) data;
 
index 390a790..9e15c82 100644 (file)
@@ -108,7 +108,7 @@ int __init iriap_init(void)
        irias_objects = hashbin_new(HB_LOCK);
        if (!irias_objects) {
                IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n",
-                            __FUNCTION__);
+                            __func__);
                hashbin_delete(iriap, NULL);
                return -ENOMEM;
        }
@@ -139,7 +139,7 @@ int __init iriap_init(void)
         */
        server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
        if (!server) {
-               IRDA_DEBUG(0, "%s(), unable to open server\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), unable to open server\n", __func__);
                return -1;
        }
        iriap_register_lsap(server, LSAP_IAS, IAS_SERVER);
@@ -171,11 +171,11 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
 {
        struct iriap_cb *self;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        self = kzalloc(sizeof(*self), GFP_ATOMIC);
        if (!self) {
-               IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+               IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
                return NULL;
        }
 
@@ -217,7 +217,7 @@ EXPORT_SYMBOL(iriap_open);
  */
 static void __iriap_close(struct iriap_cb *self)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -241,7 +241,7 @@ void iriap_close(struct iriap_cb *self)
 {
        struct iriap_cb *entry;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        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)
 {
        notify_t notify;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        irda_notify_init(&notify);
        notify.connect_confirm       = iriap_connect_confirm;
@@ -277,7 +277,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
 
        self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0);
        if (self->lsap == NULL) {
-               IRDA_ERROR("%s: Unable to allocated LSAP!\n", __FUNCTION__);
+               IRDA_ERROR("%s: Unable to allocated LSAP!\n", __func__);
                return -1;
        }
        self->slsap_sel = self->lsap->slsap_sel;
@@ -297,7 +297,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
 {
        struct iriap_cb *self;
 
-       IRDA_DEBUG(4, "%s(), reason=%s\n", __FUNCTION__, irlmp_reasons[reason]);
+       IRDA_DEBUG(4, "%s(), reason=%s\n", __func__, irlmp_reasons[reason]);
 
        self = (struct iriap_cb *) instance;
 
@@ -313,7 +313,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
                dev_kfree_skb(skb);
 
        if (self->mode == IAS_CLIENT) {
-               IRDA_DEBUG(4, "%s(), disconnect as client\n", __FUNCTION__);
+               IRDA_DEBUG(4, "%s(), disconnect as client\n", __func__);
 
 
                iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION,
@@ -326,7 +326,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
                if (self->confirm)
                        self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
        } else {
-               IRDA_DEBUG(4, "%s(), disconnect as server\n", __FUNCTION__);
+               IRDA_DEBUG(4, "%s(), disconnect as server\n", __func__);
                iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION,
                                      NULL);
                iriap_close(self);
@@ -340,7 +340,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
 {
        struct sk_buff *tx_skb;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -349,7 +349,7 @@ static void iriap_disconnect_request(struct iriap_cb *self)
        if (tx_skb == NULL) {
                IRDA_DEBUG(0,
                           "%s(), Could not allocate an sk_buff of length %d\n",
-                          __FUNCTION__, LMP_MAX_HEADER);
+                          __func__, LMP_MAX_HEADER);
                return;
        }
 
@@ -453,13 +453,13 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
        /* Get length, MSB first */
        len = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
 
-       IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
+       IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len);
 
        /* Get object ID, MSB first */
        obj_id = be16_to_cpu(get_unaligned((__be16 *)(fp+n))); n += 2;
 
        type = fp[n++];
-       IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type);
+       IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type);
 
        switch (type) {
        case IAS_INTEGER:
@@ -468,7 +468,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
                value = irias_new_integer_value(tmp_cpu32);
 
                /*  Legal values restricted to 0x01-0x6f, page 15 irttp */
-               IRDA_DEBUG(4, "%s(), lsap=%d\n", __FUNCTION__, value->t.integer);
+               IRDA_DEBUG(4, "%s(), lsap=%d\n", __func__, value->t.integer);
                break;
        case IAS_STRING:
                charset = fp[n++];
@@ -488,7 +488,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
 /*             case CS_UNICODE: */
                default:
                        IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
-                                  __FUNCTION__, ias_charset_types[charset]);
+                                  __func__, ias_charset_types[charset]);
 
                        /* Aborting, close connection! */
                        iriap_disconnect_request(self);
@@ -496,7 +496,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
                        /* break; */
                }
                value_len = fp[n++];
-               IRDA_DEBUG(4, "%s(), strlen=%d\n", __FUNCTION__, value_len);
+               IRDA_DEBUG(4, "%s(), strlen=%d\n", __func__, value_len);
 
                /* Make sure the string is null-terminated */
                fp[n+value_len] = 0x00;
@@ -526,7 +526,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
        if (self->confirm)
                self->confirm(IAS_SUCCESS, obj_id, value, self->priv);
        else {
-               IRDA_DEBUG(0, "%s(), missing handler!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), missing handler!\n", __func__);
                irias_delete_value(value);
        }
 }
@@ -548,7 +548,7 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
        __be16 tmp_be16;
        __u8 *fp;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -610,12 +610,12 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
                memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len;
                break;
        case IAS_MISSING:
-               IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __FUNCTION__);
+               IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __func__);
                skb_put(tx_skb, 1);
                fp[n++] = value->type;
                break;
        default:
-               IRDA_DEBUG(0, "%s(), type not implemented!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), type not implemented!\n", __func__);
                break;
        }
        iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb);
@@ -642,7 +642,7 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self,
        __u8 *fp;
        int n;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -697,7 +697,7 @@ void iriap_send_ack(struct iriap_cb *self)
        struct sk_buff *tx_skb;
        __u8 *frame;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(2, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -728,7 +728,7 @@ void iriap_connect_request(struct iriap_cb *self)
                                    self->saddr, self->daddr,
                                    NULL, NULL);
        if (ret < 0) {
-               IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), connect failed!\n", __func__);
                self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
        }
 }
@@ -776,7 +776,7 @@ static void iriap_connect_indication(void *instance, void *sap,
 {
        struct iriap_cb *self, *new;
 
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(1, "%s()\n", __func__);
 
        self = (struct iriap_cb *) instance;
 
@@ -787,14 +787,14 @@ static void iriap_connect_indication(void *instance, void *sap,
        /* Start new server */
        new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
        if (!new) {
-               IRDA_DEBUG(0, "%s(), open failed\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), open failed\n", __func__);
                goto out;
        }
 
        /* Now attach up the new "socket" */
        new->lsap = irlmp_dup(self->lsap, new);
        if (!new->lsap) {
-               IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), dup failed!\n", __func__);
                goto out;
        }
 
@@ -824,7 +824,7 @@ static int iriap_data_indication(void *instance, void *sap,
        __u8  *frame;
        __u8  opcode;
 
-       IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(3, "%s()\n", __func__);
 
        self = (struct iriap_cb *) instance;
 
@@ -836,7 +836,7 @@ static int iriap_data_indication(void *instance, void *sap,
 
        if (self->mode == IAS_SERVER) {
                /* Call server */
-               IRDA_DEBUG(4, "%s(), Calling server!\n", __FUNCTION__);
+               IRDA_DEBUG(4, "%s(), Calling server!\n", __func__);
                iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb);
                goto out;
        }
@@ -844,13 +844,13 @@ static int iriap_data_indication(void *instance, void *sap,
        if (~opcode & IAP_LST) {
                IRDA_WARNING("%s:, IrIAS multiframe commands or "
                             "results is not implemented yet!\n",
-                            __FUNCTION__);
+                            __func__);
                goto out;
        }
 
        /* Check for ack frames since they don't contain any data */
        if (opcode & IAP_ACK) {
-               IRDA_DEBUG(0, "%s() Got ack frame!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s() Got ack frame!\n", __func__);
                goto out;
        }
 
@@ -868,7 +868,7 @@ static int iriap_data_indication(void *instance, void *sap,
                        iriap_getvaluebyclass_confirm(self, skb);
                        break;
                case IAS_CLASS_UNKNOWN:
-                       IRDA_DEBUG(1, "%s(), No such class!\n", __FUNCTION__);
+                       IRDA_DEBUG(1, "%s(), No such class!\n", __func__);
                        /* Finished, close connection! */
                        iriap_disconnect_request(self);
 
@@ -881,7 +881,7 @@ static int iriap_data_indication(void *instance, void *sap,
                                              self->priv);
                        break;
                case IAS_ATTRIB_UNKNOWN:
-                       IRDA_DEBUG(1, "%s(), No such attribute!\n", __FUNCTION__);
+                       IRDA_DEBUG(1, "%s(), No such attribute!\n", __func__);
                        /* Finished, close connection! */
                        iriap_disconnect_request(self);
 
@@ -896,7 +896,7 @@ static int iriap_data_indication(void *instance, void *sap,
                }
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __FUNCTION__,
+               IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __func__,
                           opcode);
                break;
        }
@@ -918,7 +918,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
        __u8 *fp;
        __u8 opcode;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -929,7 +929,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
        opcode = fp[0];
        if (~opcode & 0x80) {
                IRDA_WARNING("%s: IrIAS multiframe commands or results "
-                            "is not implemented yet!\n", __FUNCTION__);
+                            "is not implemented yet!\n", __func__);
                return;
        }
        opcode &= 0x7f; /* Mask away LST bit */
@@ -937,7 +937,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
        switch (opcode) {
        case GET_INFO_BASE:
                IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n",
-                            __FUNCTION__);
+                            __func__);
                break;
        case GET_VALUE_BY_CLASS:
                iriap_getvaluebyclass_indication(self, skb);
index 8fb9d72..a301cbd 100644 (file)
@@ -185,7 +185,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
        case IAP_LM_DISCONNECT_INDICATION:
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
                break;
        }
 }
@@ -217,7 +217,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event,
                iriap_next_client_state(self, S_DISCONNECT);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
                break;
        }
 }
@@ -269,7 +269,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
                iriap_next_call_state(self, S_OUTSTANDING);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
                break;
        }
 }
@@ -283,7 +283,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event,
                            struct sk_buff *skb)
 {
-       IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
 }
 
 /*
@@ -305,7 +305,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
                iriap_next_call_state(self, S_WAIT_FOR_CALL);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
+               IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event);
                break;
        }
 }
@@ -318,7 +318,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
                             struct sk_buff *skb)
 {
-       IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
 }
 
 /*
@@ -330,7 +330,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
                                  struct sk_buff *skb)
 {
-       IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
 }
 
 
@@ -343,7 +343,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
                                struct sk_buff *skb)
 {
-       IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
 }
 
 /**************************************************************************
@@ -367,7 +367,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
        case IAP_LM_CONNECT_INDICATION:
                tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
                if (tx_skb == NULL) {
-                       IRDA_WARNING("%s: unable to malloc!\n", __FUNCTION__);
+                       IRDA_WARNING("%s: unable to malloc!\n", __func__);
                        return;
                }
 
@@ -386,7 +386,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
                iriap_next_r_connect_state(self, R_RECEIVING);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), unknown event %d\n", __FUNCTION__, event);
+               IRDA_DEBUG(0, "%s(), unknown event %d\n", __func__, event);
                break;
        }
 }
@@ -397,7 +397,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
                         struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        switch (event) {
        case IAP_LM_DISCONNECT_INDICATION:
@@ -406,7 +406,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
                iriap_next_r_connect_state(self, R_WAITING);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
                break;
        }
 }
@@ -421,13 +421,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event,
                            struct sk_buff *skb)
 {
-       IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
 }
 
 static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
                                struct sk_buff *skb)
 {
-       IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s(), Not implemented\n", __func__);
 }
 
 /*
@@ -439,7 +439,7 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
                              struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        switch (event) {
        case IAP_RECV_F_LST:
@@ -448,7 +448,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
                iriap_call_indication(self, skb);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
                break;
        }
 }
@@ -462,7 +462,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
                            struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(skb != NULL, return;);
        IRDA_ASSERT(self != NULL, return;);
@@ -483,7 +483,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
                irlmp_data_request(self->lsap, skb);
                break;
        default:
-               IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), unknown event!\n", __func__);
                break;
        }
 }
@@ -491,7 +491,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
 static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event,
                              struct sk_buff *skb)
 {
-       IRDA_DEBUG(0, "%s(), event=%d\n", __FUNCTION__, event);
+       IRDA_DEBUG(0, "%s(), event=%d\n", __func__, event);
 
        switch (event) {
        case IAP_RECV_F_LST:
index cbcf043..99ebb96 100644 (file)
@@ -47,12 +47,12 @@ struct ias_object *irias_new_object( char *name, int id)
 {
        struct ias_object *obj;
 
-       IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG( 4, "%s()\n", __func__);
 
        obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
        if (obj == NULL) {
                IRDA_WARNING("%s(), Unable to allocate object!\n",
-                            __FUNCTION__);
+                            __func__);
                return NULL;
        }
 
@@ -60,7 +60,7 @@ struct ias_object *irias_new_object( char *name, int id)
        obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC);
        if (!obj->name) {
                IRDA_WARNING("%s(), Unable to allocate name!\n",
-                            __FUNCTION__);
+                            __func__);
                kfree(obj);
                return NULL;
        }
@@ -73,7 +73,7 @@ struct ias_object *irias_new_object( char *name, int id)
 
        if (obj->attribs == NULL) {
                IRDA_WARNING("%s(), Unable to allocate attribs!\n",
-                            __FUNCTION__);
+                            __func__);
                kfree(obj->name);
                kfree(obj);
                return NULL;
@@ -134,7 +134,7 @@ int irias_delete_object(struct ias_object *obj)
        node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj);
        if (!node)
                IRDA_DEBUG( 0, "%s(), object already removed!\n",
-                           __FUNCTION__);
+                           __func__);
 
        /* Destroy */
        __irias_delete_object(obj);
@@ -268,7 +268,7 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
        /* Find object */
        obj = hashbin_lock_find(irias_objects, 0, obj_name);
        if (obj == NULL) {
-               IRDA_WARNING("%s: Unable to find object: %s\n", __FUNCTION__,
+               IRDA_WARNING("%s: Unable to find object: %s\n", __func__,
                             obj_name);
                return -1;
        }
@@ -280,14 +280,14 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
        attrib = hashbin_find(obj->attribs, 0, attrib_name);
        if (attrib == NULL) {
                IRDA_WARNING("%s: Unable to find attribute: %s\n",
-                            __FUNCTION__, attrib_name);
+                            __func__, attrib_name);
                spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
                return -1;
        }
 
        if ( attrib->value->type != new_value->type) {
                IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n",
-                           __FUNCTION__);
+                           __func__);
                spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
                return -1;
        }
@@ -322,7 +322,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
        attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
        if (attrib == NULL) {
                IRDA_WARNING("%s: Unable to allocate attribute!\n",
-                            __FUNCTION__);
+                            __func__);
                return;
        }
 
@@ -333,7 +333,7 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
        attrib->value = irias_new_integer_value(value);
        if (!attrib->name || !attrib->value) {
                IRDA_WARNING("%s: Unable to allocate attribute!\n",
-                            __FUNCTION__);
+                            __func__);
                if (attrib->value)
                        irias_delete_value(attrib->value);
                kfree(attrib->name);
@@ -366,7 +366,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
        attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
        if (attrib == NULL) {
                IRDA_WARNING("%s: Unable to allocate attribute!\n",
-                            __FUNCTION__);
+                            __func__);
                return;
        }
 
@@ -376,7 +376,7 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
        attrib->value = irias_new_octseq_value( octets, len);
        if (!attrib->name || !attrib->value) {
                IRDA_WARNING("%s: Unable to allocate attribute!\n",
-                            __FUNCTION__);
+                            __func__);
                if (attrib->value)
                        irias_delete_value(attrib->value);
                kfree(attrib->name);
@@ -408,7 +408,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
        attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC);
        if (attrib == NULL) {
                IRDA_WARNING("%s: Unable to allocate attribute!\n",
-                            __FUNCTION__);
+                            __func__);
                return;
        }
 
@@ -418,7 +418,7 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
        attrib->value = irias_new_string_value(value);
        if (!attrib->name || !attrib->value) {
                IRDA_WARNING("%s: Unable to allocate attribute!\n",
-                            __FUNCTION__);
+                            __func__);
                if (attrib->value)
                        irias_delete_value(attrib->value);
                kfree(attrib->name);
@@ -442,7 +442,7 @@ struct ias_value *irias_new_integer_value(int integer)
 
        value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
        if (value == NULL) {
-               IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+               IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
                return NULL;
        }
 
@@ -467,7 +467,7 @@ struct ias_value *irias_new_string_value(char *string)
 
        value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
        if (value == NULL) {
-               IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+               IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
                return NULL;
        }
 
@@ -475,7 +475,7 @@ struct ias_value *irias_new_string_value(char *string)
        value->charset = CS_ASCII;
        value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC);
        if (!value->t.string) {
-               IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+               IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
                kfree(value);
                return NULL;
        }
@@ -498,7 +498,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
 
        value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
        if (value == NULL) {
-               IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+               IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
                return NULL;
        }
 
@@ -510,7 +510,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
 
        value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC);
        if (value->t.oct_seq == NULL){
-               IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+               IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
                kfree(value);
                return NULL;
        }
@@ -523,7 +523,7 @@ struct ias_value *irias_new_missing_value(void)
 
        value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
        if (value == NULL) {
-               IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
+               IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
                return NULL;
        }
 
@@ -540,7 +540,7 @@ struct ias_value *irias_new_missing_value(void)
  */
 void irias_delete_value(struct ias_value *value)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(value != NULL, return;);
 
@@ -558,7 +558,7 @@ void irias_delete_value(struct ias_value *value)
                 kfree(value->t.oct_seq);
                 break;
        default:
-               IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__);
                break;
        }
        kfree(value);
index fff52d5..6be1ec2 100644 (file)
@@ -72,7 +72,7 @@ static void irlan_client_kick_timer_expired(void *data)
 {
        struct irlan_cb *self = (struct irlan_cb *) data;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -91,7 +91,7 @@ static void irlan_client_kick_timer_expired(void *data)
 
 static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        irda_start_timer(&self->client.kick_timer, timeout, (void *) self,
                         irlan_client_kick_timer_expired);
@@ -105,7 +105,7 @@ static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
  */
 void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
 {
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(1, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -117,7 +117,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
        if ((self->client.state != IRLAN_IDLE) ||
            (self->provider.access_type == ACCESS_DIRECT))
        {
-                       IRDA_DEBUG(0, "%s(), already awake!\n", __FUNCTION__ );
+                       IRDA_DEBUG(0, "%s(), already awake!\n", __func__ );
                        return;
        }
 
@@ -126,7 +126,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
        self->daddr = daddr;
 
        if (self->disconnect_reason == LM_USER_REQUEST) {
-                       IRDA_DEBUG(0, "%s(), still stopped by user\n", __FUNCTION__ );
+                       IRDA_DEBUG(0, "%s(), still stopped by user\n", __func__ );
                        return;
        }
 
@@ -153,7 +153,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
        struct irlan_cb *self;
        __u32 saddr, daddr;
 
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(1, "%s()\n", __func__ );
 
        IRDA_ASSERT(discovery != NULL, return;);
 
@@ -175,7 +175,7 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
        if (self) {
                IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;);
 
-               IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ ,
+               IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __func__ ,
                      daddr);
 
                irlan_client_wakeup(self, saddr, daddr);
@@ -195,7 +195,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
 {
        struct irlan_cb *self;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        self = (struct irlan_cb *) instance;
 
@@ -206,7 +206,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
        irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb);
 
        /* Ready for a new command */
-       IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __func__ );
        self->client.tx_busy = FALSE;
 
        /* 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,
        struct tsap_cb *tsap;
        struct sk_buff *skb;
 
-       IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason);
+       IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason);
 
        self = (struct irlan_cb *) instance;
        tsap = (struct tsap_cb *) sap;
@@ -255,7 +255,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
        struct tsap_cb *tsap;
        notify_t notify;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -275,7 +275,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
 
        tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
        if (!tsap) {
-               IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
                return;
        }
        self->client.tsap_ctrl = tsap;
@@ -295,7 +295,7 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap,
 {
        struct irlan_cb *self;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        self = (struct irlan_cb *) instance;
 
@@ -374,13 +374,13 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
 
        IRDA_ASSERT(skb != NULL, return;);
 
-       IRDA_DEBUG(4, "%s() skb->len=%d\n", __FUNCTION__ , (int) skb->len);
+       IRDA_DEBUG(4, "%s() skb->len=%d\n", __func__ , (int) skb->len);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
 
        if (!skb) {
-               IRDA_ERROR("%s(), Got NULL skb!\n", __FUNCTION__);
+               IRDA_ERROR("%s(), Got NULL skb!\n", __func__);
                return;
        }
        frame = skb->data;
@@ -405,7 +405,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
        /* How many parameters? */
        count = frame[1];
 
-       IRDA_DEBUG(4, "%s(), got %d parameters\n", __FUNCTION__ , count);
+       IRDA_DEBUG(4, "%s(), got %d parameters\n", __func__ , count);
 
        ptr = frame+2;
 
@@ -413,7 +413,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
        for (i=0; i<count;i++) {
                ret = irlan_extract_param(ptr, name, value, &val_len);
                if (ret < 0) {
-                       IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
                        break;
                }
                ptr += ret;
@@ -438,7 +438,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
        int i;
        DECLARE_MAC_BUF(mac);
 
-       IRDA_DEBUG(4, "%s(), parm=%s\n", __FUNCTION__ , param);
+       IRDA_DEBUG(4, "%s(), parm=%s\n", __func__ , param);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -476,7 +476,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
                else if (strcmp(value, "HOSTED") == 0)
                        self->client.access_type = ACCESS_HOSTED;
                else {
-                       IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
                }
        }
        /* IRLAN version */
@@ -498,14 +498,14 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
                memcpy(&tmp_cpu, value, 2); /* Align value */
                le16_to_cpus(&tmp_cpu);     /* Convert to host order */
                self->client.recv_arb_val = tmp_cpu;
-               IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __FUNCTION__ ,
+               IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __func__ ,
                           self->client.recv_arb_val);
        }
        if (strcmp(param, "MAX_FRAME") == 0) {
                memcpy(&tmp_cpu, value, 2); /* Align value */
                le16_to_cpus(&tmp_cpu);     /* Convert to host order */
                self->client.max_frame = tmp_cpu;
-               IRDA_DEBUG(4, "%s(), max frame=%d\n", __FUNCTION__ ,
+               IRDA_DEBUG(4, "%s(), max frame=%d\n", __func__ ,
                           self->client.max_frame);
        }
 
@@ -539,7 +539,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
 {
        struct irlan_cb *self;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(priv != NULL, return;);
 
@@ -552,7 +552,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
 
        /* Check if request succeeded */
        if (result != IAS_SUCCESS) {
-               IRDA_DEBUG(2, "%s(), got NULL value!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), got NULL value!\n", __func__ );
                irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL,
                                      NULL);
                return;
@@ -570,7 +570,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
                irias_delete_value(value);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), unknown type!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), unknown type!\n", __func__ );
                break;
        }
        irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL);
index 6afcee5..8d5a8eb 100644 (file)
@@ -92,7 +92,7 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
                                   struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        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,
        case IRLAN_DISCOVERY_INDICATION:
                if (self->client.iriap) {
                        IRDA_WARNING("%s(), busy with a previous query\n",
-                                    __FUNCTION__);
+                                    __func__);
                        return -EBUSY;
                }
 
@@ -114,10 +114,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
                                              "IrLAN", "IrDA:TinyTP:LsapSel");
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -136,7 +136,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
                                    struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        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,
                irlan_next_client_state(self, IRLAN_CONN);
                break;
        case IRLAN_IAS_PROVIDER_NOT_AVAIL:
-               IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __func__ );
                irlan_next_client_state(self, IRLAN_IDLE);
 
                /* Give the client a kick! */
@@ -167,10 +167,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -189,7 +189,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
                                   struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -204,10 +204,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -224,7 +224,7 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
                                   struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -244,10 +244,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -266,7 +266,7 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
                                    struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -281,10 +281,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -305,7 +305,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
 {
        struct qos_info qos;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -344,7 +344,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
                        irlan_next_client_state(self, IRLAN_DATA);
                        break;
                default:
-                       IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ );
                        break;
                }
                break;
@@ -353,10 +353,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
 
@@ -376,7 +376,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
                                   struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -390,10 +390,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -407,7 +407,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
 {
        struct qos_info qos;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -429,7 +429,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
                } else if (self->client.recv_arb_val >
                           self->provider.send_arb_val)
                {
-                       IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __func__ );
                }
                break;
        case IRLAN_DATA_CONNECT_INDICATION:
@@ -440,10 +440,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        case IRLAN_WATCHDOG_TIMEOUT:
-               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -462,7 +462,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
                                   struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        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,
                irlan_next_client_state(self, IRLAN_IDLE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -494,7 +494,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
                                    struct sk_buff *skb)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if (skb)
                dev_kfree_skb(skb);
@@ -511,7 +511,7 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event,
                                   struct sk_buff *skb)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if (skb)
                dev_kfree_skb(skb);
index 1eb4bbc..75bb6a9 100644 (file)
@@ -124,7 +124,7 @@ static int __init irlan_init(void)
        struct irlan_cb *new;
        __u16 hints;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
 #ifdef CONFIG_PROC_FS
        { struct proc_dir_entry *proc;
@@ -136,7 +136,7 @@ static int __init irlan_init(void)
        }
 #endif /* CONFIG_PROC_FS */
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
        hints = irlmp_service_to_hint(S_LAN);
 
        /* Register with IrLMP as a client */
@@ -179,7 +179,7 @@ static void __exit irlan_cleanup(void)
 {
        struct irlan_cb *self, *next;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        irlmp_unregister_client(ckey);
        irlmp_unregister_service(skey);
@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
        struct net_device *dev;
        struct irlan_cb *self;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Create network device with irlan */
        dev = alloc_irlandev(eth ? "eth%d" : "irlan%d");
@@ -252,7 +252,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
 
        if (register_netdev(dev)) {
                IRDA_DEBUG(2, "%s(), register_netdev() failed!\n",
-                          __FUNCTION__ );
+                          __func__ );
                self = NULL;
                free_netdev(dev);
        } else {
@@ -272,7 +272,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
  */
 static void __irlan_close(struct irlan_cb *self)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        ASSERT_RTNL();
        IRDA_ASSERT(self != NULL, return;);
@@ -320,7 +320,7 @@ static void irlan_connect_indication(void *instance, void *sap,
        struct irlan_cb *self;
        struct tsap_cb *tsap;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        self = (struct irlan_cb *) instance;
        tsap = (struct tsap_cb *) sap;
@@ -332,7 +332,7 @@ static void irlan_connect_indication(void *instance, void *sap,
        self->max_sdu_size = max_sdu_size;
        self->max_header_size = max_header_size;
 
-       IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s: We are now connected!\n", __func__);
 
        del_timer(&self->watchdog_timer);
 
@@ -376,7 +376,7 @@ static void irlan_connect_confirm(void *instance, void *sap,
 
        /* TODO: we could set the MTU depending on the max_sdu_size */
 
-       IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__);
+       IRDA_DEBUG(0, "%s: We are now connected!\n", __func__);
        del_timer(&self->watchdog_timer);
 
        /*
@@ -412,7 +412,7 @@ static void irlan_disconnect_indication(void *instance,
        struct irlan_cb *self;
        struct tsap_cb *tsap;
 
-       IRDA_DEBUG(0, "%s(), reason=%d\n", __FUNCTION__ , reason);
+       IRDA_DEBUG(0, "%s(), reason=%d\n", __func__ , reason);
 
        self = (struct irlan_cb *) instance;
        tsap = (struct tsap_cb *) sap;
@@ -431,22 +431,22 @@ static void irlan_disconnect_indication(void *instance,
 
        switch (reason) {
        case LM_USER_REQUEST: /* User request */
-               IRDA_DEBUG(2, "%s(), User requested\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), User requested\n", __func__ );
                break;
        case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */
-               IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __func__ );
                break;
        case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */
-               IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __func__ );
                break;
        case LM_LAP_RESET:  /* IrLAP reset */
-               IRDA_DEBUG(2, "%s(), IrLAP reset\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IrLAP reset\n", __func__ );
                break;
        case LM_INIT_DISCONNECT:
-               IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ );
                break;
        default:
-               IRDA_ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__);
+               IRDA_ERROR("%s(), Unknown disconnect reason\n", __func__);
                break;
        }
 
@@ -468,7 +468,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
        struct tsap_cb *tsap;
        notify_t notify;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -490,7 +490,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
 
        tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
        if (!tsap) {
-               IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
                return;
        }
        self->tsap_data = tsap;
@@ -504,7 +504,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
 
 void irlan_close_tsaps(struct irlan_cb *self)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -594,7 +594,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
 {
        struct sk_buff *skb;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        if (irda_lock(&self->client.tx_busy) == FALSE)
                return -EBUSY;
@@ -613,7 +613,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
                dev_kfree_skb(skb);
                return -1;
        }
-       IRDA_DEBUG(2, "%s(), sending ...\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s(), sending ...\n", __func__ );
 
        return irttp_data_request(self->client.tsap_ctrl, skb);
 }
@@ -626,7 +626,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
  */
 static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb)
 {
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Queue command */
        skb_queue_tail(&self->client.txq, skb);
@@ -646,7 +646,7 @@ void irlan_get_provider_info(struct irlan_cb *self)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -679,7 +679,7 @@ void irlan_open_data_channel(struct irlan_cb *self)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -714,7 +714,7 @@ void irlan_close_data_channel(struct irlan_cb *self)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -755,7 +755,7 @@ static void irlan_open_unicast_addr(struct irlan_cb *self)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -797,7 +797,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -841,7 +841,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -886,7 +886,7 @@ static void irlan_get_unicast_addr(struct irlan_cb *self)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -926,7 +926,7 @@ void irlan_get_media_char(struct irlan_cb *self)
        struct sk_buff *skb;
        __u8 *frame;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -1014,7 +1014,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
        int n=0;
 
        if (skb == NULL) {
-               IRDA_DEBUG(2, "%s(), Got NULL skb\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Got NULL skb\n", __func__ );
                return 0;
        }
 
@@ -1031,7 +1031,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
                IRDA_ASSERT(value_len > 0, return 0;);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ );
                return 0;
                break;
        }
@@ -1041,7 +1041,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
 
        /* Make space for data */
        if (skb_tailroom(skb) < (param_len+value_len+3)) {
-               IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __func__ );
                return 0;
        }
        skb_put(skb, param_len+value_len+3);
@@ -1088,13 +1088,13 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
        __u16 val_len;
        int n=0;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        /* get length of parameter name (1 byte) */
        name_len = buf[n++];
 
        if (name_len > 254) {
-               IRDA_DEBUG(2, "%s(), name_len > 254\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), name_len > 254\n", __func__ );
                return -RSP_INVALID_COMMAND_FORMAT;
        }
 
@@ -1111,7 +1111,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
        le16_to_cpus(&val_len); n+=2;
 
        if (val_len > 1016) {
-               IRDA_DEBUG(2, "%s(), parameter length to long\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), parameter length to long\n", __func__ );
                return -RSP_INVALID_COMMAND_FORMAT;
        }
        *len = val_len;
index 1ab91f7..7a6b14a 100644 (file)
@@ -103,7 +103,7 @@ static int irlan_eth_open(struct net_device *dev)
 {
        struct irlan_cb *self = netdev_priv(dev);
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Ready to play! */
        netif_stop_queue(dev); /* Wait until data link is ready */
@@ -130,7 +130,7 @@ static int irlan_eth_close(struct net_device *dev)
 {
        struct irlan_cb *self = netdev_priv(dev);
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Stop device */
        netif_stop_queue(dev);
@@ -221,7 +221,7 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
        }
        if (skb->len < ETH_HLEN) {
                IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n",
-                          __FUNCTION__, skb->len);
+                          __func__, skb->len);
                ++self->stats.rx_dropped;
                dev_kfree_skb(skb);
                return 0;
@@ -270,7 +270,7 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
 
        IRDA_ASSERT(dev != NULL, return;);
 
-       IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __FUNCTION__,
+       IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __func__,
                   flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
                   netif_running(dev));
 
@@ -332,11 +332,11 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
 {
        struct irlan_cb *self = netdev_priv(dev);
 
-       IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(2, "%s()\n", __func__ );
 
        /* Check if data channel has been connected yet */
        if (self->client.state != IRLAN_DATA) {
-               IRDA_DEBUG(1, "%s(), delaying!\n", __FUNCTION__ );
+               IRDA_DEBUG(1, "%s(), delaying!\n", __func__ );
                return;
        }
 
@@ -346,20 +346,20 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
        }
        else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
                /* Disable promiscuous mode, use normal mode. */
-               IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ );
+               IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
                /* hardware_set_filter(NULL); */
 
                irlan_set_multicast_filter(self, TRUE);
        }
        else if (dev->mc_count) {
-               IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ );
+               IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
                /* Walk the address list, and load the filter */
                /* hardware_set_filter(dev->mc_list); */
 
                irlan_set_multicast_filter(self, TRUE);
        }
        else {
-               IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __FUNCTION__ );
+               IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__ );
                irlan_set_multicast_filter(self, FALSE);
        }
 
index a9750a8..cbcb4eb 100644 (file)
@@ -40,7 +40,7 @@ char *irlan_state[] = {
 
 void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
 {
-       IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]);
+       IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
 
 void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
 {
-       IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]);
+       IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
index 4384be9..9ff7823 100644 (file)
@@ -145,7 +145,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
 {
        __u8 *bytes;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        bytes = value;
 
@@ -158,7 +158,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
         *  This is experimental!! DB.
         */
         if (strcmp(param, "MODE") == 0) {
-               IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+               IRDA_DEBUG(0, "%s()\n", __func__ );
                self->use_udata = TRUE;
                return;
        }
index 13db942..3f81f81 100644 (file)
@@ -70,7 +70,7 @@ static int irlan_provider_data_indication(void *instance, void *sap,
        struct irlan_cb *self;
        __u8 code;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        self = (struct irlan_cb *) instance;
 
@@ -99,15 +99,15 @@ static int irlan_provider_data_indication(void *instance, void *sap,
                irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb);
                break;
        case CMD_RECONNECT_DATA_CHAN:
-               IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __FUNCTION__ );
-               IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __func__ );
+               IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ );
                break;
        case CMD_CLOSE_DATA_CHAN:
                IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n");
-               IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ );
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
                break;
        }
        return 0;
@@ -129,7 +129,7 @@ static void irlan_provider_connect_indication(void *instance, void *sap,
        struct tsap_cb *tsap;
        __u32 saddr, daddr;
 
-       IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(0, "%s()\n", __func__ );
 
        self = (struct irlan_cb *) instance;
        tsap = (struct tsap_cb *) sap;
@@ -182,7 +182,7 @@ static void irlan_provider_disconnect_indication(void *instance, void *sap,
        struct irlan_cb *self;
        struct tsap_cb *tsap;
 
-       IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason);
+       IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason);
 
        self = (struct irlan_cb *) instance;
        tsap = (struct tsap_cb *) sap;
@@ -236,7 +236,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
 
        IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;);
 
-       IRDA_DEBUG(4, "%s(), skb->len=%d\n", __FUNCTION__ , (int)skb->len);
+       IRDA_DEBUG(4, "%s(), skb->len=%d\n", __func__ , (int)skb->len);
 
        IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;);
        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,
        for (i=0; i<count;i++) {
                ret = irlan_extract_param(ptr, name, value, &val_len);
                if (ret < 0) {
-                       IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ );
                        break;
                }
                ptr+=ret;
@@ -291,7 +291,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
 {
        struct sk_buff *skb;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -323,7 +323,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
                        irlan_insert_string_param(skb, "MEDIA", "802.5");
                        break;
                default:
-                       IRDA_DEBUG(2, "%s(), unknown media type!\n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), unknown media type!\n", __func__ );
                        break;
                }
                irlan_insert_short_param(skb, "IRLAN_VER", 0x0101);
@@ -347,7 +347,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
                        irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED");
                        break;
                default:
-                       IRDA_DEBUG(2, "%s(), Unknown access type\n", __FUNCTION__ );
+                       IRDA_DEBUG(2, "%s(), Unknown access type\n", __func__ );
                        break;
                }
                irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee);
@@ -367,7 +367,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
                irlan_filter_request(self, skb);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ );
                break;
        }
 
@@ -385,7 +385,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
        struct tsap_cb *tsap;
        notify_t notify;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
@@ -406,7 +406,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
 
        tsap = irttp_open_tsap(LSAP_ANY, 1, &notify);
        if (!tsap) {
-               IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
+               IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ );
                return -1;
        }
        self->provider.tsap_ctrl = tsap;
index 10ece5a..01a9d7c 100644 (file)
@@ -72,7 +72,7 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
                                     struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -82,7 +82,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
             irlan_next_provider_state( self, IRLAN_INFO);
             break;
        default:
-               IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -101,7 +101,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
 {
        int ret;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -147,7 +147,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_provider_state(self, IRLAN_IDLE);
                break;
        default:
-               IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -166,7 +166,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
                                     struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
 
@@ -186,7 +186,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
                irlan_next_provider_state(self, IRLAN_IDLE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
@@ -205,7 +205,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
 static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
                                     struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
+       IRDA_DEBUG(4, "%s()\n", __func__ );
 
        IRDA_ASSERT(self != NULL, return -1;);
        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,
                irlan_next_provider_state(self, IRLAN_IDLE);
                break;
        default:
-               IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event);
+               IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event);
                break;
        }
        if (skb)
index f3236ac..e4965b7 100644 (file)
@@ -88,7 +88,7 @@ int __init irlap_init(void)
        irlap = hashbin_new(HB_LOCK);
        if (irlap == NULL) {
                IRDA_ERROR("%s: can't allocate irlap hashbin!\n",
-                          __FUNCTION__);
+                          __func__);
                return -ENOMEM;
        }
 
@@ -113,7 +113,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
 {
        struct irlap_cb *self;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        /* Initialize the irlap structure. */
        self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL);
@@ -215,7 +215,7 @@ void irlap_close(struct irlap_cb *self)
 {
        struct irlap_cb *lap;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -231,7 +231,7 @@ void irlap_close(struct irlap_cb *self)
        /* Be sure that we manage to remove ourself from the hash */
        lap = hashbin_remove(irlap, self->saddr, NULL);
        if (!lap) {
-               IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __func__);
                return;
        }
        __irlap_close(lap);
@@ -246,7 +246,7 @@ EXPORT_SYMBOL(irlap_close);
  */
 void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -265,7 +265,7 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
  */
 void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL);
 }
@@ -280,7 +280,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
 void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
                           struct qos_info *qos_user, int sniff)
 {
-       IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __FUNCTION__, daddr);
+       IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __func__, daddr);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -307,7 +307,7 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
  */
 void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -344,7 +344,7 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb,
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
 
-       IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(3, "%s()\n", __func__);
 
        IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
                    return;);
@@ -391,7 +391,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
 
-       IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(3, "%s()\n", __func__);
 
        IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
               return;);
@@ -417,7 +417,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
 #ifdef CONFIG_IRDA_ULTRA
 void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
 {
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(1, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -437,7 +437,7 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
  */
 void irlap_disconnect_request(struct irlap_cb *self)
 {
-       IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(3, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -458,7 +458,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
                irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), disconnect pending!\n", __FUNCTION__);
+               IRDA_DEBUG(2, "%s(), disconnect pending!\n", __func__);
                self->disconnect_pending = TRUE;
                break;
        }
@@ -472,7 +472,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
  */
 void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
 {
-       IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, lap_reasons[reason]);
+       IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, lap_reasons[reason]);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -482,7 +482,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
 
        switch (reason) {
        case LAP_RESET_INDICATION:
-               IRDA_DEBUG(1, "%s(), Sending reset request!\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s(), Sending reset request!\n", __func__);
                irlap_do_event(self, RESET_REQUEST, NULL, NULL);
                break;
        case LAP_NO_RESPONSE:      /* FALLTROUGH */
@@ -493,7 +493,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
                                                 reason, NULL);
                break;
        default:
-               IRDA_ERROR("%s: Unknown reason %d\n", __FUNCTION__, reason);
+               IRDA_ERROR("%s: Unknown reason %d\n", __func__, reason);
        }
 }
 
@@ -511,7 +511,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
        IRDA_ASSERT(discovery != NULL, return;);
 
-       IRDA_DEBUG(4, "%s(), nslots = %d\n", __FUNCTION__, discovery->nslots);
+       IRDA_DEBUG(4, "%s(), nslots = %d\n", __func__, discovery->nslots);
 
        IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) ||
                    (discovery->nslots == 8) || (discovery->nslots == 16),
@@ -520,7 +520,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
        /* Discovery is only possible in NDM mode */
        if (self->state != LAP_NDM) {
                IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n",
-                          __FUNCTION__);
+                          __func__);
                irlap_discovery_confirm(self, NULL);
                /* Note : in theory, if we are not in NDM, we could postpone
                 * the discovery like we do for connection request.
@@ -543,7 +543,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
 
        if (self->discovery_log == NULL) {
                IRDA_WARNING("%s(), Unable to allocate discovery log!\n",
-                            __FUNCTION__);
+                            __func__);
                return;
        }
 
@@ -598,7 +598,7 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log)
  */
 void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -644,7 +644,7 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
  */
 void irlap_reset_indication(struct irlap_cb *self)
 {
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(1, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -660,7 +660,7 @@ void irlap_reset_indication(struct irlap_cb *self)
  */
 void irlap_reset_confirm(void)
 {
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(1, "%s()\n", __func__);
 }
 
 /*
@@ -760,7 +760,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
 {
        /*  nr as expected?  */
        if (nr == self->vs) {
-               IRDA_DEBUG(4, "%s(), expected!\n", __FUNCTION__);
+               IRDA_DEBUG(4, "%s(), expected!\n", __func__);
                return NR_EXPECTED;
        }
 
@@ -788,7 +788,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
  */
 void irlap_initiate_connection_state(struct irlap_cb *self)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -871,7 +871,7 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
 {
        struct sk_buff *skb;
 
-       IRDA_DEBUG(0, "%s(), setting speed to %d\n", __FUNCTION__, speed);
+       IRDA_DEBUG(0, "%s(), setting speed to %d\n", __func__, speed);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -914,7 +914,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
         *  user may not have set all of them.
         */
        if (qos_user) {
-               IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __func__);
 
                if (qos_user->baud_rate.bits)
                        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,
  */
 void irlap_apply_default_connection_parameters(struct irlap_cb *self)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -1007,7 +1007,7 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self)
  */
 void irlap_apply_connection_parameters(struct irlap_cb *self, int now)
 {
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
index 6af86eb..16c4ef0 100644 (file)
@@ -217,7 +217,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
        } else
                self->fast_RR = FALSE;
 
-       IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __FUNCTION__, timeout, jiffies);
+       IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies);
 #endif /* CONFIG_IRDA_FAST_RR */
 
        if (timeout == 0)
@@ -241,7 +241,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
        if (!self || self->magic != LAP_MAGIC)
                return;
 
-       IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __FUNCTION__,
+       IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __func__,
                   irlap_event[event], irlap_state[self->state]);
 
        ret = (*state[self->state])(self, event, skb, info);
@@ -259,7 +259,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
                 * try to disconnect link if we send any data frames, since
                 * that will change the state away form XMIT
                 */
-               IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__,
+               IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__,
                           skb_queue_len(&self->txq));
 
                if (!skb_queue_empty(&self->txq)) {
@@ -340,7 +340,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
                         * media busy in irlap_connect_request() and
                         * postpone the event... - Jean II */
                        IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n",
-                                  __FUNCTION__);
+                                  __func__);
 
                        /* Always switch state before calling upper layers */
                        irlap_next_state(self, LAP_NDM);
@@ -367,7 +367,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
                        irlap_connect_indication(self, skb);
                } else {
                        IRDA_DEBUG(0, "%s(), SNRM frame does not "
-                                  "contain an I field!\n", __FUNCTION__);
+                                  "contain an I field!\n", __func__);
                }
                break;
        case DISCOVERY_REQUEST:
@@ -375,7 +375,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
 
                if (self->media_busy) {
                        IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n",
-                                  __FUNCTION__);
+                                  __func__);
                        /* irlap->log.condition = MEDIA_BUSY; */
 
                        /* This will make IrLMP try again */
@@ -441,7 +441,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
                 * those cases...
                 * Jean II
                 */
-                       IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __FUNCTION__);
+                       IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __func__);
 
                        /* Last discovery request -> in the log */
                        irlap_discovery_indication(self, info->discovery);
@@ -520,7 +520,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
                /* Only accept broadcast frames in NDM mode */
                if (info->caddr != CBROADCAST) {
                        IRDA_DEBUG(0, "%s(), not a broadcast frame!\n",
-                                  __FUNCTION__);
+                                  __func__);
                } else
                        irlap_unitdata_indication(self, skb);
                break;
@@ -536,10 +536,10 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
                irlap_send_test_frame(self, CBROADCAST, info->daddr, skb);
                break;
        case RECV_TEST_RSP:
-               IRDA_DEBUG(0, "%s() not implemented!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s() not implemented!\n", __func__);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
                           irlap_event[event]);
 
                ret = -1;
@@ -567,13 +567,13 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
                IRDA_ASSERT(info != NULL, return -1;);
                IRDA_ASSERT(info->discovery != NULL, return -1;);
 
-               IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__,
+               IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__,
                           info->discovery->data.daddr);
 
                if (!self->discovery_log) {
                        IRDA_WARNING("%s: discovery log is gone! "
                                     "maybe the discovery timeout has been set"
-                                    " too short?\n", __FUNCTION__);
+                                    " too short?\n", __func__);
                        break;
                }
                hashbin_insert(self->discovery_log,
@@ -598,7 +598,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
 
                IRDA_ASSERT(info != NULL, return -1;);
 
-               IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __FUNCTION__, info->s);
+               IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __func__, info->s);
 
                /* Last discovery request ? */
                if (info->s == 0xff)
@@ -613,7 +613,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
                 */
                if (irda_device_is_receiving(self->netdev) && !self->add_wait) {
                        IRDA_DEBUG(2, "%s(), device is slow to answer, "
-                                  "waiting some more!\n", __FUNCTION__);
+                                  "waiting some more!\n", __func__);
                        irlap_start_slot_timer(self, msecs_to_jiffies(10));
                        self->add_wait = TRUE;
                        return ret;
@@ -649,7 +649,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
                }
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
                           irlap_event[event]);
 
                ret = -1;
@@ -671,7 +671,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
        discovery_t *discovery_rsp;
        int ret=0;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -679,7 +679,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
        switch (event) {
        case QUERY_TIMER_EXPIRED:
                IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n",
-                          __FUNCTION__, jiffies);
+                          __func__, jiffies);
                irlap_next_state(self, LAP_NDM);
                break;
        case RECV_DISCOVERY_XID_CMD:
@@ -717,7 +717,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
                }
                break;
        default:
-               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
                           event, irlap_event[event]);
 
                ret = -1;
@@ -738,7 +738,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]);
+       IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]);
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -799,18 +799,18 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
                break;
        case RECV_DISCOVERY_XID_CMD:
                IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n",
-                          __FUNCTION__);
+                          __func__);
                irlap_next_state(self, LAP_NDM);
 
                break;
        case DISCONNECT_REQUEST:
-               IRDA_DEBUG(0, "%s(), Disconnect request!\n", __FUNCTION__);
+               IRDA_DEBUG(0, "%s(), Disconnect request!\n", __func__);
                irlap_send_dm_frame(self);
                irlap_next_state( self, LAP_NDM);
                irlap_disconnect_indication(self, LAP_DISC_INDICATION);
                break;
        default:
-               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
                           event, irlap_event[event]);
 
                ret = -1;
@@ -832,7 +832,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(4, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -861,7 +861,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
                self->retry_count++;
                break;
        case RECV_SNRM_CMD:
-               IRDA_DEBUG(4, "%s(), SNRM battle!\n", __FUNCTION__);
+               IRDA_DEBUG(4, "%s(), SNRM battle!\n", __func__);
 
                IRDA_ASSERT(skb != NULL, return 0;);
                IRDA_ASSERT(info != NULL, return 0;);
@@ -948,7 +948,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
                irlap_disconnect_indication(self, LAP_DISC_INDICATION);
                break;
        default:
-               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__,
                           event, irlap_event[event]);
 
                ret = -1;
@@ -966,7 +966,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
 static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event,
                               struct sk_buff *skb, struct irlap_info *info)
 {
-       IRDA_DEBUG( 0, "%s(), Unknown event\n", __FUNCTION__);
+       IRDA_DEBUG( 0, "%s(), Unknown event\n", __func__);
 
        return -1;
 }
@@ -1030,7 +1030,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
                         */
                        if((!nextfit) && (skb->len > self->bytes_left)) {
                                IRDA_DEBUG(0, "%s(), Not allowed to transmit"
-                                          " more bytes!\n", __FUNCTION__);
+                                          " more bytes!\n", __func__);
                                /* Requeue the skb */
                                skb_queue_head(&self->txq, skb_get(skb));
                                /*
@@ -1082,7 +1082,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
 #endif /* CONFIG_IRDA_FAST_RR */
                } else {
                        IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n",
-                                  __FUNCTION__);
+                                  __func__);
                        skb_queue_head(&self->txq, skb_get(skb));
 
                        /*
@@ -1094,7 +1094,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
                break;
        case POLL_TIMER_EXPIRED:
                IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n",
-                           __FUNCTION__, jiffies);
+                           __func__, jiffies);
                irlap_send_rr_frame(self, CMD_FRAME);
                /* Return to NRM properly - Jean II  */
                self->window = self->window_size;
@@ -1120,7 +1120,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
                break;
        default:
                IRDA_DEBUG(0, "%s(), Unknown event %s\n",
-                          __FUNCTION__, irlap_event[event]);
+                          __func__, irlap_event[event]);
 
                ret = -EINVAL;
                break;
@@ -1138,7 +1138,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(1, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1173,7 +1173,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
                }
                break;
        default:
-               IRDA_DEBUG(1, "%s(), Unknown event %d\n", __FUNCTION__, event);
+               IRDA_DEBUG(1, "%s(), Unknown event %d\n", __func__, event);
 
                ret = -1;
                break;
@@ -1297,7 +1297,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                        } else {
                                IRDA_DEBUG(4,
                                       "%s(), missing or duplicate frame!\n",
-                                          __FUNCTION__);
+                                          __func__);
 
                                /* Update Nr received */
                                irlap_update_nr_received(self, info->nr);
@@ -1367,7 +1367,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                    (nr_status == NR_UNEXPECTED))
                {
                        IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n",
-                                  __FUNCTION__);
+                                  __func__);
                        if (info->pf) {
                                /* Resend rejected frames */
                                irlap_resend_rejected_frames(self, CMD_FRAME);
@@ -1407,9 +1407,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                        }
                        break;
                }
-               IRDA_DEBUG(1, "%s(), Not implemented!\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s(), Not implemented!\n", __func__);
                IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n",
-                      __FUNCTION__, irlap_event[event], ns_status, nr_status);
+                      __func__, irlap_event[event], ns_status, nr_status);
                break;
        case RECV_UI_FRAME:
                /* Poll bit cleared? */
@@ -1420,7 +1420,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                        del_timer(&self->final_timer);
                        irlap_data_indication(self, skb, TRUE);
                        irlap_next_state(self, LAP_XMIT_P);
-                       IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __FUNCTION__, irlap_state[self->state]);
+                       IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __func__, irlap_state[self->state]);
                        irlap_start_poll_timer(self, self->poll_timeout);
                }
                break;
@@ -1475,7 +1475,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                        irlap_next_state(self, LAP_NRM_P);
                } else if (ret == NR_INVALID) {
                        IRDA_DEBUG(1, "%s(), Received RR with "
-                                  "invalid nr !\n", __FUNCTION__);
+                                  "invalid nr !\n", __func__);
 
                        irlap_next_state(self, LAP_RESET_WAIT);
 
@@ -1580,7 +1580,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                irlap_start_final_timer(self, 2 * self->final_timeout);
                break;
        case RECV_RD_RSP:
-               IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __FUNCTION__);
+               IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __func__);
 
                irlap_flush_all_queues(self);
                irlap_next_state(self, LAP_XMIT_P);
@@ -1589,7 +1589,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
                break;
        default:
                IRDA_DEBUG(1, "%s(), Unknown event %s\n",
-                           __FUNCTION__, irlap_event[event]);
+                           __func__, irlap_event[event]);
 
                ret = -1;
                break;
@@ -1609,7 +1609,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]);
+       IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]);
 
        IRDA_ASSERT(self != NULL, return -1;);
        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,
                irlap_next_state( self, LAP_PCLOSE);
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
                           irlap_event[event]);
 
                ret = -1;
@@ -1656,7 +1656,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]);
+       IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]);
 
        IRDA_ASSERT(self != NULL, return -1;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1714,7 +1714,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
                 * state
                 */
                if (!info) {
-                       IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __FUNCTION__);
+                       IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __func__);
                        irlap_initiate_connection_state(self);
                        irlap_wait_min_turn_around(self, &self->qos_tx);
                        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,
                } else {
                        IRDA_DEBUG(0,
                                   "%s(), SNRM frame contained an I field!\n",
-                                  __FUNCTION__);
+                                  __func__);
                }
                break;
        default:
                IRDA_DEBUG(1, "%s(), Unknown event %s\n",
-                          __FUNCTION__, irlap_event[event]);
+                          __func__, irlap_event[event]);
 
                ret = -1;
                break;
@@ -1749,7 +1749,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]);
+       IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[event]);
 
        IRDA_ASSERT(self != NULL, return -ENODEV;);
        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,
                         */
                        if((!nextfit) && (skb->len > self->bytes_left)) {
                                IRDA_DEBUG(0, "%s(), Not allowed to transmit"
-                                          " more bytes!\n", __FUNCTION__);
+                                          " more bytes!\n", __func__);
                                /* Requeue the skb */
                                skb_queue_head(&self->txq, skb_get(skb));
 
@@ -1832,7 +1832,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
                                ret = -EPROTO;
                        }
                } else {
-                       IRDA_DEBUG(2, "%s(), Unable to send!\n", __FUNCTION__);
+                       IRDA_DEBUG(2, "%s(), Unable to send!\n", __func__);
                        skb_queue_head(&self->txq, skb_get(skb));
                        ret = -EPROTO;
                }
@@ -1848,7 +1848,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
                 * when we return... - Jean II */
                break;
        default:
-               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
+               IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__,
                           irlap_event[event]);
 
                ret = -EINVAL;
@@ -1871,7 +1871,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
        int nr_status;
        int ret = 0;
 
-       IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]);
+       IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]);
 
        IRDA_ASSERT(self != NULL, return -1;);
        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,
        case RECV_I_CMD: /* Optimize for the common case */
                /* FIXME: must check for remote_busy below */
                IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, "
-                          "vr=%d, pf=%d\n", __FUNCTION__,
+                          "vr=%d, pf=%d\n", __func__,
                           irlap_event[event], info->nr,
                           self->vs, info->ns, self->vr, info->pf);
 
@@ -2112,21 +2112,21 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
                        irlap_next_state(self, LAP_NRM_S);
                } else {
                        IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n",
-                                  __FUNCTION__);
+                                  __func__);
                }
                break;
        case RECV_SNRM_CMD:
                /* SNRM frame is not allowed to contain an I-field */
                if (!info) {
                        del_timer(&self->wd_timer);
-                       IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __FUNCTION__);
+                       IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __func__);
                        irlap_next_state(self, LAP_RESET_CHECK);
 
                        irlap_reset_indication(self);
                } else {
                        IRDA_DEBUG(0,
                                   "%s(), SNRM frame contained an I-field!\n",
-                                  __FUNCTION__);
+                                  __func__);
 
                }
                break;
@@ -2158,7 +2158,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
                 *   which explain why we use (self->N2 / 2) here !!!
                 * Jean II
                 */
-               IRDA_DEBUG(1, "%s(), retry_count = %d\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), retry_count = %d\n", __func__,
                           self->retry_count);
 
                if (self->retry_count < (self->N2 / 2)) {
@@ -2211,7 +2211,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
                irlap_send_test_frame(self, self->caddr, info->daddr, skb);
                break;
        default:
-               IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
                           event, irlap_event[event]);
 
                ret = -EINVAL;
@@ -2228,7 +2228,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
+       IRDA_DEBUG(1, "%s()\n", __func__);
 
        IRDA_ASSERT(self != NULL, return -ENODEV;);
        IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
@@ -2285,7 +2285,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
                        break;          /* stay in SCLOSE */
                }
 
-               IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
                           event, irlap_event[event]);
 
                ret = -EINVAL;
@@ -2301,7 +2301,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
 {
        int ret = 0;
 
-       IRDA_DEBUG(1, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]);
+       IRDA_DEBUG(1, "%s(), event=%s\n", __func__, irlap_event[event]);
 
        IRDA_ASSERT(self != NULL, return -ENODEV;);
        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,
                irlap_next_state(self, LAP_SCLOSE);
                break;
        default:
-               IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__,
+               IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__,
                           event, irlap_event[event]);
 
                ret = -EINVAL;
index 7c132d6..a38b231 100644 (file)
@@ -102,7 +102,7 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb)
        irlap_insert_info(self, skb);
 
        if (unlikely(self->mode & IRDA_MODE_MONITOR)) {
-               IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __FUNCTION__,
+               IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __func__,
                           self->netdev->name);
                dev_kfree_skb(skb);
                return;
@@ -182,7 +182,7 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
                /* Check if the new connection address is valid */
                if ((info->caddr == 0x00) || (info->caddr == 0xfe)) {
                        IRDA_DEBUG(3, "%s(), invalid connection address!\n",
-                                  __FUNCTION__);
+                                  __func__);
                        return;
                }
 
@@ -193,7 +193,7 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
                /* Only accept if addressed directly to us */
                if (info->saddr != self->saddr) {
                        IRDA_DEBUG(2, "%s(), not addressed to us!\n",
-                                  __FUNCTION__);
+                                  __func__);
                        return;
                }
                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)
        struct&n