From: Joe Perches <joe@perches.com>
To: Matthew Emerson <emersonmde@gmail.com>
Cc: gregkh@linuxfoundation.org, Jes.Sorensen@redhat.com,
linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: Fixed multiple space issues
Date: Sat, 27 Dec 2014 09:26:47 -0800 [thread overview]
Message-ID: <1419701207.20894.3.camel@perches.com> (raw)
In-Reply-To: <1419669741-6048-1-git-send-email-emersonmde@gmail.com>
On Sat, 2014-12-27 at 03:42 -0500, Matthew Emerson wrote:
> Fixed multiple space issues found by checkpatch.pl in
> drivers/staging/rtl8723au/core/rtw_ap.c
Hello.
Please strive for more than simple robotic like
adherence to checkpatch messages.
A lot of the time, there is a better way.
> diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
[]
> @@ -897,7 +897,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
> pairwise_cipher = 0;
> psecuritypriv->wpa_group_cipher = 0;
> psecuritypriv->wpa_pairwise_cipher = 0;
> - for (p = ie; ;p += (ie_len + 2)) {
> + for (p = ie; ; p += (ie_len + 2)) {
While it's arguably true that the ; is misplaced,
the loop control logic is probably better rewritten
for clarity here instead.
[]
> @@ -1871,7 +1871,7 @@ void stop_ap_mode23a(struct rtw_adapter *padapter)
> pmlmeext->bstart_bss = false;
>
> /* reset and init security priv , this can refine with rtw_reset_securitypriv23a */
> - memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv));
> + memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));
unnecessary cast too.
More likely this style would be nicer:
memset(&adapter->securitypriv, 0, sizeof(adapter->securitypriv));
You could also use a compound literal.
prev parent reply other threads:[~2014-12-27 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-27 8:42 [PATCH] staging: rtl8723au: Fixed multiple space issues Matthew Emerson
2014-12-27 17:26 ` Joe Perches [this message]
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=1419701207.20894.3.camel@perches.com \
--to=joe@perches.com \
--cc=Jes.Sorensen@redhat.com \
--cc=devel@driverdev.osuosl.org \
--cc=emersonmde@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).