[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28159639-c011-62a0-e8bd-07a79aadca91@gmail.com>
Date: Fri, 16 Sep 2022 07:47:52 +0200
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Anjandev Momi <anjan@...i.ca>, gregkh@...uxfoundation.org
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: rtl8192e: fixed brace, space, and align coding
style issues
On 9/16/22 05:06, Anjandev Momi wrote:
> After applying this patch, file drivers/staging/rtl8192e/rtl819x_BAProc.c only
> has "Avoid CamelCase" coding style issue
>
The patch description needs to describe _why_ the change is required or
makes sense.
Have a look at:
https://lore.kernel.org/linux-staging/
https://lore.kernel.org/linux-staging/20220911174933.3784-3-straube.linux@gmail.com/T/#u
> Signed-off-by: Anjandev Momi <anjan@...i.ca>
> ---
> drivers/staging/rtl8192e/rtl819x_BAProc.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> index 7d04966af..b4e565af1 100644
> --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
> +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> @@ -62,6 +62,7 @@ void ResetBaEntry(struct ba_record *pBA)
> pBA->dialog_token = 0;
> pBA->ba_start_seq_ctrl.short_data = 0;
> }
> +
> static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
> struct ba_record *pBA,
> u16 StatusCode, u8 type)
This makes sense
> @@ -113,7 +114,7 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
> tag += 2;
>
> if (type == ACT_ADDBAREQ) {
> - memcpy(tag, (u8 *)&(pBA->ba_start_seq_ctrl), 2);
> + memcpy(tag, (u8 *)&pBA->ba_start_seq_ctrl, 2);
> tag += 2;
> }
>
This makes sense
> @@ -161,7 +162,6 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
> *tag++ = ACT_CAT_BA;
> *tag++ = ACT_DELBA;
>
> -
> put_unaligned_le16(DelbaParamSet.short_data, tag);
> tag += 2;
>
This makes sense
> @@ -258,8 +258,8 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
> ieee->pHTInfo->bCurrentHTSupport);
> goto OnADDBAReq_Fail;
> }
> - if (!GetTs(ieee, (struct ts_common_info **)(&pTS), dst,
> - (u8)(pBaParamSet->field.tid), RX_DIR, true)) {
> + if (!GetTs(ieee, (struct ts_common_info **)(&pTS),
> + dst, (u8)(pBaParamSet->field.tid), RX_DIR, true)) {
> rc = ADDBA_STATUS_REFUSED;
> netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
> goto OnADDBAReq_Fail;
Why do you need to put the "dst" to the next line?
> @@ -282,7 +282,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
> pBA->ba_start_seq_ctrl = *pBaStartSeqCtrl;
>
> if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) ||
> - (ieee->pHTInfo->IOTAction & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT))
> + (ieee->pHTInfo->IOTAction & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT))
> pBA->ba_param_set.field.buffer_size = 1;
> else
> pBA->ba_param_set.field.buffer_size = 32;
Did checkpatch tell you to do so?
> @@ -380,7 +380,6 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
> goto OnADDBARsp_Reject;
> }
>
> -
> pAdmittedBA->dialog_token = *pDialogToken;
> pAdmittedBA->ba_timeout_value = *pBaTimeoutVal;
> pAdmittedBA->ba_start_seq_ctrl = pPendingBA->ba_start_seq_ctrl;
This makes sense
> @@ -419,8 +418,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
> return -1;
> }
>
> - if (!ieee->current_network.qos_data.active ||
> - !ieee->pHTInfo->bCurrentHTSupport) {
> + if (!ieee->current_network.qos_data.active || !ieee->pHTInfo->bCurrentHTSupport) {
> netdev_warn(ieee->dev,
> "received DELBA while QOS or HT is not supported(%d, %d)\n",
> ieee->current_network. qos_data.active,
This makes sense
> @@ -440,7 +438,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
> struct rx_ts_record *pRxTs;
>
> if (!GetTs(ieee, (struct ts_common_info **)&pRxTs, dst,
> - (u8)pDelBaParamSet->field.tid, RX_DIR, false)) {
> + (u8)pDelBaParamSet->field.tid, RX_DIR, false)) {
> netdev_warn(ieee->dev,
> "%s(): can't get TS for RXTS. dst:%pM TID:%d\n",
> __func__, dst,
Did checkpatch tell you to do so? Checkpatch is not always right. I see
what you want to do but I cannot say that this is really improving
readability.
Always consider that I am not the maintainer. Those are just my opinions.
I can apply and compile your patch. Connection works.
I am sure you need a v2 of this patch with an updated description.
Please do include a change history.
Bye Philipp
Powered by blists - more mailing lists