From: Greg KH <gregkh@linuxfoundation.org>
To: Briana Oursler <briana.oursler@gmail.com>
Cc: nramas@linux.microsoft.com, forest@alittletooquiet.net,
outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v2] staging: vt6655: Remove multiple assignments.
Date: Fri, 27 Mar 2020 10:05:34 +0100 [thread overview]
Message-ID: <20200327090534.GB1669531@kroah.com> (raw)
In-Reply-To: <20200327023550.74406-1-briana.oursler@gmail.com>
On Thu, Mar 26, 2020 at 07:35:50PM -0700, Briana Oursler wrote:
> Remove multiple assignments at initialization and in computations to
> better match Linux style. Issue found by checkpatch.pl.
>
> Signed-off-by: Briana Oursler <briana.oursler@gmail.com>
> ---
>
> Changes in v2:
> - Change removes to remove in patch description.
>
> drivers/staging/vt6655/rxtx.c | 34 ++++++++++++++++++++--------------
> 1 file changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index 37fcc42ed000..cdea2ff1c8f0 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -195,21 +195,29 @@ s_uGetRTSCTSRsvTime(
> unsigned short wCurrentRate
> )
> {
> - unsigned int uRrvTime, uRTSTime, uCTSTime, uAckTime, uDataTime;
> -
> - uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime = 0;
> + unsigned int uRrvTime = 0;
> + unsigned int uRTSTime = 0;
> + unsigned int uCTSTime = 0;
> + unsigned int uAckTime = 0;
> + unsigned int uDataTime = 0;
>
> uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wCurrentRate);
> if (byRTSRsvType == 0) { /* RTSTxRrvTime_bb */
> - uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 20, pDevice->byTopCCKBasicRate);
> - uCTSTime = uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate);
> + uRTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType,
> + 20, pDevice->byTopCCKBasicRate);
While I understand the compulsion to want to fix up coding style issues
all over the place, don't mix changes like this with changes like:
> + uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType,
> + 14, pDevice->byTopCCKBasicRate);
> + uCTSTime = uAckTime;
That, as it makes it much harder to review when you do multiple
different things in the same patch.
And you didn't document that you did the reformatting here...
thanks,
greg k-h
next prev parent reply other threads:[~2020-03-27 9:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 23:03 [Outreachy][PATCH] staging: vt6655: Remove multiple assignments Briana Oursler
2020-03-27 0:59 ` [Outreachy kernel] " Lakshmi Ramasubramanian
2020-03-27 2:35 ` [PATCH v2] " Briana Oursler
2020-03-27 9:05 ` Greg KH [this message]
2020-03-27 19:27 ` [Patch v3] " Briana Oursler
2020-03-30 8:17 ` [Outreachy kernel] " Stefano Brivio
2020-03-29 1:12 ` [PATCH v2] " Briana Oursler
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=20200327090534.GB1669531@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=briana.oursler@gmail.com \
--cc=forest@alittletooquiet.net \
--cc=nramas@linux.microsoft.com \
--cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.