Skip to content

Commit

Permalink
vlan: change return type of vlan_proc_rem_dev
Browse files Browse the repository at this point in the history
Since function vlan_proc_rem_dev() will only return 0, it's better to
return void instead of int.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zhang Shengju authored and David S. Miller committed Feb 18, 2016
1 parent e014860 commit e4999f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions net/8021q/vlanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,11 @@ int vlan_proc_add_dev(struct net_device *vlandev)
/*
* 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. */
proc_remove(vlan_dev_priv(vlandev)->dent);
vlan_dev_priv(vlandev)->dent = NULL;
return 0;
}

/****** Proc filesystem entry points ****************************************/
Expand Down
4 changes: 2 additions & 2 deletions net/8021q/vlanproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
struct 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);
void vlan_proc_cleanup(struct net *net);

Expand All @@ -14,7 +14,7 @@ void vlan_proc_cleanup(struct net *net);
#define vlan_proc_init(net) (0)
#define vlan_proc_cleanup(net) do {} while (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 /* !(__BEN_VLAN_PROC_INC__) */

0 comments on commit e4999f2

Please sign in to comment.