* [PATCH 1/6] staging: rtl8723bs: Replace string with identifier
2019-10-11 4:35 [PATCH 0/6] staging: rtl8723bs: Clean-up in rtw_security.c Javier F. Arias
@ 2019-10-11 4:36 ` Javier F. Arias
2019-10-11 6:00 ` [Outreachy kernel] " Julia Lawall
2019-10-11 4:36 ` [PATCH 2/6] staging: rtl8723bs: Fix lines over 80 characters Javier F. Arias
` (4 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Javier F. Arias @ 2019-10-11 4:36 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Replace the hardcoded function names with the corresponding
predefined identifiers.
Issue found by checkpatch.
Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 5ffaf9bfa6e8..4c92a3abb2c8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -303,8 +303,8 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
*((u32 *)crc) = le32_to_cpu(getcrc32(payload, length-4));
if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_wep_decrypt:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
- crc[3], payload[length-1], crc[2], payload[length-2], crc[1], payload[length-3], crc[0], payload[length-4]));
+ RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
+ __func__, crc[3], payload[length-1], crc[2], payload[length-2], crc[1], payload[length-3], crc[0], payload[length-4]));
}
WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
@@ -695,7 +695,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
return _FAIL;
}
*/
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo!= NULL!!!\n"));
+ RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
if (IS_MCAST(pattrib->ra))
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
@@ -853,7 +853,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
TKIP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
} else {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n"));
+ RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
res = _FAIL;
}
@@ -1543,7 +1543,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
/* 4 start to encrypt each fragment */
if (pattrib->encrypt == _AES_) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo!= NULL!!!\n"));
+ RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
if (IS_MCAST(pattrib->ra))
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
@@ -1834,10 +1834,10 @@ static sint aes_decipher(u8 *key, uint hdrlen,
/* compare the mic */
for (i = 0; i < 8; i++) {
if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("aes_decipher:mic check error mic[%d]: pframe(%x) != message(%x)\n",
- i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]));
- DBG_871X("aes_decipher:mic check error mic[%d]: pframe(%x) != message(%x)\n",
- i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
+ RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
+ __func__, i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]));
+ DBG_871X("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
+ __func__, i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
res = _FAIL;
}
}
@@ -1868,7 +1868,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
if (prxattrib->encrypt == _AES_) {
stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
if (stainfo != NULL) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
+ RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
if (IS_MCAST(prxattrib->ra)) {
static unsigned long start;
@@ -1926,7 +1926,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
} else {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo == NULL!!!\n"));
+ RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
res = _FAIL;
}
}
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [Outreachy kernel] [PATCH 1/6] staging: rtl8723bs: Replace string with identifier
2019-10-11 4:36 ` [PATCH 1/6] staging: rtl8723bs: Replace string with identifier Javier F. Arias
@ 2019-10-11 6:00 ` Julia Lawall
0 siblings, 0 replies; 14+ messages in thread
From: Julia Lawall @ 2019-10-11 6:00 UTC (permalink / raw)
To: Javier F. Arias; +Cc: gregkh, outreachy-kernel
On Thu, 10 Oct 2019, Javier F. Arias wrote:
> Replace the hardcoded function names with the corresponding
> predefined identifiers.
It could have been better to address the 80 character issues first, to
make this patch more understandable.
julia
> Issue found by checkpatch.
>
> Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_security.c | 22 +++++++++----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> index 5ffaf9bfa6e8..4c92a3abb2c8 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> @@ -303,8 +303,8 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
> *((u32 *)crc) = le32_to_cpu(getcrc32(payload, length-4));
>
> if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) {
> - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_wep_decrypt:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
> - crc[3], payload[length-1], crc[2], payload[length-2], crc[1], payload[length-3], crc[0], payload[length-4]));
> + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
> + __func__, crc[3], payload[length-1], crc[2], payload[length-2], crc[1], payload[length-3], crc[0], payload[length-4]));
> }
>
> WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
> @@ -695,7 +695,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
> return _FAIL;
> }
> */
> - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo!= NULL!!!\n"));
> + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
>
> if (IS_MCAST(pattrib->ra))
> prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
> @@ -853,7 +853,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
>
> TKIP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
> } else {
> - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_decrypt: stainfo == NULL!!!\n"));
> + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
> res = _FAIL;
> }
>
> @@ -1543,7 +1543,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
>
> /* 4 start to encrypt each fragment */
> if (pattrib->encrypt == _AES_) {
> - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_encrypt: stainfo!= NULL!!!\n"));
> + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
>
> if (IS_MCAST(pattrib->ra))
> prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
> @@ -1834,10 +1834,10 @@ static sint aes_decipher(u8 *key, uint hdrlen,
> /* compare the mic */
> for (i = 0; i < 8; i++) {
> if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) {
> - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("aes_decipher:mic check error mic[%d]: pframe(%x) != message(%x)\n",
> - i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]));
> - DBG_871X("aes_decipher:mic check error mic[%d]: pframe(%x) != message(%x)\n",
> - i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
> + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
> + __func__, i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]));
> + DBG_871X("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
> + __func__, i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
> res = _FAIL;
> }
> }
> @@ -1868,7 +1868,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
> if (prxattrib->encrypt == _AES_) {
> stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
> if (stainfo != NULL) {
> - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
> + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
>
> if (IS_MCAST(prxattrib->ra)) {
> static unsigned long start;
> @@ -1926,7 +1926,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
>
> AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
> } else {
> - RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo == NULL!!!\n"));
> + RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
> res = _FAIL;
> }
> }
> --
> 2.20.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/b2ff6a52a7140480c9fdb6486a6ac6b4eb51203b.1570768179.git.jarias.linux%40gmail.com.
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/6] staging: rtl8723bs: Fix lines over 80 characters
2019-10-11 4:35 [PATCH 0/6] staging: rtl8723bs: Clean-up in rtw_security.c Javier F. Arias
2019-10-11 4:36 ` [PATCH 1/6] staging: rtl8723bs: Replace string with identifier Javier F. Arias
@ 2019-10-11 4:36 ` Javier F. Arias
2019-10-11 4:37 ` [PATCH 3/6] staging: rtl8723bs: Add spaces between operators Javier F. Arias
` (3 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Javier F. Arias @ 2019-10-11 4:36 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Fix lines over 80 characters by wrapping arguments in function calls,
improving the format for a better code readability.
Issue found by checkpatch.
Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 40 ++++++++++++++-----
1 file changed, 31 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 4c92a3abb2c8..605155ea724c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -303,8 +303,14 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
*((u32 *)crc) = le32_to_cpu(getcrc32(payload, length-4));
if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
- __func__, crc[3], payload[length-1], crc[2], payload[length-2], crc[1], payload[length-3], crc[0], payload[length-4]));
+ RT_TRACE(_module_rtl871x_security_c_,
+ _drv_err_,
+ ("%s:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
+ __func__,
+ crc[3], payload[length-1],
+ crc[2], payload[length-2],
+ crc[1], payload[length-3],
+ crc[0], payload[length-4]));
}
WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
@@ -845,9 +851,13 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
*((u32 *)crc) = le32_to_cpu(getcrc32(payload, length-4));
if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
+ RT_TRACE(_module_rtl871x_security_c_,
+ _drv_err_,
("rtw_wep_decrypt:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
- crc[3], payload[length-1], crc[2], payload[length-2], crc[1], payload[length-3], crc[0], payload[length-4]));
+ crc[3], payload[length-1],
+ crc[2], payload[length-2],
+ crc[1], payload[length-3],
+ crc[0], payload[length-4]));
res = _FAIL;
}
@@ -1834,10 +1844,18 @@ static sint aes_decipher(u8 *key, uint hdrlen,
/* compare the mic */
for (i = 0; i < 8; i++) {
if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
- __func__, i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]));
+ RT_TRACE(_module_rtl871x_security_c_,
+ _drv_err_,
+ ("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
+ __func__,
+ i,
+ pframe[hdrlen+8+plen-8+i],
+ message[hdrlen+8+plen-8+i]));
DBG_871X("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
- __func__, i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]);
+ __func__,
+ i,
+ pframe[hdrlen+8+plen-8+i],
+ message[hdrlen+8+plen-8+i]);
res = _FAIL;
}
}
@@ -1868,7 +1886,9 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
if (prxattrib->encrypt == _AES_) {
stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
if (stainfo != NULL) {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
+ RT_TRACE(_module_rtl871x_security_c_,
+ _drv_err_,
+ ("%s: stainfo!= NULL!!!\n", __func__));
if (IS_MCAST(prxattrib->ra)) {
static unsigned long start;
@@ -1926,7 +1946,9 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
AES_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
} else {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo == NULL!!!\n", __func__));
+ RT_TRACE(_module_rtl871x_security_c_,
+ _drv_err_,
+ ("%s: stainfo == NULL!!!\n", __func__));
res = _FAIL;
}
}
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 3/6] staging: rtl8723bs: Add spaces between operators
2019-10-11 4:35 [PATCH 0/6] staging: rtl8723bs: Clean-up in rtw_security.c Javier F. Arias
2019-10-11 4:36 ` [PATCH 1/6] staging: rtl8723bs: Replace string with identifier Javier F. Arias
2019-10-11 4:36 ` [PATCH 2/6] staging: rtl8723bs: Fix lines over 80 characters Javier F. Arias
@ 2019-10-11 4:37 ` Javier F. Arias
2019-10-11 4:37 ` [PATCH 4/6] staging: rtl8723bs: Remove commented code Javier F. Arias
` (2 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Javier F. Arias @ 2019-10-11 4:37 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Add spaces between operators for a better readability.
Issue found by checkpatch.
Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 605155ea724c..0529a21c9740 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -307,10 +307,10 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
_drv_err_,
("%s:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
__func__,
- crc[3], payload[length-1],
- crc[2], payload[length-2],
- crc[1], payload[length-3],
- crc[0], payload[length-4]));
+ crc[3], payload[length - 1],
+ crc[2], payload[length - 2],
+ crc[1], payload[length - 3],
+ crc[0], payload[length - 4]));
}
WEP_SW_DEC_CNT_INC(psecuritypriv, prxattrib->ra);
@@ -854,10 +854,10 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
RT_TRACE(_module_rtl871x_security_c_,
_drv_err_,
("rtw_wep_decrypt:icv error crc[3](%x)!=payload[length-1](%x) || crc[2](%x)!=payload[length-2](%x) || crc[1](%x)!=payload[length-3](%x) || crc[0](%x)!=payload[length-4](%x)\n",
- crc[3], payload[length-1],
- crc[2], payload[length-2],
- crc[1], payload[length-3],
- crc[0], payload[length-4]));
+ crc[3], payload[length - 1],
+ crc[2], payload[length - 2],
+ crc[1], payload[length - 3],
+ crc[0], payload[length - 4]));
res = _FAIL;
}
@@ -1849,13 +1849,13 @@ static sint aes_decipher(u8 *key, uint hdrlen,
("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
__func__,
i,
- pframe[hdrlen+8+plen-8+i],
- message[hdrlen+8+plen-8+i]));
+ pframe[hdrlen + 8 + plen - 8 + i],
+ message[hdrlen + 8 + plen - 8 + i]));
DBG_871X("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n",
__func__,
i,
- pframe[hdrlen+8+plen-8+i],
- message[hdrlen+8+plen-8+i]);
+ pframe[hdrlen + 8 + plen - 8 + i],
+ message[hdrlen + 8 + plen - 8 + i]);
res = _FAIL;
}
}
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 4/6] staging: rtl8723bs: Remove commented code
2019-10-11 4:35 [PATCH 0/6] staging: rtl8723bs: Clean-up in rtw_security.c Javier F. Arias
` (2 preceding siblings ...)
2019-10-11 4:37 ` [PATCH 3/6] staging: rtl8723bs: Add spaces between operators Javier F. Arias
@ 2019-10-11 4:37 ` Javier F. Arias
2019-10-11 4:37 ` [PATCH 5/6] staging: rtl8723bs: Fix indentation warnings Javier F. Arias
2019-10-11 4:38 ` [PATCH 6/6] staging: rtl8723bs: Fix function call format Javier F. Arias
5 siblings, 0 replies; 14+ messages in thread
From: Javier F. Arias @ 2019-10-11 4:37 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Remove commented code for a cleaner file.
Issue found by checkpatch.
Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 56 +++----------------
1 file changed, 9 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 0529a21c9740..4f6802b3ade1 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -666,7 +666,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
u8 *pframe, *payload, *iv, *prwskey;
union pn48 dot11txpn;
- /* struct sta_info *stainfo; */
struct pkt_attrib *pattrib = &((struct xmit_frame *)pxmitframe)->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
@@ -681,32 +680,12 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
/* 4 start to encrypt each fragment */
if (pattrib->encrypt == _TKIP_) {
-/*
- if (pattrib->psta)
{
- stainfo = pattrib->psta;
- }
- else
- {
- DBG_871X("%s, call rtw_get_stainfo()\n", __func__);
- stainfo =rtw_get_stainfo(&padapter->stapriv ,&pattrib->ra[0]);
- }
-*/
- /* if (stainfo!= NULL) */
- {
-/*
- if (!(stainfo->state &_FW_LINKED))
- {
- DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, stainfo->state);
- return _FAIL;
- }
-*/
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo!= NULL!!!\n", __func__));
if (IS_MCAST(pattrib->ra))
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
else
- /* prwskey =&stainfo->dot118021x_UncstKey.skey[0]; */
prwskey = pattrib->dot118021x_UncstKey.skey;
prwskeylen = 16;
@@ -747,13 +726,6 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
TKIP_SW_ENC_CNT_INC(psecuritypriv, pattrib->ra);
}
-/*
- else {
- RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_tkip_encrypt: stainfo == NULL!!!\n"));
- DBG_871X("%s, psta ==NUL\n", __func__);
- res = _FAIL;
- }
-*/
}
return res;
@@ -777,7 +749,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
struct sta_info *stainfo;
struct rx_pkt_attrib *prxattrib = &((union recv_frame *)precvframe)->u.hdr.attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
-/* struct recv_priv *precvpriv =&padapter->recvpriv; */
u32 res = _SUCCESS;
pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
@@ -822,8 +793,6 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
no_gkey_bc_cnt = 0;
no_gkey_mc_cnt = 0;
- /* DBG_871X("rx bc/mc packets, to perform sw rtw_tkip_decrypt\n"); */
- /* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
prwskeylen = 16;
} else {
@@ -1435,7 +1404,7 @@ static sint aes_cipher(u8 *key, uint hdrlen,
aes128k128d(key, chain_buffer, aes_out);
for (i = 0; i < num_blocks; i++) {
- bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);/* bitwise_xor(aes_out, &message[payload_index], chain_buffer); */
+ bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
payload_index += 16;
aes128k128d(key, chain_buffer, aes_out);
@@ -1446,7 +1415,7 @@ static sint aes_cipher(u8 *key, uint hdrlen,
for (j = 0; j < 16; j++)
padded_buffer[j] = 0x00;
for (j = 0; j < payload_remainder; j++) {
- padded_buffer[j] = pframe[payload_index++];/* padded_buffer[j] = message[payload_index++]; */
+ padded_buffer[j] = pframe[payload_index++];
}
bitwise_xor(aes_out, padded_buffer, chain_buffer);
aes128k128d(key, chain_buffer, aes_out);
@@ -1458,7 +1427,7 @@ static sint aes_cipher(u8 *key, uint hdrlen,
/* Insert MIC into payload */
for (j = 0; j < 8; j++)
- pframe[payload_index+j] = mic[j]; /* message[payload_index+j] = mic[j]; */
+ pframe[payload_index+j] = mic[j];
payload_index = hdrlen + 8;
for (i = 0; i < num_blocks; i++) {
@@ -1472,9 +1441,9 @@ static sint aes_cipher(u8 *key, uint hdrlen,
frtype
); /* add for CONFIG_IEEE80211W, none 11w also can use */
aes128k128d(key, ctr_preload, aes_out);
- bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);/* bitwise_xor(aes_out, &message[payload_index], chain_buffer); */
+ bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
for (j = 0; j < 16; j++)
- pframe[payload_index++] = chain_buffer[j];/* for (j = 0; j<16;j++) message[payload_index++] = chain_buffer[j]; */
+ pframe[payload_index++] = chain_buffer[j];
}
if (payload_remainder > 0) {
@@ -1493,12 +1462,12 @@ static sint aes_cipher(u8 *key, uint hdrlen,
for (j = 0; j < 16; j++)
padded_buffer[j] = 0x00;
for (j = 0; j < payload_remainder; j++)
- padded_buffer[j] = pframe[payload_index+j];/* padded_buffer[j] = message[payload_index+j]; */
+ padded_buffer[j] = pframe[payload_index+j];
aes128k128d(key, ctr_preload, aes_out);
bitwise_xor(aes_out, padded_buffer, chain_buffer);
for (j = 0; j < payload_remainder; j++)
- pframe[payload_index++] = chain_buffer[j];/* for (j = 0; j<payload_remainder;j++) message[payload_index++] = chain_buffer[j]; */
+ pframe[payload_index++] = chain_buffer[j];
}
/* Encrypt the MIC */
@@ -1515,12 +1484,12 @@ static sint aes_cipher(u8 *key, uint hdrlen,
for (j = 0; j < 16; j++)
padded_buffer[j] = 0x00;
for (j = 0; j < 8; j++)
- padded_buffer[j] = pframe[j+hdrlen+8+plen];/* padded_buffer[j] = message[j+hdrlen+8+plen]; */
+ padded_buffer[j] = pframe[j+hdrlen+8+plen];
aes128k128d(key, ctr_preload, aes_out);
bitwise_xor(aes_out, padded_buffer, chain_buffer);
for (j = 0; j < 8; j++)
- pframe[payload_index++] = chain_buffer[j];/* for (j = 0; j<8;j++) message[payload_index++] = chain_buffer[j]; */
+ pframe[payload_index++] = chain_buffer[j];
return _SUCCESS;
}
@@ -1537,12 +1506,10 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
u32 prwskeylen;
u8 *pframe, *prwskey; /* *payload,*iv */
u8 hw_hdr_offset = 0;
- /* struct sta_info *stainfo = NULL; */
struct pkt_attrib *pattrib = &((struct xmit_frame *)pxmitframe)->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
-/* uint offset = 0; */
u32 res = _SUCCESS;
if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
@@ -1558,7 +1525,6 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
if (IS_MCAST(pattrib->ra))
prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
else
- /* prwskey =&stainfo->dot118021x_UncstKey.skey[0]; */
prwskey = pattrib->dot118021x_UncstKey.skey;
prwskeylen = 16;
@@ -1602,7 +1568,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
u8 mic[8];
-/* uint offset = 0; */
uint frtype = GetFrameType(pframe);
uint frsubtype = GetFrameSubType(pframe);
@@ -1878,7 +1843,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
struct sta_info *stainfo;
struct rx_pkt_attrib *prxattrib = &((union recv_frame *)precvframe)->u.hdr.attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
-/* struct recv_priv *precvpriv =&padapter->recvpriv; */
u32 res = _SUCCESS;
pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
@@ -1895,8 +1859,6 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
static u32 no_gkey_bc_cnt;
static u32 no_gkey_mc_cnt;
- /* DBG_871X("rx bc/mc packets, to perform sw rtw_aes_decrypt\n"); */
- /* prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey; */
if (psecuritypriv->binstallGrpkey == false) {
res = _FAIL;
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 5/6] staging: rtl8723bs: Fix indentation warnings
2019-10-11 4:35 [PATCH 0/6] staging: rtl8723bs: Clean-up in rtw_security.c Javier F. Arias
` (3 preceding siblings ...)
2019-10-11 4:37 ` [PATCH 4/6] staging: rtl8723bs: Remove commented code Javier F. Arias
@ 2019-10-11 4:37 ` Javier F. Arias
2019-10-11 4:38 ` [PATCH 6/6] staging: rtl8723bs: Fix function call format Javier F. Arias
5 siblings, 0 replies; 14+ messages in thread
From: Javier F. Arias @ 2019-10-11 4:37 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Fix indentation warnings to improve the code formatting.
Issue found by checkpatch.
Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 4f6802b3ade1..08570e78d5e2 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -1489,7 +1489,7 @@ static sint aes_cipher(u8 *key, uint hdrlen,
aes128k128d(key, ctr_preload, aes_out);
bitwise_xor(aes_out, padded_buffer, chain_buffer);
for (j = 0; j < 8; j++)
- pframe[payload_index++] = chain_buffer[j];
+ pframe[payload_index++] = chain_buffer[j];
return _SUCCESS;
}
@@ -1625,7 +1625,7 @@ static sint aes_decipher(u8 *key, uint hdrlen,
payload_index = hdrlen + 8; /* 8 is for extiv */
for (i = 0; i < num_blocks; i++) {
- construct_ctr_preload(
+ construct_ctr_preload(
ctr_preload,
a4_exists,
qc_exists,
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH 6/6] staging: rtl8723bs: Fix function call format
2019-10-11 4:35 [PATCH 0/6] staging: rtl8723bs: Clean-up in rtw_security.c Javier F. Arias
` (4 preceding siblings ...)
2019-10-11 4:37 ` [PATCH 5/6] staging: rtl8723bs: Fix indentation warnings Javier F. Arias
@ 2019-10-11 4:38 ` Javier F. Arias
2019-10-11 6:05 ` [Outreachy kernel] " Julia Lawall
5 siblings, 1 reply; 14+ messages in thread
From: Javier F. Arias @ 2019-10-11 4:38 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Fix function call format by following the coding style guidelines
for argument wrapping in function calls.
Issue found by checkpatch.
Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 08570e78d5e2..a809521da53d 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint hdrlen,
payload_index = hdrlen + 8; /* 8 is for extiv */
for (i = 0; i < num_blocks; i++) {
- construct_ctr_preload(
- ctr_preload,
- a4_exists,
- qc_exists,
- pframe,
- pn_vector,
- i+1,
- frtype /* add for CONFIG_IEEE80211W, none 11w also can use */
- );
+ construct_ctr_preload(ctr_preload,
+ a4_exists,
+ qc_exists,
+ pframe,
+ pn_vector,
+ i+1,
+ frtype); /* add for CONFIG_IEEE80211W, none 11w also can use */
+
aes128k128d(key, ctr_preload, aes_out);
bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
--
2.20.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format
2019-10-11 4:38 ` [PATCH 6/6] staging: rtl8723bs: Fix function call format Javier F. Arias
@ 2019-10-11 6:05 ` Julia Lawall
2019-10-16 3:27 ` Javier Arias
0 siblings, 1 reply; 14+ messages in thread
From: Julia Lawall @ 2019-10-11 6:05 UTC (permalink / raw)
To: Javier F. Arias; +Cc: gregkh, outreachy-kernel
On Thu, 10 Oct 2019, Javier F. Arias wrote:
> Fix function call format by following the coding style guidelines
> for argument wrapping in function calls.
> Issue found by checkpatch.
>
> Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> index 08570e78d5e2..a809521da53d 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint hdrlen,
> payload_index = hdrlen + 8; /* 8 is for extiv */
>
> for (i = 0; i < num_blocks; i++) {
> - construct_ctr_preload(
> - ctr_preload,
> - a4_exists,
> - qc_exists,
> - pframe,
> - pn_vector,
> - i+1,
> - frtype /* add for CONFIG_IEEE80211W, none 11w also can use */
> - );
> + construct_ctr_preload(ctr_preload,
> + a4_exists,
> + qc_exists,
> + pframe,
> + pn_vector,
> + i+1,
> + frtype); /* add for CONFIG_IEEE80211W, none 11w also can use */
> +
It could be more readable with more arguments on one line.
Also, the i+1 seems like it should have been fixed in a previous patch in
the series?
julia
>
> aes128k128d(key, ctr_preload, aes_out);
> bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
> --
> 2.20.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
>
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format
2019-10-11 6:05 ` [Outreachy kernel] " Julia Lawall
@ 2019-10-16 3:27 ` Javier Arias
2019-10-16 5:09 ` Julia Lawall
2019-10-16 5:11 ` Julia Lawall
0 siblings, 2 replies; 14+ messages in thread
From: Javier Arias @ 2019-10-16 3:27 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 3008 bytes --]
Hello Julia,
Thanks for your feedback. I rebased so the i+1 is now addressed by a
previous patch, but I'm afraid that changing the order of the "80 character
issue" commit as the first one would affect the line number for the other
commits.
Should I resend the patch with the fix only or should I drop this/start
again?
On Friday, 11 October 2019 01:05:22 UTC-5, Julia Lawall wrote:
>
>
>
> On Thu, 10 Oct 2019, Javier F. Arias wrote:
>
> > Fix function call format by following the coding style guidelines
> > for argument wrapping in function calls.
> > Issue found by checkpatch.
> >
> > Signed-off-by: Javier F. Arias <jaria...@gmail.com <javascript:>>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
> > 1 file changed, 8 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c
> b/drivers/staging/rtl8723bs/core/rtw_security.c
> > index 08570e78d5e2..a809521da53d 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key,
> uint hdrlen,
> > payload_index = hdrlen + 8; /* 8 is for extiv */
> >
> > for (i = 0; i < num_blocks; i++) {
> > - construct_ctr_preload(
> > - ctr_preload,
> > - a4_exists,
> > - qc_exists,
> > - pframe,
> > - pn_vector,
> > - i+1,
> > - frtype /* add for CONFIG_IEEE80211W,
> none 11w also can use */
> > - );
> > + construct_ctr_preload(ctr_preload,
> > + a4_exists,
> > + qc_exists,
> > + pframe,
> > + pn_vector,
> > + i+1,
> > + frtype); /* add for
> CONFIG_IEEE80211W, none 11w also can use */
> > +
>
> It could be more readable with more arguments on one line.
>
> Also, the i+1 seems like it should have been fixed in a previous patch in
> the series?
>
> julia
>
> >
> > aes128k128d(key, ctr_preload, aes_out);
> > bitwise_xor(aes_out, &pframe[payload_index],
> chain_buffer);
> > --
> > 2.20.1
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreach...@googlegroups.com <javascript:>.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
>
> >
>
[-- Attachment #1.2: Type: text/html, Size: 5114 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format
2019-10-16 3:27 ` Javier Arias
@ 2019-10-16 5:09 ` Julia Lawall
2019-10-16 5:11 ` Julia Lawall
1 sibling, 0 replies; 14+ messages in thread
From: Julia Lawall @ 2019-10-16 5:09 UTC (permalink / raw)
To: Javier Arias; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 4641 bytes --]
On Tue, 15 Oct 2019, Javier Arias wrote:
> Hello Julia,
>
> Thanks for your feedback. I rebased so the i+1 is now addressed by a previous patch, but I'm afraid that changing the order of the "80 character issue" commit as the first one would affect the line number for the other commits.
There are two cases:
1. Greg has accepted your previous patch. Then you can forget about your
previous patch and make the new one on top of Greg's latest tree.
2. Greg has not accepted your previous patch yet. Then you can send a new
patch series with v2. It doesn't matter if things move around between
different numbers in the series, as Greg is only going to look at the
latest version (highest v number).
julia
>
> Should I resend the patch with the fix only or should I drop this/start again?
>
> On Friday, 11 October 2019 01:05:22 UTC-5, Julia Lawall wrote:
>
>
> On Thu, 10 Oct 2019, Javier F. Arias wrote:
>
> > Fix function call format by following the coding style guidelines
> > for argument wrapping in function calls.
> > Issue found by checkpatch.
> >
> > Signed-off-by: Javier F. Arias <jaria...@gmail.com>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
> > 1 file changed, 8 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> > index 08570e78d5e2..a809521da53d 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint hdrlen,
> > payload_index = hdrlen + 8; /* 8 is for extiv */
> >
> > for (i = 0; i < num_blocks; i++) {
> > - construct_ctr_preload(
> > - ctr_preload,
> > - a4_exists,
> > - qc_exists,
> > - pframe,
> > - pn_vector,
> > - i+1,
> > - frtype /* add for CONFIG_IEEE80211W, none 11w also can use */
> > - );
> > + construct_ctr_preload(ctr_preload,
> > + a4_exists,
> > + qc_exists,
> > + pframe,
> > + pn_vector,
> > + i+1,
> > + frtype); /* add for CONFIG_IEEE80211W, none 11w also can use */
> > +
>
> It could be more readable with more arguments on one line.
>
> Also, the i+1 seems like it should have been fixed in a previous patch in
> the series?
>
> julia
>
> >
> > aes128k128d(key, ctr_preload, aes_out);
> > bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
> > --
> > 2.20.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreach...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format
2019-10-16 3:27 ` Javier Arias
2019-10-16 5:09 ` Julia Lawall
@ 2019-10-16 5:11 ` Julia Lawall
2019-10-17 2:34 ` Javier Arias
2019-10-25 5:53 ` Javier Arias
1 sibling, 2 replies; 14+ messages in thread
From: Julia Lawall @ 2019-10-16 5:11 UTC (permalink / raw)
To: Javier Arias; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 4441 bytes --]
On Tue, 15 Oct 2019, Javier Arias wrote:
> Hello Julia,
>
> Thanks for your feedback. I rebased so the i+1 is now addressed by a previous patch, but I'm afraid that changing the order of the "80 character issue" commit as the first one would affect the line number for the other commits.
>
> Should I resend the patch with the fix only or should I drop this/start again?
>
> On Friday, 11 October 2019 01:05:22 UTC-5, Julia Lawall wrote:
>
>
> On Thu, 10 Oct 2019, Javier F. Arias wrote:
>
> > Fix function call format by following the coding style guidelines
> > for argument wrapping in function calls.
> > Issue found by checkpatch.
> >
> > Signed-off-by: Javier F. Arias <jaria...@gmail.com>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_security.c | 17 ++++++++---------
> > 1 file changed, 8 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> > index 08570e78d5e2..a809521da53d 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key, uint hdrlen,
Actually, while you are on this file, there seems to be something weird
about the hdrlen parameter in the line above. There is a lot of space
between it and its type. Maybe there is a tab that should be a space?
julia
> > payload_index = hdrlen + 8; /* 8 is for extiv */
> >
> > for (i = 0; i < num_blocks; i++) {
> > - construct_ctr_preload(
> > - ctr_preload,
> > - a4_exists,
> > - qc_exists,
> > - pframe,
> > - pn_vector,
> > - i+1,
> > - frtype /* add for CONFIG_IEEE80211W, none 11w also can use */
> > - );
> > + construct_ctr_preload(ctr_preload,
> > + a4_exists,
> > + qc_exists,
> > + pframe,
> > + pn_vector,
> > + i+1,
> > + frtype); /* add for CONFIG_IEEE80211W, none 11w also can use */
> > +
>
> It could be more readable with more arguments on one line.
>
> Also, the i+1 seems like it should have been fixed in a previous patch in
> the series?
>
> julia
>
> >
> > aes128k128d(key, ctr_preload, aes_out);
> > bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);
> > --
> > 2.20.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreach...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
> >
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format
2019-10-16 5:11 ` Julia Lawall
@ 2019-10-17 2:34 ` Javier Arias
2019-10-25 5:53 ` Javier Arias
1 sibling, 0 replies; 14+ messages in thread
From: Javier Arias @ 2019-10-17 2:34 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 4595 bytes --]
Ok I'm on it.
About the commit order, my concern was that as the "80 character issue" is
changing the line numbers in the file (add new lines) if I switch the order
of the first 2 commits it will break. I experimented a bit and in deed had
a issue with rebase. So I'll be leaving it as 2nd commit and will have your
suggestion into account for the next patch.
On Wednesday, 16 October 2019 00:11:11 UTC-5, Julia Lawall wrote:
>
>
>
> On Tue, 15 Oct 2019, Javier Arias wrote:
>
> > Hello Julia,
> >
> > Thanks for your feedback. I rebased so the i+1 is now addressed by a
> previous patch, but I'm afraid that changing the order of the "80 character
> issue" commit as the first one would affect the line number for the other
> commits.
> >
> > Should I resend the patch with the fix only or should I drop this/start
> again?
> >
> > On Friday, 11 October 2019 01:05:22 UTC-5, Julia Lawall wrote:
> >
> >
> > On Thu, 10 Oct 2019, Javier F. Arias wrote:
> >
> > > Fix function call format by following the coding style
> guidelines
> > > for argument wrapping in function calls.
> > > Issue found by checkpatch.
> > >
> > > Signed-off-by: Javier F. Arias <jaria...@gmail.com>
> > > ---
> > > drivers/staging/rtl8723bs/core/rtw_security.c | 17
> ++++++++---------
> > > 1 file changed, 8 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c
> b/drivers/staging/rtl8723bs/core/rtw_security.c
> > > index 08570e78d5e2..a809521da53d 100644
> > > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key,
> uint hdrlen,
>
> Actually, while you are on this file, there seems to be something weird
> about the hdrlen parameter in the line above. There is a lot of space
> between it and its type. Maybe there is a tab that should be a space?
>
> julia
>
>
> > > payload_index = hdrlen + 8; /* 8 is for extiv */
> > >
> > > for (i = 0; i < num_blocks; i++) {
> > > - construct_ctr_preload(
> > > - ctr_preload,
> > > - a4_exists,
> > > - qc_exists,
> > > - pframe,
> > > - pn_vector,
> > > - i+1,
> > > - frtype /* add for
> CONFIG_IEEE80211W, none 11w also can use */
> > > - );
> > > + construct_ctr_preload(ctr_preload,
> > > + a4_exists,
> > > + qc_exists,
> > > + pframe,
> > > + pn_vector,
> > > + i+1,
> > > + frtype); /* add for
> CONFIG_IEEE80211W, none 11w also can use */
> > > +
> >
> > It could be more readable with more arguments on one line.
> >
> > Also, the i+1 seems like it should have been fixed in a previous
> patch in
> > the series?
> >
> > julia
> >
> > >
> > > aes128k128d(key, ctr_preload, aes_out);
> > > bitwise_xor(aes_out,
> &pframe[payload_index], chain_buffer);
> > > --
> > > 2.20.1
> > >
> > > --
> > > You received this message because you are subscribed to the
> Google Groups "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from
> it, send an email to outreach...@googlegroups.com.
> > > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
>
> > >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreach...@googlegroups.com <javascript:>.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.
>
> >
> >
[-- Attachment #1.2: Type: text/html, Size: 7474 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [Outreachy kernel] [PATCH 6/6] staging: rtl8723bs: Fix function call format
2019-10-16 5:11 ` Julia Lawall
2019-10-17 2:34 ` Javier Arias
@ 2019-10-25 5:53 ` Javier Arias
1 sibling, 0 replies; 14+ messages in thread
From: Javier Arias @ 2019-10-25 5:53 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 4310 bytes --]
Hello Julia,
I didn't receive feedback nor acceptance in this patchset either.
On Wednesday, 16 October 2019 00:11:11 UTC-5, Julia Lawall wrote:
>
>
>
> On Tue, 15 Oct 2019, Javier Arias wrote:
>
> > Hello Julia,
> >
> > Thanks for your feedback. I rebased so the i+1 is now addressed by a
> previous patch, but I'm afraid that changing the order of the "80 character
> issue" commit as the first one would affect the line number for the other
> commits.
> >
> > Should I resend the patch with the fix only or should I drop this/start
> again?
> >
> > On Friday, 11 October 2019 01:05:22 UTC-5, Julia Lawall wrote:
> >
> >
> > On Thu, 10 Oct 2019, Javier F. Arias wrote:
> >
> > > Fix function call format by following the coding style
> guidelines
> > > for argument wrapping in function calls.
> > > Issue found by checkpatch.
> > >
> > > Signed-off-by: Javier F. Arias <jaria...@gmail.com>
> > > ---
> > > drivers/staging/rtl8723bs/core/rtw_security.c | 17
> ++++++++---------
> > > 1 file changed, 8 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c
> b/drivers/staging/rtl8723bs/core/rtw_security.c
> > > index 08570e78d5e2..a809521da53d 100644
> > > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > > @@ -1625,15 +1625,14 @@ static sint aes_decipher(u8 *key,
> uint hdrlen,
>
> Actually, while you are on this file, there seems to be something weird
> about the hdrlen parameter in the line above. There is a lot of space
> between it and its type. Maybe there is a tab that should be a space?
>
> julia
>
>
> > > payload_index = hdrlen + 8; /* 8 is for extiv */
> > >
> > > for (i = 0; i < num_blocks; i++) {
> > > - construct_ctr_preload(
> > > - ctr_preload,
> > > - a4_exists,
> > > - qc_exists,
> > > - pframe,
> > > - pn_vector,
> > > - i+1,
> > > - frtype /* add for
> CONFIG_IEEE80211W, none 11w also can use */
> > > - );
> > > + construct_ctr_preload(ctr_preload,
> > > + a4_exists,
> > > + qc_exists,
> > > + pframe,
> > > + pn_vector,
> > > + i+1,
> > > + frtype); /* add for
> CONFIG_IEEE80211W, none 11w also can use */
> > > +
> >
> > It could be more readable with more arguments on one line.
> >
> > Also, the i+1 seems like it should have been fixed in a previous
> patch in
> > the series?
> >
> > julia
> >
> > >
> > > aes128k128d(key, ctr_preload, aes_out);
> > > bitwise_xor(aes_out,
> &pframe[payload_index], chain_buffer);
> > > --
> > > 2.20.1
> > >
> > > --
> > > You received this message because you are subscribed to the
> Google Groups "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from
> it, send an email to outreach...@googlegroups.com.
> > > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/8dd3e932f49df42d598113f29c5e5e7a7c25ae52.1570768179.git.jarias.linux%40gmail.com.
>
> > >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreach...@googlegroups.com <javascript:>.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/0b4bb686-4380-44db-a19e-7924a45f1e3f%40googlegroups.com.
>
> >
> >
[-- Attachment #1.2: Type: text/html, Size: 7087 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread