Re: [PATCH] Staging: rtl8723bs: os_dep: Remove functions that don't perform any task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 22, 2019 at 09:30:56PM +0530, Puranjay Mohan wrote:
> Remove functions which return 0 without performing any task.
> Fix following warnings issued by coccicheck:
> Unneeded variable: "err". Return "0" on line 4484
> and similar other warnings.
> 
> Signed-off-by: Puranjay Mohan <puranjay12@xxxxxxxxx>
> ---
>  .../staging/rtl8723bs/os_dep/ioctl_linux.c    | 41 -------------------
>  1 file changed, 41 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> index bfbbcf0bded3..3b5f3e9ae5f7 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> @@ -4476,43 +4476,6 @@ static int rtw_pm_set(struct net_device *dev,
>  	return ret;
>  }
>  
> -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;
> -}
> -
> -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;
> -}
> -
> -static int rtw_tdls(struct net_device *dev,
> -				struct iw_request_info *info,
> -				union iwreq_data *wrqu, char *extra)
> -{
> -	int ret = 0;
> -	return ret;
> -}
> -
> -
> -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;
> -}
> -
> -
> -
> -
> -
>  static int rtw_test(
>  	struct net_device *dev,
>  	struct iw_request_info *info,
> @@ -4789,15 +4752,11 @@ static iw_handler rtw_private_handler[] = {
>  	NULL,							/* 0x12 */
>  	rtw_p2p_get2,					/* 0x13 */
>  
> -	rtw_tdls,						/* 0x14 */
> -	rtw_tdls_get,					/* 0x15 */
>  
>  	rtw_pm_set,						/* 0x16 */
>  	rtw_wx_priv_null,				/* 0x17 */
>  	rtw_rereg_nd_name,				/* 0x18 */
>  	rtw_wx_priv_null,				/* 0x19 */
> -	rtw_mp_efuse_set,				/* 0x1A */
> -	rtw_mp_efuse_get,				/* 0x1B */
>  	NULL,							/*  0x1C is reserved for hostapd */
>  	rtw_test,						/*  0x1D */
>  };

Are you _SURE_ you can just delete those lines?

{hint I do not think so, prove me wrong...}

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux