From: Joe Perches <joe@perches.com>
To: Luis de Bethencourt <luis@debethencourt.com>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Frans Klaver <fransklaver@gmail.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Antoine Schweitzer-Chaput <antoine@schweitzer-chaput.fr>,
Cristina Opriceana <cristina.opriceana@gmail.com>,
Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>,
Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
Koray Gulcu <koray.gulcu@ozu.edu.tr>,
Greg Donald <gdonald@gmail.com>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Ebru Akagunduz <ebru.akagunduz@gmail.com>,
Karthik Nayak <karthik.188@gmail.com>,
devel@driverdev.osuosl.org
Subject: Re: [PATCH v5 2/2] staging: rtl8192u: remove unneeded bool
Date: Fri, 17 Jul 2015 17:40:38 -0700 [thread overview]
Message-ID: <1437180038.2495.110.camel@perches.com> (raw)
In-Reply-To: <20150717093501.GA2135@goodgumbo.baconseed.org>
On Fri, 2015-07-17 at 11:35 +0200, Luis de Bethencourt wrote:
> bool Reval is set to match the value of bHalfWirelessN24GMode just to
> this. The value can be returned directly. Removing uneeded bool.
trivia:
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
[]
> @@ -2043,16 +2043,10 @@ static bool GetNmodeSupportBySecCfg8192(struct net_device *dev)
> static bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev)
> {
> - bool Reval;
> struct r8192_priv *priv = ieee80211_priv(dev);
> struct ieee80211_device *ieee = priv->ieee80211;
There doesn't seem to be much value in this temporary.
> - if (ieee->bHalfWirelessN24GMode)
> - Reval = true;
> - else
> - Reval = false;
> -
> - return Reval;
> + return ieee->bHalfWirelessN24GMode;
return priv->ieee80211->bHalfWirelessN24GMode;
would work as well. But no doubt the compiler does the
same thing in any case.
prev parent reply other threads:[~2015-07-18 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 9:35 Luis de Bethencourt
2015-07-18 0:40 ` Joe Perches [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=1437180038.2495.110.camel@perches.com \
--to=joe@perches.com \
--cc=antoine@schweitzer-chaput.fr \
--cc=cristina.opriceana@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=ebru.akagunduz@gmail.com \
--cc=fransklaver@gmail.com \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=karthik.188@gmail.com \
--cc=koray.gulcu@ozu.edu.tr \
--cc=linux-kernel@vger.kernel.org \
--cc=lstoakes@gmail.com \
--cc=luis@debethencourt.com \
--cc=mahfouz.saif.elyazal@gmail.com \
--cc=rickard_strandqvist@spectrumdigital.se \
--cc=sudipm.mukherjee@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
all inboxes | Powered by JetHome®