kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michael Straube <straube.linux@gmail.com>,
	Romain Perier <romain.perier@gmail.com>,
	Allen Pais <apais@linux.microsoft.com>,
	linux-staging@lists.linux.dev, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 7/7] staging: rtl8188eu: delete some dead code
Date: Wed, 9 Jun 2021 03:39:22 -0700	[thread overview]
Message-ID: <20210609103922.GG3727184@roeck-us.net> (raw)
In-Reply-To: <YL5jFF9ldj0W9P1f@mwanda>

On Mon, Jun 07, 2021 at 09:19:00PM +0300, Dan Carpenter wrote:
> Calling rtw_free_xmitframe() with a NULL "pxmitframe" parameter is a
> no-op.  It appears that originally this code was part of a loop but it
> was already dead code by the time that the driver was merged into the
> kernel.
> 
> Fixes: 7bc88639ad36 ("staging: r8188eu: Add files for new driver - part 17")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
> index 19055a1a92c1..d82dd22f2903 100644
> --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
> +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
> @@ -413,8 +413,7 @@ static u32 xmitframe_need_length(struct xmit_frame *pxmitframe)
>  bool rtl8188eu_xmitframe_complete(struct adapter *adapt,
>  				  struct xmit_priv *pxmitpriv)
>  {
> -	struct xmit_frame *pxmitframe = NULL;
> -	struct xmit_frame *n;
> +	struct xmit_frame *pxmitframe, *n;
>  	struct xmit_frame *pfirstframe = NULL;
>  	struct xmit_buf *pxmitbuf;
>  
> @@ -443,8 +442,6 @@ bool rtl8188eu_xmitframe_complete(struct adapter *adapt,
>  		return false;
>  
>  	/* 3 1. pick up first frame */

Comment could be removed as well. Otherwise,

Thanks a lot for taking care of this, and sorry again for the mess I created.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> -	rtw_free_xmitframe(pxmitpriv, pxmitframe);
> -
>  	pxmitframe = rtw_dequeue_xframe(pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
>  	if (!pxmitframe) {
>  		/*  no more xmit frame, release xmit buffer */
> -- 
> 2.30.2
> 

      reply	other threads:[~2021-06-09 10:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 18:15 [PATCH 0/7] staging: rtl8188eu: use safe version of list iterators Dan Carpenter
2021-06-07 18:17 ` [PATCH 1/7] staging: rtl8188eu: use safe iterator in stop_ap_mode() Dan Carpenter
2021-06-09 10:33   ` Guenter Roeck
2021-06-07 18:17 ` [PATCH 2/7] staging: rtl8188eu: use safe iterator in tx_beacon_hdl() Dan Carpenter
2021-06-09 10:34   ` Guenter Roeck
2021-06-07 18:17 ` [PATCH 3/7] staging: rtl8188eu: use safe iterator in dequeue_xmitframes_to_sleeping_queue() Dan Carpenter
2021-06-09 10:35   ` Guenter Roeck
2021-06-07 18:17 ` [PATCH 4/7] staging: rtl8188eu: use safe iterator in wakeup_sta_to_xmit() Dan Carpenter
2021-06-09 10:36   ` Guenter Roeck
2021-06-07 18:18 ` [PATCH 5/7] staging: rtl8188eu: use safe iterator in xmit_delivery_enabled_frames() Dan Carpenter
2021-06-09 10:37   ` Guenter Roeck
2021-06-07 18:18 ` [PATCH 6/7] staging: rtl8188eu: use safe iterator in rtl8188eu_xmitframe_complete() Dan Carpenter
2021-06-09 10:37   ` Guenter Roeck
2021-06-07 18:19 ` [PATCH 7/7] staging: rtl8188eu: delete some dead code Dan Carpenter
2021-06-09 10:39   ` Guenter Roeck [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=20210609103922.GG3727184@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=apais@linux.microsoft.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=romain.perier@gmail.com \
    --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).