From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Moon Yeounsu <yyyynoom@gmail.com>,
gregkh@linuxfoundation.org, linux-staging@lists.linux.dev
Cc: Moon Yeounsu <yyyynom@gmail.com>
Subject: Re: [PATCH] staging: rtl8712: style fix multiple line dereference
Date: Wed, 17 Jul 2024 21:48:55 +0200 [thread overview]
Message-ID: <150abedb-1eef-4406-bded-a1fe2bc9ac17@gmail.com> (raw)
In-Reply-To: <20240717130636.2139-1-yyyynom@gmail.com>
On 7/17/24 15:06, Moon Yeounsu wrote:
> It fix the following checkpatch.pl warning:
> Avoid multiple line dereference - prefer %s
>
> Signed-off-by: Moon Yeounsu <yyyynom@gmail.com>
> ---
> drivers/staging/rtl8712/rtl871x_cmd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
> index bbd4a13c7bb9..c8a220e04776 100644
> --- a/drivers/staging/rtl8712/rtl871x_cmd.c
> +++ b/drivers/staging/rtl8712/rtl871x_cmd.c
> @@ -528,8 +528,7 @@ void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
> if (unicast_key)
> memcpy(&psetstakey_para->key, &sta->x_UncstKey, 16);
> else
> - memcpy(&psetstakey_para->key, &psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1].
> - skey, 16);
> + memcpy(&psetstakey_para->key, &psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1].skey, 16);
> r8712_enqueue_cmd(pcmdpriv, ph2c);
> }
>
Hi Moon,
you did not use checkpatch on your patch:
kernel@matrix-ESPRIMO-P710:~/Documents/git/kernels/staging$ git commit
--amend
WARNING: line length of 110 exceeds 100 columns
#21: FILE: drivers/staging/rtl8712/rtl871x_cmd.c:531:
+ memcpy(&psetstakey_para->key,
&psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1].skey, 16);
CHECK: Avoid CamelCase: <XGrpKey>
#21: FILE: drivers/staging/rtl8712/rtl871x_cmd.c:531:
+ memcpy(&psetstakey_para->key,
&psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1].skey, 16);
CHECK: Avoid CamelCase: <XGrpKeyid>
#21: FILE: drivers/staging/rtl8712/rtl871x_cmd.c:531:
+ memcpy(&psetstakey_para->key,
&psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1].skey, 16);
WARNING: From:/Signed-off-by: email address mismatch: 'From: Moon
Yeounsu <yyyynoom@gmail.com>' != 'Signed-off-by: Moon Yeounsu
<yyyynom@gmail.com>'
total: 0 errors, 2 warnings, 2 checks, 9 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or
--fix-inplace.
"[PATCH] staging: rtl8712: style fix multiple line dereference" has
style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[staging-testing b055801a1388] staging: rtl8712: style fix multiple line
dereference
Author: Moon Yeounsu <yyyynoom@gmail.com>
Date: Wed Jul 17 09:06:36 2024 -0400
1 file changed, 1 insertion(+), 2 deletions(-)
The two warnings need to be fixed. But it is very difficult to fix the
line break as you would need to shorten the line itself. May be you like
to start with something else. Feel free to contact me directly for any
question.
If you send in a second version of this patch please use a change
history. Description from Dan under:
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
Bye Philipp
next prev parent reply other threads:[~2024-07-17 19:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 13:06 [PATCH] staging: rtl8712: style fix multiple line dereference Moon Yeounsu
2024-07-17 19:48 ` Philipp Hortmann [this message]
2024-07-17 20:23 ` Dan Carpenter
2024-07-18 13:26 ` [PATCH v2] " Moon Yeounsu
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=150abedb-1eef-4406-bded-a1fe2bc9ac17@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
--cc=yyyynom@gmail.com \
--cc=yyyynoom@gmail.com \
/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