summaryrefslogtreecommitdiff
path: root/net/8021q/vlanproc.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-21 00:24:30 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:08:28 -0800
commit40f98e1af4c6082f7f98391540a2a1ade030480a (patch)
tree3e1c0ea34e63ad65adcf8a75ae583e21cd14ace9 /net/8021q/vlanproc.c
parenta5250a36954c6658e28cc2e7e07e314e0c79e8bb (diff)
[VLAN]: Clean up debugging and printks
- use pr_* functions and common prefix for non-device related messages - remove VLAN_ printk levels - kill lots of useless debugging statements - remove a few unnecessary printks like for double VID registration (already returns -EEXIST) and kill of a number of unnecessary checks in vlan_proc_{add,rem}_dev() that are already performed by the caller Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlanproc.c')
-rw-r--r--net/8021q/vlanproc.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 1972d5cc34e4..5da02e29a2c6 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -179,13 +179,6 @@ int vlan_proc_add_dev (struct net_device *vlandev)
{
struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev);
- if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) {
- printk(KERN_ERR
- "ERROR: vlan_proc_add, device -:%s:- is NOT a VLAN\n",
- vlandev->name);
- return -EINVAL;
- }
-
dev_info->dent = create_proc_entry(vlandev->name,
S_IFREG|S_IRUSR|S_IWUSR,
proc_vlan_dir);
@@ -194,11 +187,6 @@ int vlan_proc_add_dev (struct net_device *vlandev)
dev_info->dent->proc_fops = &vlandev_fops;
dev_info->dent->data = vlandev;
-
-#ifdef VLAN_DEBUG
- printk(KERN_ERR "vlan_proc_add, device -:%s:- being added.\n",
- vlandev->name);
-#endif
return 0;
}
@@ -207,28 +195,11 @@ int vlan_proc_add_dev (struct net_device *vlandev)
*/
int vlan_proc_rem_dev(struct net_device *vlandev)
{
- if (!vlandev) {
- printk(VLAN_ERR "%s: invalid argument: %p\n",
- __FUNCTION__, vlandev);
- return -EINVAL;
- }
-
- if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) {
- 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;
- }
-
-#ifdef VLAN_DEBUG
- printk(VLAN_DBG "%s: dev: %p\n", __FUNCTION__, vlandev);
-#endif
-
/** NOTE: This will consume the memory pointed to by dent, it seems. */
if (VLAN_DEV_INFO(vlandev)->dent) {
remove_proc_entry(VLAN_DEV_INFO(vlandev)->dent->name, proc_vlan_dir);
VLAN_DEV_INFO(vlandev)->dent = NULL;
}
-
return 0;
}