From: Maya Nakamura <m.maya.nakamura@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: gregkh@linuxfoundation.org, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero
Date: Thu, 25 Oct 2018 17:34:20 -0700 [thread overview]
Message-ID: <20181026003419.GA2769@k-vBox> (raw)
In-Reply-To: <alpine.DEB.2.21.1810251523520.2363@hadrien>
On Thu, Oct 25, 2018 at 03:24:32PM +0100, Julia Lawall wrote:
>
>
> On Wed, 24 Oct 2018, Maya Nakamura wrote:
>
> > Because the odm_sq_process_patch_rt_cid_819x_lenovo function is only
> > called to return zero, remove the unnecessary function and change one
> > statement that calls it. Issue found by Coccinelle's semantic patch
> > results for returnvar.cocci.
> >
> > Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
> > ---
> > drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 11 +----------
> > 1 file changed, 1 insertion(+), 10 deletions(-)
> >
> > diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > index fd208581d857..335a435caa2c 100644
> > --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > @@ -477,14 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
> > return 100 + ant_power;
> > }
> >
> > -static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
> > - u8 is_cck_rate, u8 pwdb_all,
> > - u8 path, u8 RSSI)
> > -{
> > - u8 sq = 0;
> > - return sq;
> > -}
> > -
> > static u8 odm_evm_db_to_percentage(s8 value)
> > {
> > /* -33dB~0dB to 0%~99% */
> > @@ -891,8 +883,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
> >
> > if ((dm->support_platform == ODM_WIN) &&
> > (dm->patch_id == RT_CID_819X_LENOVO))
> > - sq = odm_sq_process_patch_rt_cid_819x_lenovo(
> > - dm, is_cck_rate, pwdb_all, 0, 0);
> > + sq = 0;
> > else
> > sq = phydm_get_signal_quality_8812(phy_info, dm,
> > phy_sta_rpt);
>
> Would it be better to just put u8 sq = 0; ? Then you could negate the
> condition and drop one of the branches.
>
> julia
Thank you for teaching me, Julia! I will try to change this and the
other (1/3) and resubmit the set.
Maya
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.1810251523520.2363%40hadrien.
> For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2018-10-26 0:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 1:16 [PATCH 0/3] staging: rtlwifi: Remove unnecessary functions Maya Nakamura
2018-10-25 1:17 ` [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument Maya Nakamura
2018-10-25 14:29 ` [Outreachy kernel] " Julia Lawall
2018-10-25 1:18 ` [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero Maya Nakamura
2018-10-25 14:24 ` [Outreachy kernel] " Julia Lawall
2018-10-26 0:34 ` Maya Nakamura [this message]
2018-10-25 1:19 ` [PATCH 3/3] staging: rtlwifi: Remove unused functions Maya Nakamura
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=20181026003419.GA2769@k-vBox \
--to=m.maya.nakamura@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@lip6.fr \
--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.