All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: outreachy-kernel@googlegroups.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [Outreachy kernel] [PATCH 2/2] staging: rtl8723bs: core: Removed set but unused variable.
Date: Thu, 29 Apr 2021 17:35:36 +0300	[thread overview]
Message-ID: <20210429143536.GD1981@kadam> (raw)
In-Reply-To: <20210428113346.28305-3-fmdefrancesco@gmail.com>

On Wed, Apr 28, 2021 at 01:33:46PM +0200, Fabio M. De Francesco wrote:
> Removed set but unused variable. Issue detected by gcc.
> 
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index a2fdd5ea5fc4..b0d2ba5ed129 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -1019,7 +1019,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
>  	u16 capab_info;
>  	struct rtw_ieee802_11_elems elems;
>  	struct sta_info *pstat;
> -	unsigned char 	reassoc, *p, *pos, *wpa_ie;
> +	unsigned char 	*p, *pos, *wpa_ie;
>  	unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
>  	int		i, ie_len, wpa_ie_len, left;
>  	unsigned char 	supportRate[16];
> @@ -1040,10 +1040,8 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
>  
>  	frame_type = GetFrameSubType(pframe);
>  	if (frame_type == WIFI_ASSOCREQ) {
> -		reassoc = 0;
>  		ie_offset = _ASOCREQ_IE_OFFSET_;
>  	} else { /*  WIFI_REASSOCREQ */
> -		reassoc = 1;
>  		ie_offset = _REASOCREQ_IE_OFFSET_;
>  	}

Get rid of the curly braces as well, otherwise the patch introduces a
checkpatch warning.

regards,
dan carpenter


      reply	other threads:[~2021-04-29 14:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 11:33 [Outreachy kernel] [PATCH 0/2] Removed set but unused variables Fabio M. De Francesco
2021-04-28 11:33 ` [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: hal: Remove " Fabio M. De Francesco
2021-04-29  7:26   ` Fabio Aiuto
2021-04-29  7:44     ` Fabio M. De Francesco
2021-04-29  8:25       ` Fabio Aiuto
2021-04-29  9:16         ` Fabio M. De Francesco
2021-04-29  9:32           ` Fabio Aiuto
2021-04-29  9:53             ` Fabio M. De Francesco
2021-04-29 10:01         ` Greg Kroah-Hartman
2021-04-29 10:15           ` Fabio M. De Francesco
2021-04-29 11:21             ` Greg Kroah-Hartman
2021-04-29 10:22           ` Fabio Aiuto
2021-04-29 10:38             ` Fabio M. De Francesco
2021-04-29 12:07               ` Fabio Aiuto
2021-04-28 11:33 ` [Outreachy kernel] [PATCH 2/2] staging: rtl8723bs: core: Removed set but unused variable Fabio M. De Francesco
2021-04-29 14:35   ` Dan Carpenter [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=20210429143536.GD1981@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --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.