From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Anjandev Momi <anjan@momi.ca>, gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: rtl8192e: fixed brace, space, and align coding style issues
Date: Fri, 16 Sep 2022 07:47:52 +0200 [thread overview]
Message-ID: <28159639-c011-62a0-e8bd-07a79aadca91@gmail.com> (raw)
In-Reply-To: <20220916030655.11105-1-anjan@momi.ca>
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@momi.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
next prev parent reply other threads:[~2022-09-16 5:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 3:06 Anjandev Momi
2022-09-16 5:47 ` Philipp Hortmann [this message]
2022-09-22 8:00 ` Anjandev Momi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28159639-c011-62a0-e8bd-07a79aadca91@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=anjan@momi.ca \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®