Commit 7a706ad1 authored by Alan Cox's avatar Alan Cox Committed by David S. Miller

VLAN: Fix gcc-3.1 warnings.

parent 42bdf87f
......@@ -91,9 +91,9 @@ static int __init vlan_proto_init(void)
/* proc file system initialization */
err = vlan_proc_init();
if (err < 0) {
printk(KERN_ERR __FUNCTION__
"%s: can't create entry in proc filesystem!\n",
VLAN_NAME);
printk(KERN_ERR
"%s %s: can't create entry in proc filesystem!\n",
__FUNCTION__, VLAN_NAME);
return 1;
}
......@@ -203,7 +203,7 @@ static int unregister_vlan_dev(struct net_device *real_dev,
int i, ret;
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": VID: %i\n", vlan_id);
printk(VLAN_DBG "%s: VID: %i\n", __FUNCTION__, vlan_id);
#endif
/* sanity check */
......@@ -289,16 +289,16 @@ static int unregister_vlan_device(const char *vlan_IF_name)
if (ret == 1)
ret = 0;
} else {
printk(VLAN_ERR __FUNCTION__
": ERROR: Tried to remove a non-vlan device "
printk(VLAN_ERR
"%s: ERROR: Tried to remove a non-vlan device "
"with VLAN code, name: %s priv_flags: %hX\n",
dev->name, dev->priv_flags);
__FUNCTION__, dev->name, dev->priv_flags);
dev_put(dev);
ret = -EPERM;
}
} else {
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": WARNING: Could not find dev.\n");
printk(VLAN_DBG "%s: WARNING: Could not find dev.\n", __FUNCTION__);
#endif
ret = -EINVAL;
}
......@@ -320,8 +320,8 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
int r;
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": if_name -:%s:- vid: %i\n",
eth_IF_name, VLAN_ID);
printk(VLAN_DBG "%s: if_name -:%s:- vid: %i\n",
__FUNCTION__, eth_IF_name, VLAN_ID);
#endif
if (VLAN_ID >= VLAN_VID_MASK)
......@@ -333,24 +333,24 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
goto out_ret_null;
if (real_dev->features & NETIF_F_VLAN_CHALLENGED) {
printk(VLAN_DBG __FUNCTION__ ": VLANs not supported on %s.\n",
real_dev->name);
printk(VLAN_DBG "%s: VLANs not supported on %s.\n",
__FUNCTION__, real_dev->name);
goto out_put_dev;
}
if ((real_dev->features & NETIF_F_HW_VLAN_RX) &&
(real_dev->vlan_rx_register == NULL ||
real_dev->vlan_rx_kill_vid == NULL)) {
printk(VLAN_DBG __FUNCTION__ ": Device %s has buggy VLAN hw accel.\n",
real_dev->name);
printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
__FUNCTION__, real_dev->name);
goto out_put_dev;
}
if ((real_dev->features & NETIF_F_HW_VLAN_FILTER) &&
(real_dev->vlan_rx_add_vid == NULL ||
real_dev->vlan_rx_kill_vid == NULL)) {
printk(VLAN_DBG __FUNCTION__ ": Device %s has buggy VLAN hw accel.\n",
real_dev->name);
printk(VLAN_DBG "%s: Device %s has buggy VLAN hw accel.\n",
__FUNCTION__, real_dev->name);
goto out_put_dev;
}
......@@ -371,7 +371,7 @@ static struct net_device *register_vlan_device(const char *eth_IF_name,
if (r) {
/* was already registered. */
printk(VLAN_DBG __FUNCTION__ ": ALREADY had VLAN registered\n");
printk(VLAN_DBG "%s: ALREADY had VLAN registered\n", __FUNCTION__);
goto out_unlock;
}
......@@ -665,7 +665,7 @@ int vlan_ioctl_handler(unsigned long arg)
args.u.device2[23] = 0;
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": args.cmd: %x\n", args.cmd);
printk(VLAN_DBG "%s: args.cmd: %x\n", __FUNCTION__, args.cmd);
#endif
switch (args.cmd) {
......@@ -728,8 +728,8 @@ int vlan_ioctl_handler(unsigned long arg)
default:
/* pass on to underlying device instead?? */
printk(VLAN_DBG __FUNCTION__ ": Unknown VLAN CMD: %x \n",
args.cmd);
printk(VLAN_DBG "%s: Unknown VLAN CMD: %x \n",
__FUNCTION__, args.cmd);
return -EINVAL;
};
......
......@@ -125,8 +125,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
vid = (vlan_TCI & VLAN_VID_MASK);
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": skb: %p vlan_id: %hx\n",
skb, vid);
printk(VLAN_DBG "%s: skb: %p vlan_id: %hx\n",
__FUNCTION__, skb, vid);
#endif
/* Ok, we will find the correct VLAN device, strip the header,
......@@ -146,8 +146,8 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
spin_unlock_bh(&vlan_group_lock);
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": ERROR: No net_device for VID: %i on dev: %s [%i]\n",
(unsigned int)(vid), dev->name, dev->ifindex);
printk(VLAN_DBG "%s: ERROR: No net_device for VID: %i on dev: %s [%i]\n",
__FUNCTION__, (unsigned int)(vid), dev->name, dev->ifindex);
#endif
kfree_skb(skb);
return -1;
......@@ -170,8 +170,10 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
spin_unlock_bh(&vlan_group_lock);
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n",
skb, dev->name, VLAN_DEV_INFO(skb->dev)->real_dev->name, skb->dev->name);
printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n",
__FUNCTION__ skb, dev->name,
VLAN_DEV_INFO(skb->dev)->real_dev->name,
skb->dev->name);
#endif
kfree_skb(skb);
stats->rx_errors++;
......@@ -184,8 +186,9 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
skb->priority = vlan_get_ingress_priority(skb->dev, ntohs(vhdr->h_vlan_TCI));
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": priority: %lu for TCI: %hu (hbo)\n",
(unsigned long)(skb->priority), ntohs(vhdr->h_vlan_TCI));
printk(VLAN_DBG "%s: priority: %lu for TCI: %hu (hbo)\n",
__FUNCTION__, (unsigned long)(skb->priority),
ntohs(vhdr->h_vlan_TCI));
#endif
/* The ethernet driver already did the pkt_type calculations
......@@ -331,8 +334,8 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
struct net_device *vdev = dev; /* save this for the bottom of the method */
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": skb: %p type: %hx len: %x vlan_id: %hx, daddr: %p\n",
skb, type, len, VLAN_DEV_INFO(dev)->vlan_id, daddr);
printk(VLAN_DBG "%s: skb: %p type: %hx len: %x vlan_id: %hx, daddr: %p\n",
__FUNCTION__, skb, type, len, VLAN_DEV_INFO(dev)->vlan_id, daddr);
#endif
/* build vlan header only if re_order_header flag is NOT set. This
......@@ -402,7 +405,7 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
}
VLAN_DEV_INFO(vdev)->cnt_inc_headroom_on_tx++;
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": %s: had to grow skb.\n", vdev->name);
printk(VLAN_DBG "%s: %s: had to grow skb.\n", __FUNCTION__, vdev->name);
#endif
}
......@@ -445,8 +448,8 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
VLAN_DEV_INFO(dev)->cnt_encap_on_xmit++;
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": proto to encap: 0x%hx (hbo)\n",
htons(veth->h_vlan_proto));
printk(VLAN_DBG "%s: proto to encap: 0x%hx (hbo)\n",
__FUNCTION__, htons(veth->h_vlan_proto));
#endif
if (skb_headroom(skb) < VLAN_HLEN) {
......@@ -489,8 +492,8 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb->dev = VLAN_DEV_INFO(dev)->real_dev;
#ifdef VLAN_DEBUG
printk(VLAN_DBG __FUNCTION__ ": about to send skb: %p to dev: %s\n",
skb, skb->dev->name);
printk(VLAN_DBG "%s: about to send skb: %p to dev: %s\n",
__FUNCTION__, skb, skb->dev->name);
printk(VLAN_DBG " %2hx.%2hx.%2hx.%2xh.%2hx.%2hx %2hx.%2hx.%2hx.%2hx.%2hx.%2hx %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],
veth->h_source[0], veth->h_source[1], veth->h_source[2], veth->h_source[3], veth->h_source[4], veth->h_source[5],
......@@ -609,19 +612,20 @@ int vlan_dev_set_vlan_flag(char *dev_name, __u32 flag, short flag_val)
dev_put(dev);
return 0;
} else {
printk(KERN_ERR __FUNCTION__ ": flag %i is not valid.\n",
(int)(flag));
printk(KERN_ERR "%s: flag %i is not valid.\n",
__FUNCTION__, (int)(flag));
dev_put(dev);
return -EINVAL;
}
} else {
printk(KERN_ERR __FUNCTION__
": %s is not a vlan device, priv_flags: %hX.\n",
dev->name, dev->priv_flags);
printk(KERN_ERR
"%s: %s is not a vlan device, priv_flags: %hX.\n",
__FUNCTION__, dev->name, dev->priv_flags);
dev_put(dev);
}
} else {
printk(KERN_ERR __FUNCTION__ ": Could not find device: %s\n", dev_name);
printk(KERN_ERR "%s: Could not find device: %s\n",
__FUNCTION__, dev_name);
}
return -EINVAL;
......
......@@ -187,14 +187,14 @@ int vlan_proc_add_dev (struct net_device *vlandev)
int vlan_proc_rem_dev(struct net_device *vlandev)
{
if (!vlandev) {
printk(VLAN_ERR __FUNCTION__ ": invalid argument: %p\n",
vlandev);
printk(VLAN_ERR "%s: invalid argument: %p\n",
__FUNCTION__, vlandev);
return -EINVAL;
}
if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) {
printk(VLAN_DBG __FUNCTION__ ": invalid argument, device: %s is not a VLAN device, priv_flags: 0x%4hX.\n",
vlandev->name, vlandev->priv_flags);
printk(VLAN_DBG "%s: invalid argument, device: %s is not a VLAN device, priv_flags: 0x%4hX.\n",
__FUNCTION__, vlandev->name, vlandev->priv_flags);
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment