Skip to contentSkip to conversation

drivers:staging:rtl8723bs: Removed unneeded variables

PATCH Superseded Aliasgar Surti 2 participants 3 messages Sep 17, 2019 – Sep 18, 2019 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers:staging:rtl8723bs: Removed unneeded variables

From: Aliasgar Surti <[email protected]>

coccicheck reported warning for unneeded variable used.

This patch removes the unneeded variables.

---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +5 -10
index d1b199e..fa3ffc3 100644
@@ -2428,8 +2428,7 @@ static  int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
 static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info,
 						union iwreq_data *wrqu, char *extra)
 {
-	int ret = 0;
-	return ret;
+	return 0;
 }
 
 static int rtw_get_ap_info(struct net_device *dev,
@@ -4462,24 +4461,21 @@ static int rtw_mp_efuse_get(struct net_device *dev,
 			struct iw_request_info *info,
 			union iwreq_data *wdata, char *extra)
 {
-	int err = 0;
-	return err;
+	return 0;
 }
 
 static int rtw_mp_efuse_set(struct net_device *dev,
 			struct iw_request_info *info,
 			union iwreq_data *wdata, char *extra)
 {
-	int err = 0;
-	return err;
+	return 0;
 }
 
 static int rtw_tdls(struct net_device *dev,
 				struct iw_request_info *info,
 				union iwreq_data *wrqu, char *extra)
 {
-	int ret = 0;
-	return ret;
+	return 0;
 }
 
 
@@ -4487,8 +4483,7 @@ static int rtw_tdls_get(struct net_device *dev,
 				struct iw_request_info *info,
 				union iwreq_data *wrqu, char *extra)
 {
-	int ret = 0;
-	return ret;
+	return 0;
 }
 
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 16 lines · Aliasgar Surti

From: Aliasgar Surti <[email protected]>

coccicheck reported warning for unneeded variable used.

This patch removes the unneeded variables.

---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0 -0
index d1b199e..fa3ffc3 100644

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info, · line 2432

Quoted 7 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -2
@@ -2428,8 +2428,7 @@ static  int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
 static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info,
 						union iwreq_data *wrqu, char *extra)
 {
-	int ret = 0;
-	return ret;
+	return 0;
 }

Just get rid of the whole function. Replace the pointer in the function array with a NULL.

regards,
dan carpenter

author
#2 lore raw
Quoted 12 lines · Dan Carpenter
Quoted 11 lines · Aliasgar Surti

From: Aliasgar Surti <[email protected]>

coccicheck reported warning for unneeded variable used.

This patch removes the unneeded variables.

---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
Quoted 15 lines

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info, · line 2432

Quoted 12 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -2
index d1b199e..fa3ffc3 100644
@@ -2428,8 +2428,7 @@ static  int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
 static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info,
 						union iwreq_data *wrqu, char *extra)
 {
-	int ret = 0;
-	return ret;
+	return 0;
 }

Just get rid of the whole function. Replace the pointer in the function array with a NULL.

Okay, I will get rid of unneeded functions and replace them with NULL in function array.

Thanks,
Aliasgar

Quoted 4 lines

regards,
dan carpenter