vlan: change return type of vlan_proc_rem_dev
Subsystems (2)
Quoted 48 lines
Quoted 14 lines · Zhang Shengju
Since function
vlan_proc_rem_dev()will only return 0, it's better to return void instead of int.Signed-off-by Zhang Shengju <[email protected]>--- net/8021q/vlanproc.c | 3 +-- net/8021q/vlanproc.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)net/8021q/vlanproc.c index renamed from net/8021q/vlanproc.c +0
-0ae63cf7..5f1446c 100644
net/8021q/vlanproc.c int vlan_proc_add_dev(struct net_device · line 190
Quoted 8 lines
net/8021q/vlanproc.c +1
-1@@ -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. */
Quoted 12 lines
net/8021q/vlanproc.c +0
-1proc_remove (vlan_dev_priv (vlandev)->dent);vlan_dev_priv (vlandev)->dent =NULL ; -return 0 ; }/****** Proc filesystem entry points
****************************************/net/8021q/vlanproc.h index renamed from net/8021q/vlanproc.h +0
-0063f60a..a9d8734 100644
net/8021q/vlanproc.h line 10
Quoted 7 lines
net/8021q/vlanproc.h +1
-1@@ -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);You forget to change the !PROC_FS case:
Quoted 1 line
#define
vlan_proc_rem_dev(dev)({(void)(dev), 0; })
Thanks, I will add the missing part.