diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-21 03:24:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:08:28 -0500 |
commit | 40f98e1af4c6082f7f98391540a2a1ade030480a (patch) | |
tree | 3e1c0ea34e63ad65adcf8a75ae583e21cd14ace9 /net/8021q/vlanproc.c | |
parent | a5250a36954c6658e28cc2e7e07e314e0c79e8bb (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.c | 29 |
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) | |||
179 | { | 179 | { |
180 | struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev); | 180 | struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev); |
181 | 181 | ||
182 | if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) { | ||
183 | printk(KERN_ERR | ||
184 | "ERROR: vlan_proc_add, device -:%s:- is NOT a VLAN\n", | ||
185 | vlandev->name); | ||
186 | return -EINVAL; | ||
187 | } | ||
188 | |||
189 | dev_info->dent = create_proc_entry(vlandev->name, | 182 | dev_info->dent = create_proc_entry(vlandev->name, |
190 | S_IFREG|S_IRUSR|S_IWUSR, | 183 | S_IFREG|S_IRUSR|S_IWUSR, |
191 | proc_vlan_dir); | 184 | proc_vlan_dir); |
@@ -194,11 +187,6 @@ int vlan_proc_add_dev (struct net_device *vlandev) | |||
194 | 187 | ||
195 | dev_info->dent->proc_fops = &vlandev_fops; | 188 | dev_info->dent->proc_fops = &vlandev_fops; |
196 | dev_info->dent->data = vlandev; | 189 | dev_info->dent->data = vlandev; |
197 | |||
198 | #ifdef VLAN_DEBUG | ||
199 | printk(KERN_ERR "vlan_proc_add, device -:%s:- being added.\n", | ||
200 | vlandev->name); | ||
201 | #endif | ||
202 | return 0; | 190 | return 0; |
203 | } | 191 | } |
204 | 192 | ||
@@ -207,28 +195,11 @@ int vlan_proc_add_dev (struct net_device *vlandev) | |||
207 | */ | 195 | */ |
208 | int vlan_proc_rem_dev(struct net_device *vlandev) | 196 | int vlan_proc_rem_dev(struct net_device *vlandev) |
209 | { | 197 | { |
210 | if (!vlandev) { | ||
211 | printk(VLAN_ERR "%s: invalid argument: %p\n", | ||
212 | __FUNCTION__, vlandev); | ||
213 | return -EINVAL; | ||
214 | } | ||
215 | |||
216 | if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) { | ||
217 | printk(VLAN_DBG "%s: invalid argument, device: %s is not a VLAN device, priv_flags: 0x%4hX.\n", | ||
218 | __FUNCTION__, vlandev->name, vlandev->priv_flags); | ||
219 | return -EINVAL; | ||
220 | } | ||
221 | |||
222 | #ifdef VLAN_DEBUG | ||
223 | printk(VLAN_DBG "%s: dev: %p\n", __FUNCTION__, vlandev); | ||
224 | #endif | ||
225 | |||
226 | /** NOTE: This will consume the memory pointed to by dent, it seems. */ | 198 | /** NOTE: This will consume the memory pointed to by dent, it seems. */ |
227 | if (VLAN_DEV_INFO(vlandev)->dent) { | 199 | if (VLAN_DEV_INFO(vlandev)->dent) { |
228 | remove_proc_entry(VLAN_DEV_INFO(vlandev)->dent->name, proc_vlan_dir); | 200 | remove_proc_entry(VLAN_DEV_INFO(vlandev)->dent->name, proc_vlan_dir); |
229 | VLAN_DEV_INFO(vlandev)->dent = NULL; | 201 | VLAN_DEV_INFO(vlandev)->dent = NULL; |
230 | } | 202 | } |
231 | |||
232 | return 0; | 203 | return 0; |
233 | } | 204 | } |
234 | 205 | ||