* [PATCH] staging: r8188eu: os_dep: Remove defined but not used variables
@ 2021-08-14 16:08 Fabio M. De Francesco
2021-08-14 17:01 ` Michael Straube
2021-08-14 17:22 ` Phillip Potter
0 siblings, 2 replies; 3+ messages in thread
From: Fabio M. De Francesco @ 2021-08-14 16:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, Larry Finger, Phillip Potter, Martin Kaiser,
Michael Straube, linux-staging, linux-kernel
Cc: Fabio M. De Francesco
Remove defined but not used const variables. Issues detected by GCC
running with -Wunused-const-variable option enabled.
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 21 --------------------
1 file changed, 21 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 38ee41f9d2ba..d9fdd83218dc 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -84,11 +84,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;
@@ -6666,19 +6661,3 @@ struct iw_handler_def rtw_handlers_def = {
.num_private_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args),
.get_wireless_stats = rtw_get_wireless_stats,
};
-
-/* copy from net/wireless/wext.c start */
-/* ---------------------------------------------------------------- */
-/*
- * Calculate size of private arguments
- */
-static const char iw_priv_type_size[] = {
- 0, /* IW_PRIV_TYPE_NONE */
- 1, /* IW_PRIV_TYPE_BYTE */
- 1, /* IW_PRIV_TYPE_CHAR */
- 0, /* Not defined */
- sizeof(__u32), /* IW_PRIV_TYPE_INT */
- sizeof(struct iw_freq), /* IW_PRIV_TYPE_FLOAT */
- sizeof(struct sockaddr), /* IW_PRIV_TYPE_ADDR */
- 0, /* Not defined */
-};
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: r8188eu: os_dep: Remove defined but not used variables
2021-08-14 16:08 [PATCH] staging: r8188eu: os_dep: Remove defined but not used variables Fabio M. De Francesco
@ 2021-08-14 17:01 ` Michael Straube
2021-08-14 17:22 ` Phillip Potter
1 sibling, 0 replies; 3+ messages in thread
From: Michael Straube @ 2021-08-14 17:01 UTC (permalink / raw)
To: Fabio M. De Francesco, Greg Kroah-Hartman, Larry Finger,
Phillip Potter, Martin Kaiser, linux-staging, linux-kernel
On 8/14/21 6:08 PM, Fabio M. De Francesco wrote:
> Remove defined but not used const variables. Issues detected by GCC
> running with -Wunused-const-variable option enabled.
>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
> drivers/staging/r8188eu/os_dep/ioctl_linux.c | 21 --------------------
> 1 file changed, 21 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> index 38ee41f9d2ba..d9fdd83218dc 100644
> --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> @@ -84,11 +84,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;
> @@ -6666,19 +6661,3 @@ struct iw_handler_def rtw_handlers_def = {
> .num_private_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args),
> .get_wireless_stats = rtw_get_wireless_stats,
> };
> -
> -/* copy from net/wireless/wext.c start */
> -/* ---------------------------------------------------------------- */
> -/*
> - * Calculate size of private arguments
> - */
> -static const char iw_priv_type_size[] = {
> - 0, /* IW_PRIV_TYPE_NONE */
> - 1, /* IW_PRIV_TYPE_BYTE */
> - 1, /* IW_PRIV_TYPE_CHAR */
> - 0, /* Not defined */
> - sizeof(__u32), /* IW_PRIV_TYPE_INT */
> - sizeof(struct iw_freq), /* IW_PRIV_TYPE_FLOAT */
> - sizeof(struct sockaddr), /* IW_PRIV_TYPE_ADDR */
> - 0, /* Not defined */
> -};
>
Looks good to me, thanks.
Acked-by: Michael Straube <straube.linux@gmail.com>
Michael
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: r8188eu: os_dep: Remove defined but not used variables
2021-08-14 16:08 [PATCH] staging: r8188eu: os_dep: Remove defined but not used variables Fabio M. De Francesco
2021-08-14 17:01 ` Michael Straube
@ 2021-08-14 17:22 ` Phillip Potter
1 sibling, 0 replies; 3+ messages in thread
From: Phillip Potter @ 2021-08-14 17:22 UTC (permalink / raw)
To: Fabio M. De Francesco
Cc: Greg Kroah-Hartman, Larry Finger, Martin Kaiser, Michael Straube,
linux-staging, Linux Kernel Mailing List
On Sat, 14 Aug 2021 at 17:08, Fabio M. De Francesco
<fmdefrancesco@gmail.com> wrote:
>
> Remove defined but not used const variables. Issues detected by GCC
> running with -Wunused-const-variable option enabled.
>
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
> drivers/staging/r8188eu/os_dep/ioctl_linux.c | 21 --------------------
> 1 file changed, 21 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> index 38ee41f9d2ba..d9fdd83218dc 100644
> --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
> @@ -84,11 +84,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;
> @@ -6666,19 +6661,3 @@ struct iw_handler_def rtw_handlers_def = {
> .num_private_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args),
> .get_wireless_stats = rtw_get_wireless_stats,
> };
> -
> -/* copy from net/wireless/wext.c start */
> -/* ---------------------------------------------------------------- */
> -/*
> - * Calculate size of private arguments
> - */
> -static const char iw_priv_type_size[] = {
> - 0, /* IW_PRIV_TYPE_NONE */
> - 1, /* IW_PRIV_TYPE_BYTE */
> - 1, /* IW_PRIV_TYPE_CHAR */
> - 0, /* Not defined */
> - sizeof(__u32), /* IW_PRIV_TYPE_INT */
> - sizeof(struct iw_freq), /* IW_PRIV_TYPE_FLOAT */
> - sizeof(struct sockaddr), /* IW_PRIV_TYPE_ADDR */
> - 0, /* Not defined */
> -};
> --
> 2.32.0
>
Thanks Fabio.
Acked-by: Phillip Potter <phil@philpotter.co.uk>
Regards,
Phil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-14 17:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 16:08 [PATCH] staging: r8188eu: os_dep: Remove defined but not used variables Fabio M. De Francesco
2021-08-14 17:01 ` Michael Straube
2021-08-14 17:22 ` Phillip Potter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).