Commit e4999f25 authored by Zhang Shengju's avatar Zhang Shengju Committed by David S. Miller

vlan: change return type of vlan_proc_rem_dev

Since function vlan_proc_rem_dev() will only return 0, it's better to
return void instead of int.
Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e014860e
...@@ -184,12 +184,11 @@ int vlan_proc_add_dev(struct net_device *vlandev) ...@@ -184,12 +184,11 @@ int vlan_proc_add_dev(struct net_device *vlandev)
/* /*
* Delete directory entry for VLAN device. * Delete directory entry for VLAN device.
*/ */
int vlan_proc_rem_dev(struct net_device *vlandev) void vlan_proc_rem_dev(struct net_device *vlandev)
{ {
/** NOTE: This will consume the memory pointed to by dent, it seems. */ /** NOTE: This will consume the memory pointed to by dent, it seems. */
proc_remove(vlan_dev_priv(vlandev)->dent); proc_remove(vlan_dev_priv(vlandev)->dent);
vlan_dev_priv(vlandev)->dent = NULL; vlan_dev_priv(vlandev)->dent = NULL;
return 0;
} }
/****** Proc filesystem entry points ****************************************/ /****** Proc filesystem entry points ****************************************/
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
struct net; struct net;
int vlan_proc_init(struct net *net); int vlan_proc_init(struct net *net);
int vlan_proc_rem_dev(struct net_device *vlandev); void vlan_proc_rem_dev(struct net_device *vlandev);
int vlan_proc_add_dev(struct net_device *vlandev); int vlan_proc_add_dev(struct net_device *vlandev);
void vlan_proc_cleanup(struct net *net); void vlan_proc_cleanup(struct net *net);
...@@ -14,7 +14,7 @@ void vlan_proc_cleanup(struct net *net); ...@@ -14,7 +14,7 @@ void vlan_proc_cleanup(struct net *net);
#define vlan_proc_init(net) (0) #define vlan_proc_init(net) (0)
#define vlan_proc_cleanup(net) do {} while (0) #define vlan_proc_cleanup(net) do {} while (0)
#define vlan_proc_add_dev(dev) ({(void)(dev), 0; }) #define vlan_proc_add_dev(dev) ({(void)(dev), 0; })
#define vlan_proc_rem_dev(dev) ({(void)(dev), 0; }) #define vlan_proc_rem_dev(dev) do {} while (0)
#endif #endif
#endif /* !(__BEN_VLAN_PROC_INC__) */ #endif /* !(__BEN_VLAN_PROC_INC__) */
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