mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Martin Homuth <martin@martinhomuth.de>,
	alex.mikhalevich@gmail.com, rvarsha016@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org
Subject: Re: [PATCH v3 2/5] staging: rtl8712: style fix multiple line dereferences
Date: Tue, 19 Dec 2017 08:41:58 -0800	[thread overview]
Message-ID: <1513701718.1234.47.camel@perches.com> (raw)
In-Reply-To: <20171219163216.9793-3-martin@martinhomuth.de>

On Tue, 2017-12-19 at 17:32 +0100, Martin Homuth wrote:
> This patch fixes various coding style issues in the rtl8712 module as
> noted by checkpatch.pl related to dereferencing over multiple lines.
[]
> diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
[]
> @@ -899,6 +899,7 @@ static void process_link_qual(struct _adapter *padapter,
>  {
>  	u32	last_evm = 0, tmpVal;
>  	struct rx_pkt_attrib *pattrib;
> +	struct smooth_rssi_data *sqd = &padapter->recvpriv.signal_qual_data;
>  
>  	if (prframe == NULL || padapter == NULL)
>  		return;
> @@ -918,9 +919,7 @@ static void process_link_qual(struct _adapter *padapter,
>  		}
>  		padapter->recvpriv.signal_qual_data.total_val +=
>  			  pattrib->signal_qual;

You missed more than one substitution.

		sqd->total_val += pattrib->signal_qual;

> -		padapter->recvpriv.signal_qual_data.elements[padapter->
> -			  recvpriv.signal_qual_data.index++] =
> -			  pattrib->signal_qual;
> +		sqd->elements[sqd->index++] = pattrib->signal_qual;
>  		if (padapter->recvpriv.signal_qual_data.index >=
>  		    PHY_LINKQUALITY_SLID_WIN_MAX)
>  			padapter->recvpriv.signal_qual_data.index = 0;

And here too

			sqd->index = 0;

Dunno if there are more, but if you are
modifying the function, you should do the
appropriate function local sed.

  reply	other threads:[~2017-12-19 16:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 16:32 [PATCH v3 0/5] staging: rtl8712: fix several checkpatch style issues Martin Homuth
2017-12-19 16:32 ` [PATCH v3 1/5] staging: rtl8712: style fix over 80 characters warnings Martin Homuth
2017-12-19 16:32 ` [PATCH v3 2/5] staging: rtl8712: style fix multiple line dereferences Martin Homuth
2017-12-19 16:41   ` Joe Perches [this message]
2017-12-19 20:02     ` Martin Homuth
2017-12-19 16:32 ` [PATCH v3 3/5] staging: rtl8712: style fix indentation Martin Homuth
2017-12-19 16:32 ` [PATCH v3 4/5] staging: rtl8712: style fix unneeded else Martin Homuth
2017-12-19 16:32 ` [PATCH v3 5/5] staging: rtl8712: style fix returned error code Martin Homuth

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=1513701718.1234.47.camel@perches.com \
    --to=joe@perches.com \
    --cc=alex.mikhalevich@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@martinhomuth.de \
    --cc=rvarsha016@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

Powered by JetHome