All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: remove unused struct declarations
@ 2022-11-02 20:53 Deepak R Varma
  2022-11-02 22:09 ` Philipp Hortmann
  0 siblings, 1 reply; 5+ messages in thread
From: Deepak R Varma @ 2022-11-02 20:53 UTC (permalink / raw)
  To: outreachy, Larry Finger, Phillip Potter, Pavel Skripkin,
	Greg Kroah-Hartman, linux-staging, linux-kernel

Some structures are only declared but have not been used anywhere
in the code. Remove such unused structs. Issue identified as part
of coccicheck report driven code investigation.


Suggested-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
 drivers/staging/r8188eu/include/wlan_bssdef.h | 42 -------------------
 1 file changed, 42 deletions(-)

diff --git a/drivers/staging/r8188eu/include/wlan_bssdef.h b/drivers/staging/r8188eu/include/wlan_bssdef.h
index 831c465df500..ffeafa19ef26 100644
--- a/drivers/staging/r8188eu/include/wlan_bssdef.h
+++ b/drivers/staging/r8188eu/include/wlan_bssdef.h
@@ -177,20 +177,6 @@ struct ndis_802_11_status_ind {
 /*  MIC check time, 60 seconds. */
 #define MIC_CHECK_TIME	60000000

-struct ndis_802_11_auth_evt {
-	struct ndis_802_11_status_ind       Status;
-	struct ndis_802_11_auth_req  Request[1];
-};
-
-struct ndis_802_11_test {
-	u32 Length;
-	u32 Type;
-	union {
-		struct ndis_802_11_auth_evt AuthenticationEvent;
-		NDIS_802_11_RSSI RssiTrigger;
-	} tt;
-};
-
 #ifndef Ndis802_11APMode
 #define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
 #endif
@@ -279,34 +265,6 @@ enum UAPSD_MAX_SP {
 #define NUM_PRE_AUTH_KEY 16
 #define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY

-/*
-*	WPA2
-*/
-
-struct pmkid_candidate {
-	unsigned char BSSID[ETH_ALEN];
-	u32 Flags;
-};
-
-struct ndis_802_11_pmkid_list {
-	u32 Version;       /*  Version of the structure */
-	u32 NumCandidates; /*  No. of pmkid candidates */
-	struct pmkid_candidate CandidateList[1];
-};
-
-struct ndis_802_11_auth_encrypt {
-	enum ndis_802_11_auth_mode AuthModeSupported;
-	enum ndis_802_11_wep_status EncryptStatusSupported;
-};
-
-struct ndis_802_11_cap {
-	u32  Length;
-	u32  Version;
-	u32  NoOfPMKIDs;
-	u32  NoOfAuthEncryptPairsSupported;
-	struct ndis_802_11_auth_encrypt AuthenticationEncryptionSupported[1];
-};
-
 u8 key_2char2num(u8 hch, u8 lch);
 u8 key_char2num(u8 ch);
 u8 str_2char2num(u8 hch, u8 lch);
--
2.34.1




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

* Re: [PATCH] staging: r8188eu: remove unused struct declarations
  2022-11-02 20:53 [PATCH] staging: r8188eu: remove unused struct declarations Deepak R Varma
@ 2022-11-02 22:09 ` Philipp Hortmann
  2022-11-03  9:47   ` Deepak R Varma
  0 siblings, 1 reply; 5+ messages in thread
From: Philipp Hortmann @ 2022-11-02 22:09 UTC (permalink / raw)
  To: Deepak R Varma, outreachy, Larry Finger, Phillip Potter,
	Pavel Skripkin, Greg Kroah-Hartman, linux-staging, linux-kernel

On 11/2/22 21:53, Deepak R Varma wrote:
> Some structures are only declared but have not been used anywhere
> in the code. Remove such unused structs. Issue identified as part
> of coccicheck report driven code investigation.
> 
> 
> Suggested-by: Pavel Skripkin <paskripkin@gmail.com>
> Signed-off-by: Deepak R Varma <drv@mailo.com>
> ---
>   drivers/staging/r8188eu/include/wlan_bssdef.h | 42 -------------------
>   1 file changed, 42 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/include/wlan_bssdef.h b/drivers/staging/r8188eu/include/wlan_bssdef.h
> index 831c465df500..ffeafa19ef26 100644
> --- a/drivers/staging/r8188eu/include/wlan_bssdef.h
> +++ b/drivers/staging/r8188eu/include/wlan_bssdef.h
> @@ -177,20 +177,6 @@ struct ndis_802_11_status_ind {
>   /*  MIC check time, 60 seconds. */
>   #define MIC_CHECK_TIME	60000000
> 
> -struct ndis_802_11_auth_evt {
> -	struct ndis_802_11_status_ind       Status;
> -	struct ndis_802_11_auth_req  Request[1];
> -};
> -
> -struct ndis_802_11_test {
> -	u32 Length;
> -	u32 Type;
> -	union {
> -		struct ndis_802_11_auth_evt AuthenticationEvent;
> -		NDIS_802_11_RSSI RssiTrigger;
> -	} tt;
> -};
> -
>   #ifndef Ndis802_11APMode
>   #define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
>   #endif
> @@ -279,34 +265,6 @@ enum UAPSD_MAX_SP {
>   #define NUM_PRE_AUTH_KEY 16
>   #define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
> 
> -/*
> -*	WPA2
> -*/
> -
> -struct pmkid_candidate {
> -	unsigned char BSSID[ETH_ALEN];
> -	u32 Flags;
> -};
> -
> -struct ndis_802_11_pmkid_list {
> -	u32 Version;       /*  Version of the structure */
> -	u32 NumCandidates; /*  No. of pmkid candidates */
> -	struct pmkid_candidate CandidateList[1];
> -};
> -
> -struct ndis_802_11_auth_encrypt {
> -	enum ndis_802_11_auth_mode AuthModeSupported;
> -	enum ndis_802_11_wep_status EncryptStatusSupported;
> -};
> -
> -struct ndis_802_11_cap {
> -	u32  Length;
> -	u32  Version;
> -	u32  NoOfPMKIDs;
> -	u32  NoOfAuthEncryptPairsSupported;
> -	struct ndis_802_11_auth_encrypt AuthenticationEncryptionSupported[1];
> -};
> -
>   u8 key_2char2num(u8 hch, u8 lch);
>   u8 key_char2num(u8 ch);
>   u8 str_2char2num(u8 hch, u8 lch);
> --
> 2.34.1
> 
> 
> 
> 

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

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

* Re: [PATCH] staging: r8188eu: remove unused struct declarations
  2022-11-02 22:09 ` Philipp Hortmann
@ 2022-11-03  9:47   ` Deepak R Varma
  2022-11-03 21:19     ` Philipp Hortmann
  0 siblings, 1 reply; 5+ messages in thread
From: Deepak R Varma @ 2022-11-03  9:47 UTC (permalink / raw)
  To: Philipp Hortmann
  Cc: outreachy, Larry Finger, Phillip Potter, Pavel Skripkin,
	Greg Kroah-Hartman, linux-staging, linux-kernel

On Wed, Nov 02, 2022 at 11:09:46PM +0100, Philipp Hortmann wrote:
> On 11/2/22 21:53, Deepak R Varma wrote:
> > Some structures are only declared but have not been used anywhere
> > in the code. Remove such unused structs. Issue identified as part
> > of coccicheck report driven code investigation.
> >
>
> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

Hello Philipp,
Thank you for testing the changes.

Request (not urgent):
Can you please help me understand how do you
test such changes? Do we need specific hardware for functional tests? Is there a
documentation available to know more about the testing? I am interested in
attaching a physical device to my machine and be able to debug and test the
changes. Can you please provide details when you have time?

Thank you in advance!
./drv


>



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

* Re: [PATCH] staging: r8188eu: remove unused struct declarations
  2022-11-03  9:47   ` Deepak R Varma
@ 2022-11-03 21:19     ` Philipp Hortmann
  2022-11-04 16:55       ` Deepak R Varma
  0 siblings, 1 reply; 5+ messages in thread
From: Philipp Hortmann @ 2022-11-03 21:19 UTC (permalink / raw)
  To: Deepak R Varma
  Cc: outreachy, Larry Finger, Phillip Potter, Pavel Skripkin,
	Greg Kroah-Hartman, linux-staging, linux-kernel

On 11/3/22 10:47, Deepak R Varma wrote:
> Hello Philipp,
> Thank you for testing the changes.
> 
> Request (not urgent):
> Can you please help me understand how do you
> test such changes? Do we need specific hardware for functional tests? Is there a
> documentation available to know more about the testing? I am interested in
> attaching a physical device to my machine and be able to debug and test the
> changes. Can you please provide details when you have time?
> 
> Thank you in advance!
> ./drv

Hi Deepak,

I do have one device for the following drivers:

vt6656
vt6655
r8188eu
r8192e_pci
r8712u

Minimum test is to measure the transfer speed and see if that is as 
expected.

When I doubt that the changed code is used I use ftrace to see if the 
code is used. But of course I do not test every possibility.

I hope you have the money to be able to buy hardware. Without it is not fun.

I would choose r8188eu (USB) or r8192e_pci.

Bye Philipp

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

* Re: [PATCH] staging: r8188eu: remove unused struct declarations
  2022-11-03 21:19     ` Philipp Hortmann
@ 2022-11-04 16:55       ` Deepak R Varma
  0 siblings, 0 replies; 5+ messages in thread
From: Deepak R Varma @ 2022-11-04 16:55 UTC (permalink / raw)
  To: Philipp Hortmann
  Cc: outreachy, Larry Finger, Phillip Potter, Pavel Skripkin,
	Greg Kroah-Hartman, linux-staging, linux-kernel

On Thu, Nov 03, 2022 at 10:19:05PM +0100, Philipp Hortmann wrote:
> On 11/3/22 10:47, Deepak R Varma wrote:
> > Hello Philipp,
> > Thank you for testing the changes.
> >
> > Request (not urgent):
> > Can you please help me understand how do you
> > test such changes? Do we need specific hardware for functional tests? Is there a
> > documentation available to know more about the testing? I am interested in
> > attaching a physical device to my machine and be able to debug and test the
> > changes. Can you please provide details when you have time?
> >
> > Thank you in advance!
> > ./drv
>
> Hi Deepak,
>
> I do have one device for the following drivers:
>
> vt6656
> vt6655
> r8188eu
> r8192e_pci
> r8712u

Wow... that sounds like a very useful set (and a lot of testing time :) )

>
> Minimum test is to measure the transfer speed and see if that is as
> expected.
>
> When I doubt that the changed code is used I use ftrace to see if the code
> is used. But of course I do not test every possibility.

Okay. May be as I gain more knowledge, I will be able to apply it as well. I
hope it will be okay to connect with you in future if an opportunity arises.

>
> I hope you have the money to be able to buy hardware. Without it is not fun.
>
> I would choose r8188eu (USB) or r8192e_pci.

Thank you so much for the recommendation. I will find out the cost and see if I
can buy one of those.

Have a great weekend!
./drv

>
> Bye Philipp
>



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

end of thread, other threads:[~2022-11-04 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 20:53 [PATCH] staging: r8188eu: remove unused struct declarations Deepak R Varma
2022-11-02 22:09 ` Philipp Hortmann
2022-11-03  9:47   ` Deepak R Varma
2022-11-03 21:19     ` Philipp Hortmann
2022-11-04 16:55       ` Deepak R Varma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.