Trivial code cleanup patches
cover Trivial code cleanup patches
Address different kinds of checkpatch complains for the rtl8712 module to ensure adherence to coding style guidelines.
Ayush Tiwari (3):
staging: rtl8712: rename backupPMKIDList to backup_PMKID_list
staging: rtl8712: rename backupPMKIDIndex to backup_PMKID_index
staging: rtl8712: rename backupTKIPCountermeasure to
backup_TKIP_countermeasure
drivers/staging/rtl8712/mlme_linux.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.40.1
PATCH 1/3 staging: rtl8712: rename backupPMKIDList to backup_PMKID_list
Rename backupPMKIDList to backup_PMKID_list and remove extra spaces between RT_PMKID_LIST and backupPMKIDList to address checkpatch warnings and match the common kernel coding style.
--- drivers/staging/rtl8712/mlme_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/mlme_linux.c +1 -1
@@ -84,7 +84,7 @@ void r8712_os_indicate_connect(struct _adapter *adapter)netif_carrier_on (adapter->pnetdev); } -static struct RT_PMKID_LIST backupPMKIDList[NUM_PMKID_CACHE ]; +static struct RT_PMKID_LIST backup_PMKID_list[NUM_PMKID_CACHE ];void r8712_os_indicate_disconnect (struct _adapter *adapter) {u8 backupPMKIDIndex =0 ;
Signature · 1 line
2.40.1
Re: [PATCH 1/3] staging: rtl8712: rename backupPMKIDList to backup_PMKID_list
Quoted 14 lines · Ayush Tiwari
Rename backupPMKIDList to
backup_PMKID_listand remove extra spaces betweenRT_PMKID_LISTand backupPMKIDList to address checkpatch warnings and match the common kernel coding style.Signed-off-by Ayush Tiwari <[email protected]>--- drivers/staging/rtl8712/mlme_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8712/mlme_linux.c +0
-0
drivers/staging/rtl8712/mlme_linux.c void r8712_os_indicate_connect(struct _adapter *adapter) · line 87
Quoted 5 lines
drivers/staging/rtl8712/mlme_linux.c +1
-1@@ -84,7 +84,7 @@ void r8712_os_indicate_connect(struct _adapter *adapter)netif_carrier_on (adapter->pnetdev); } -static struct RT_PMKID_LIST backupPMKIDList[NUM_PMKID_CACHE ]; +static struct RT_PMKID_LIST backup_PMKID_list[NUM_PMKID_CACHE ];
This one looks suspicious, because you have changed the definition but no uses. Is it not used?
julia
Quoted 8 lines
drivers/staging/rtl8712/mlme_linux.c +0
-1void r8712_os_indicate_disconnect (struct _adapter *adapter) {u8 backupPMKIDIndex =0 ; --2.40.1
PATCH 2/3 staging: rtl8712: rename backupPMKIDIndex to backup_PMKID_index
In reply to Ayush TiwariRename variable backupPMKIDIndex to backup_PMKID_index to address checkpatch warning 'Avoid Camelcase' and to ensure adherence to coding style guidelines.
--- drivers/staging/rtl8712/mlme_linux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8712/mlme_linux.c +5 -5
@@ -87,7 +87,7 @@ void r8712_os_indicate_connect(struct _adapter *adapter)static struct RT_PMKID_LIST backup_PMKID_list[NUM_PMKID_CACHE ];void r8712_os_indicate_disconnect (struct _adapter *adapter) { -u8 backupPMKIDIndex =0 ; +u8 backup_PMKID_index =0 ;u8 backupTKIPCountermeasure =0x00 ;r8712_indicate_wx_disassoc_event (adapter);
@@ -99,10 +99,10 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter)* disconnect with AP for 60 seconds. */ -memcpy (&backupPMKIDList[0 ], +memcpy (&backup_PMKID_list[0 ], &adapter->securitypriv.PMKIDList[0 ],sizeof (struct RT_PMKID_LIST ) *NUM_PMKID_CACHE ); - backupPMKIDIndex = adapter->securitypriv.PMKIDIndex; + backup_PMKID_index = adapter->securitypriv.PMKIDIndex; backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure; memset((unsigned char *)&adapter->securitypriv, 0,
@@ -113,9 +113,9 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter)* for the following connection. */ memcpy (&adapter->securitypriv.PMKIDList[0 ], - &backupPMKIDList[0 ], + &backup_PMKID_list[0 ],sizeof (struct RT_PMKID_LIST ) *NUM_PMKID_CACHE ); - adapter->securitypriv.PMKIDIndex = backupPMKIDIndex; + adapter->securitypriv.PMKIDIndex = backup_PMKID_index; adapter->securitypriv.btkip_countermeasure = backupTKIPCountermeasure; }else {/*reset values in securitypriv*/
Signature · 1 line
2.40.1
PATCH 3/3 staging: rtl8712: rename backupTKIPCountermeasure to backup_TKIP_countermeasure
In reply to Ayush TiwariRename variable backupTKIPCountermeasure to backup_TKIP_countermeasure to address checkpatch warning 'Avoid Camelcase' and to ensure adherence to coding style guidelines.
--- drivers/staging/rtl8712/mlme_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/mlme_linux.c +3 -3
@@ -88,7 +88,7 @@ static struct RT_PMKID_LIST backup_PMKID_list[NUM_PMKID_CACHE];void r8712_os_indicate_disconnect (struct _adapter *adapter) {u8 backup_PMKID_index =0 ; -u8 backupTKIPCountermeasure =0x00 ; +u8 backup_TKIP_countermeasure =0x00 ;r8712_indicate_wx_disassoc_event (adapter);netif_carrier_off (adapter->pnetdev);
@@ -103,7 +103,7 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter) &adapter->securitypriv.PMKIDList[0 ], sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE); backup_PMKID_index = adapter->securitypriv.PMKIDIndex; - backupTKIPCountermeasure = + backup_TKIP_countermeasure = adapter->securitypriv.btkip_countermeasure;memset ((unsigned char *)&adapter->securitypriv,0 ,sizeof (struct security_priv ));
@@ -117,7 +117,7 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter) sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE); adapter->securitypriv.PMKIDIndex = backup_PMKID_index; adapter->securitypriv.btkip_countermeasure = - backupTKIPCountermeasure; + backup_TKIP_countermeasure; }else {/*reset values in securitypriv*/ struct security_priv *sec_priv = &adapter->securitypriv;
Signature · 1 line
2.40.1
Quoted 6 lines · On Monday, 18 March 2024 20:54:09 CET Ayush Tiwari wrote:
Address different kinds of checkpatch complains for the rtl8712 module to ensure adherence to coding style guidelines.
Changes in v2: Checked any possible reuse of
backup_PMKID_listmanually and rebuilt, rebooted the kernel and loaded the driver with modprobe.
You have not made any changes to any of the three patches in this series. No changes in commit messages and no changes in code. Am I missing something?
So why did you submit a v2 of this series?
Fabio
Quoted 8 lines
Ayush Tiwari (3):
staging: rtl8712: rename backupPMKIDList tobackup_PMKID_list
staging: rtl8712: rename backupPMKIDIndex tobackup_PMKID_index
staging: rtl8712: rename backupTKIPCountermeasure to
backup_TKIP_countermeasuredrivers/staging/rtl8712/mlme_linux.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
Quoted 6 lines · On Tuesday, 19 March 2024 07:04:34 CET Fabio M. De Francesco wrote:
Quoted 5 lines · On Monday, 18 March 2024 20:54:09 CET Ayush Tiwari wrote:
Address different kinds of checkpatch complains for the rtl8712 module to ensure adherence to coding style guidelines.
Changes in v2: Checked any possible reuse of
backup_PMKID_listmanually and rebuilt,
No you didn't do what you are saying.
Quoted 10 lines
rebooted the kernel and loaded the driver
Quoted 1 line
with modprobe.
You have not made any changes to any of the three patches in this series. No changes in commit messages and no changes in code. Am I missing something?
So why did you submit a v2 of this series?
Fabio
Julia commented on patch 1/3. You should either reply that everything is correct (if it is) or fix your patch. Please don't send new versions that don't change anything and don't ignore comments (mine included).
Quoted 2 lines
Quoted 2 lines
Ayush Tiwari (3):
staging: rtl8712: rename backupPMKIDList tobackup_PMKID_list
This patch introduces errors. You haven't compiled this module, otherwise you would have noticed that. Always compile your changes (preferably with CONFIG_WERROR set).
Please read the output of git-grep:
[fabio@linux]$ git grep backupPMKIDList drivers/staging/rtl8712 drivers/staging/rtl8712/mlme_linux.c: static struct RT_PMKID_LIST backupPMKIDList[NUM_PMKID_CACHE]; drivers/staging/rtl8712/mlme_linux.c: memcpy(&backupPMKIDList[0], drivers/staging/rtl8712/mlme_linux.c: &backupPMKIDList[0],
Can you see how patch 1/3 introduces errors?
Fabio
Quoted 7 lines
Quoted 7 lines
staging: rtl8712: rename backupPMKIDIndex to
backup_PMKID_index
staging: rtl8712: rename backupTKIPCountermeasure to
backup_TKIP_countermeasuredrivers/staging/rtl8712/mlme_linux.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)