public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers:staging:rtl8723bs: Removed unneeded variables
@ 2019-09-17 14:31 Aliasgar Surti
  2019-09-17 14:44 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Aliasgar Surti @ 2019-09-17 14:31 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel; +Cc: Aliasgar Surti

From: Aliasgar Surti <aliasgar.surti500@gmail.com>

coccicheck reported warning for unneeded variable used.

This patch removes the unneeded variables.

Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index d1b199e..fa3ffc3 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -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;
 }
 
 
-- 
2.7.4


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

* Re: [PATCH] drivers:staging:rtl8723bs: Removed unneeded variables
  2019-09-17 14:31 [PATCH] drivers:staging:rtl8723bs: Removed unneeded variables Aliasgar Surti
@ 2019-09-17 14:44 ` Dan Carpenter
  2019-09-18  6:14   ` ABC XYZ
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2019-09-17 14:44 UTC (permalink / raw)
  To: Aliasgar Surti; +Cc: gregkh, devel, linux-kernel

On Tue, Sep 17, 2019 at 08:01:31PM +0530, Aliasgar Surti wrote:
> From: Aliasgar Surti <aliasgar.surti500@gmail.com>
> 
> coccicheck reported warning for unneeded variable used.
> 
> This patch removes the unneeded variables.
> 
> Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> index d1b199e..fa3ffc3 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> @@ -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


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

* Re: [PATCH] drivers:staging:rtl8723bs: Removed unneeded variables
  2019-09-17 14:44 ` Dan Carpenter
@ 2019-09-18  6:14   ` ABC XYZ
  0 siblings, 0 replies; 3+ messages in thread
From: ABC XYZ @ 2019-09-18  6:14 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, devel, linux-kernel

On Tue, Sep 17, 2019 at 05:44:32PM +0300, Dan Carpenter wrote:
> On Tue, Sep 17, 2019 at 08:01:31PM +0530, Aliasgar Surti wrote:
> > From: Aliasgar Surti <aliasgar.surti500@gmail.com>
> > 
> > coccicheck reported warning for unneeded variable used.
> > 
> > This patch removes the unneeded variables.
> > 
> > Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com>
> > ---
> >  drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 15 +++++----------
> >  1 file changed, 5 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > index d1b199e..fa3ffc3 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > @@ -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
> 
> regards,
> dan carpenter
> 

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

end of thread, other threads:[~2019-09-18  6:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-17 14:31 [PATCH] drivers:staging:rtl8723bs: Removed unneeded variables Aliasgar Surti
2019-09-17 14:44 ` Dan Carpenter
2019-09-18  6:14   ` ABC XYZ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox