[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1513701718.1234.47.camel@perches.com>
Date: Tue, 19 Dec 2017 08:41:58 -0800
From: Joe Perches <joe@...ches.com>
To: Martin Homuth <martin@...tinhomuth.de>, alex.mikhalevich@...il.com,
rvarsha016@...il.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org
Subject: Re: [PATCH v3 2/5] staging: rtl8712: style fix multiple line
dereferences
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.
Powered by blists - more mailing lists