All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Staging: drivers: Remove unecessary return value
@ 2015-03-16 20:50 Cristina Opriceana
  2015-03-16 21:02 ` [Outreachy kernel] " Julia Lawall
  2015-03-17  9:45 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Cristina Opriceana @ 2015-03-16 20:50 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: outreachy-kernel

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

Done with coccinelle:
@rule@
typedef uint;
@@

(
-uint
|
-int
)
+void
loadparam(...)
{
	...
-return _SUCCESS;
}

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
---
Changes in v2:
 - use coccinelle script to apply the changes easier
 - reaply patch on the refreshed tree

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

diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
index 750c87b..218c69a 100644
--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c
@@ -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)
diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c
index db6a1597..0f1ae47 100644
--- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
@@ -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)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-17  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-16 20:50 [PATCH v2] Staging: drivers: Remove unecessary return value Cristina Opriceana
2015-03-16 21:02 ` [Outreachy kernel] " Julia Lawall
2015-03-17  9:45 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.