linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Jaehee Park <jhpark1013@gmail.com>
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, outreachy@lists.linux.dev
Subject: Re: [PATCH 1/6] staging: r8188eu: remove unnecessary braces in single statement block
Date: Thu, 14 Apr 2022 22:50:52 +0300	[thread overview]
Message-ID: <8bd1cc3c-c28b-b30f-d9ff-04f9a3c79646@gmail.com> (raw)
In-Reply-To: <20220414194118.GA4144553@jaehee-ThinkPad-X1-Extreme>


[-- Attachment #1.1: Type: text/plain, Size: 1040 bytes --]

Hi Jaehee,

On 4/14/22 22:41, Jaehee Park wrote:
>> > @@ -112,9 +112,8 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
>> >   	rtw_free_mlme_priv_ie_data(pmlmepriv);
>> > -	if (pmlmepriv) {
>> > +	if (pmlmepriv)
>> >   		vfree(pmlmepriv->free_bss_buf);
>> > -	}
>> 
>> If pmlmepriv is equal to NULL we would die in rtw_free_mlme_priv_ie_data(),
>> so this check is just redundant
>> 
> 
> Hi Pavel, thank you for your comment! If I'm removing this if statement,
> should I include vfree(pmlmepriv->free_bss_buf) in
> rtw_free_mlme_priv_ie_data?
> 

Hm

Simple grep shows, that this member is just unused

1 drivers/staging/r8188eu/core/rtw_mlme.c|64 col 13| 
pmlmepriv->free_bss_buf = pbuf;
2 drivers/staging/r8188eu/core/rtw_mlme.c|116 col 20| 
vfree(pmlmepriv->free_bss_buf);
3 drivers/staging/r8188eu/include/rtw_mlme.h|322 col 6| u8 *free_bss_buf;

so looks like you can just remove free_bss_buf and all related lines.

I hope I haven't overlooked something



With regards,
Pavel Skripkin

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2022-04-14 19:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13 20:11 [PATCH 0/6] staging: r8188eu: fix warnings reported by checkpatch Jaehee Park
2022-04-13 20:11 ` [PATCH 1/6] staging: r8188eu: remove unnecessary braces in single statement block Jaehee Park
2022-04-13 20:24   ` Pavel Skripkin
2022-04-14 19:41     ` Jaehee Park
2022-04-14 19:50       ` Pavel Skripkin [this message]
2022-04-15  2:51         ` Jaehee Park
2022-04-13 20:11 ` [PATCH 2/6] staging: r8188eu: remove spaces before tabs Jaehee Park
2022-04-13 20:11 ` [PATCH 3/6] staging: r8188eu: remove 'added by' author comments Jaehee Park
2022-04-13 20:28   ` Pavel Skripkin
2022-04-14 19:41     ` Jaehee Park
2022-04-13 20:11 ` [PATCH 4/6] staging: r8188eu: place constants on the right side of tests Jaehee Park
2022-04-14  1:16   ` Joe Perches
2022-04-14 19:46     ` Jaehee Park
2022-04-13 20:11 ` [PATCH 5/6] staging: r8188eu: replace spaces with tabs Jaehee Park
2022-04-13 20:34   ` Pavel Skripkin
2022-04-14 19:43     ` Jaehee Park
2022-04-13 20:11 ` [PATCH 6/6] staging: r8188eu: correct typo in comments Jaehee Park

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=8bd1cc3c-c28b-b30f-d9ff-04f9a3c79646@gmail.com \
    --to=paskripkin@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhpark1013@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /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).