Skip to content

Commit

Permalink
net: replace remaining __FUNCTION__ occurrences
Browse files Browse the repository at this point in the history
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hharrison authored and davem330 committed Mar 6, 2008
1 parent 6387c4b commit 0dc4787
Show file tree
Hide file tree
Showing 84 changed files with 1,008 additions and 1,008 deletions.
12 changes: 6 additions & 6 deletions net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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.. */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand All @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion net/8021q/vlanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion net/9p/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions net/bridge/br_sysfs_br.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions net/dccp/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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!)", \
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion net/ieee80211/softmac/ieee80211softmac_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/ipvs/ip_vs_proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/ipvs/ip_vs_proto_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/ipvs/ip_vs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/udplite_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions net/ipv6/addrlabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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,
Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions net/ipv6/mip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand All @@ -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);
Expand Down
Loading

0 comments on commit 0dc4787

Please sign in to comment.