linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Ivan Safonov <insafonov@gmail.com>,
	Larry Finger <Larry.Finger@lwfinger.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michael Straube <straube.linux@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: refactor recvframe_defrag()
Date: Wed, 20 Mar 2019 20:47:42 +0100	[thread overview]
Message-ID: <e543f35a-37cb-68a1-3001-245693cd1274@redhat.com> (raw)
In-Reply-To: <20190320143144.17663-1-insafonov@gmail.com>

Hi,

On 20-03-19 15:31, Ivan Safonov wrote:
> Local variables pfhdr and prframe always have a same value,
> so one of them is unnecessary.
> 
> Signed-off-by: Ivan Safonov <insafonov@gmail.com>

Patch look good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>   drivers/staging/rtl8188eu/core/rtw_recv.c | 13 ++++++-------
>   1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
> index 90eb1a025051..9075e3a2755a 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_recv.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
> @@ -1325,7 +1325,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
>   	struct list_head *plist, *phead;
>   	u8 wlanhdr_offset;
>   	u8	curfragnum;
> -	struct recv_frame *pfhdr, *pnfhdr;
> +	struct recv_frame *pnfhdr;
>   	struct recv_frame *prframe, *pnextrframe;
>   	struct __queue *pfree_recv_queue;
>   
> @@ -1334,11 +1334,10 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
>   
>   	phead = get_list_head(defrag_q);
>   	plist = phead->next;
> -	pfhdr = list_entry(plist, struct recv_frame, list);
> -	prframe = pfhdr;
> +	prframe = list_entry(plist, struct recv_frame, list);
>   	list_del_init(&prframe->list);
>   
> -	if (curfragnum != pfhdr->attrib.frag_num) {
> +	if (curfragnum != prframe->attrib.frag_num) {
>   		/* the first fragment number must be 0 */
>   		/* free the whole queue */
>   		rtw_free_recvframe(prframe, pfree_recv_queue);
> @@ -1377,15 +1376,15 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
>   		skb_pull(pnextrframe->pkt, wlanhdr_offset);
>   
>   		/* append  to first fragment frame's tail (if privacy frame, pull the ICV) */
> -		skb_trim(prframe->pkt, prframe->pkt->len - pfhdr->attrib.icv_len);
> +		skb_trim(prframe->pkt, prframe->pkt->len - prframe->attrib.icv_len);
>   
>   		/* memcpy */
> -		memcpy(skb_tail_pointer(pfhdr->pkt), pnfhdr->pkt->data,
> +		memcpy(skb_tail_pointer(prframe->pkt), pnfhdr->pkt->data,
>   		       pnfhdr->pkt->len);
>   
>   		skb_put(prframe->pkt, pnfhdr->pkt->len);
>   
> -		pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len;
> +		prframe->attrib.icv_len = pnfhdr->attrib.icv_len;
>   		plist = plist->next;
>   	}
>   
> 

      reply	other threads:[~2019-03-20 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 14:31 [PATCH] staging: r8188eu: refactor recvframe_defrag() Ivan Safonov
2019-03-20 19:47 ` Hans de Goede [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=e543f35a-37cb-68a1-3001-245693cd1274@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=insafonov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=straube.linux@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;
as well as URLs for NNTP newsgroup(s).