Re: [PATCH] staging: rtl8188eu: Remove an unused variable and some lines of code

From: Dan Carpenter
Date: Fri Jul 02 2021 - 03:49:10 EST


On Thu, Jul 01, 2021 at 04:47:07PM +0200, Fabio M. De Francesco wrote:
> Remove set but unused iw_operation_mode[]. Remove all the lines of
> code from the function rtw_wx_set_rate, except the "return 0;" line
> to not break userland code that somewhat uses this IOCTL.
>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
> ---
> .../staging/rtl8188eu/os_dep/ioctl_linux.c | 72 -------------------
> 1 file changed, 72 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> index b958a8d882b0..a66d8838c034 100644
> --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> @@ -46,11 +46,6 @@ static u32 rtw_rates[] = {1000000, 2000000, 5500000, 11000000,
> 6000000, 9000000, 12000000, 18000000, 24000000, 36000000,
> 48000000, 54000000};
>
> -static const char * const iw_operation_mode[] = {
> - "Auto", "Ad-Hoc", "Managed", "Master", "Repeater",
> - "Secondary", "Monitor"
> -};
> -
> void indicate_wx_scan_complete_event(struct adapter *padapter)
> {
> union iwreq_data wrqu;
> @@ -1266,73 +1261,6 @@ static int rtw_wx_set_rate(struct net_device *dev,
> struct iw_request_info *a,
> union iwreq_data *wrqu, char *extra)
> {

Just delete this whole file. It doesn't do anything now.

regards,
dan carpenter