Skip to contentSkip to conversation

Staging: drivers: Remove unecessary return value

PATCH Superseded Cristina Opriceana 2 participants 2 messages Mar 12, 2015 – Mar 16, 2015 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: drivers: Remove unecessary return value

Change _SUCCESS return value for function loadparam to void as it never changes and it's also never used when calling the function.

---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
 drivers/staging/rtl8712/os_intfs.c          | 5 ++---
 drivers/staging/rtl8723au/os_dep/os_intfs.c | 3 +--
 3 files changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rtl8188eu/os_dep/os_intfs.c +1 -2
index 88a909c..d2f5490 100644
@@ -510,7 +510,7 @@ void rtw_proc_remove_one(struct net_device *dev)
 }
 #endif
 
-static uint loadparam(struct adapter *padapter,  struct  net_device *pnetdev)
+static void loadparam(struct adapter *padapter,  struct  net_device *pnetdev)
 {
 	struct registry_priv  *registry_par = &padapter->registrypriv;
 
@@ -581,7 +581,6 @@ static uint loadparam(struct adapter *padapter,  struct  net_device *pnetdev)
 	snprintf(registry_par->ifname, 16, "%s", ifname);
 	snprintf(registry_par->if2name, 16, "%s", if2name);
 	registry_par->notch_filter = (u8)rtw_notch_filter;
-	return _SUCCESS;
 }
 
 static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
drivers/staging/rtl8712/os_intfs.c +2 -3
index 3cac773..7b3d377 100644
@@ -122,11 +122,11 @@ module_param(low_power, int, 0644);
 MODULE_PARM_DESC(ifname, " Net interface name, wlan%d=default");
 MODULE_PARM_DESC(initmac, "MAC-Address, default: use FUSE");
 
-static uint loadparam(struct _adapter *padapter, struct  net_device *pnetdev);
+static void loadparam(struct _adapter *padapter, struct  net_device *pnetdev);
 static int netdev_open(struct net_device *pnetdev);
 static int netdev_close(struct net_device *pnetdev);
 
-static uint loadparam(struct _adapter *padapter, struct  net_device *pnetdev)
+static void loadparam(struct _adapter *padapter, struct  net_device *pnetdev)
 {
 	struct registry_priv  *registry_par = &padapter->registrypriv;
 
@@ -171,7 +171,6 @@ static uint loadparam(struct _adapter *padapter, struct  net_device *pnetdev)
 	registry_par->low_power = (u8)low_power;
 	registry_par->wifi_test = (u8) wifi_test;
 	r8712_initmac = initmac;
-	return _SUCCESS;
 }
 
 static int r871x_net_set_mac_address(struct net_device *pnetdev, void *p)
drivers/staging/rtl8723au/os_dep/os_intfs.c +1 -2
index 1b23eb1..d6d9af6 100644
@@ -172,7 +172,7 @@ MODULE_PARM_DESC(debug, "Set debug level (1-9) (default 1)");
 
 static int netdev_close(struct net_device *pnetdev);
 
-static int loadparam(struct rtw_adapter *padapter,  struct net_device *pnetdev)
+static void loadparam(struct rtw_adapter *padapter,  struct net_device *pnetdev)
 {
 	struct registry_priv  *registry_par = &padapter->registrypriv;
 
@@ -233,7 +233,6 @@ static int loadparam(struct rtw_adapter *padapter,  struct net_device *pnetdev)
 	snprintf(registry_par->if2name, 16, "%s", if2name);
 	registry_par->notch_filter = (u8)rtw_notch_filter;
 	registry_par->regulatory_tid = (u8)rtw_regulatory_id;
-	return _SUCCESS;
 }
 
 static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 9 lines · Cristina Opriceana

Change _SUCCESS return value for function loadparam to void as it never changes and it's also never used when calling the function.

---
 drivers/staging/rtl8188eu/os_dep/os_intfs.c | 3 +--
 drivers/staging/rtl8712/os_intfs.c          | 5 ++---
 drivers/staging/rtl8723au/os_dep/os_intfs.c | 3 +--
 3 files changed, 4 insertions(+), 7 deletions(-)

This does not apply to my tree properly :(