From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Roberta Dobrescu <roberta.dobrescu@gmail.com>,
Joe Perches <joe@perches.com>,
Daniele Alessandrelli <daniele.alessandrelli@gmail.com>,
Aleh Suprunovich <br@ahlamon.org>,
linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [BUG ?] staging: rtl8723au: condition with no effect
Date: Sat, 13 Jun 2015 17:48:01 -0400 [thread overview]
Message-ID: <wrfjy4jn1dri.fsf@redhat.com> (raw)
In-Reply-To: <1434191497-5611-1-git-send-email-hofrat@osadl.org> (Nicholas Mc Guire's message of "Sat, 13 Jun 2015 12:31:37 +0200")
Nicholas Mc Guire <hofrat@osadl.org> writes:
> scanning for trivial bug-patters with coccinelle spatches returned:
> ./drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1395
> WARNING: condition with no effect (if branch == else)
>
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c - line numbers from 4.1-rc7
> 1395 if (bWithoutHWSM) {
> 1396 /* value16 |= (APDM_HOST | FSM_HSUS |/PFM_ALDN); */
> 1397 /* 2010/08/31 According to Filen description, we need to
> 1398 use HW to shut down 8051 automatically. */
> 1399 /* Because suspend operation need the asistance of 8051
> 1400 to wait for 3ms. */
> 1401 value16 = APDM_HOST | AFSM_HSUS | PFM_ALDN;
> 1402 } else {
> 1403 value16 = APDM_HOST | AFSM_HSUS | PFM_ALDN;
> 1404 }
> 1405
> 1406 rtl8723au_write16(padapter, REG_APS_FSMCO, value16); /* 0x4802 */
>
> Not clear what the intent is but this looks like a typo/bug in the assigment
> of value16 as the condition here has no effect.
Doesn't look like a typo, looks like someone at some point had commented
out PFM_ALDN in the bWithoutHWSM case. Why they did that and then later
overrode it, I have no idea.
Jes
next prev parent reply other threads:[~2015-06-13 21:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-13 10:31 [BUG ?] staging: rtl8723au: condition with no effect Nicholas Mc Guire
2015-06-13 21:48 ` Jes Sorensen [this message]
2015-06-14 6:19 ` Nicholas Mc Guire
2015-06-14 14:51 ` Jes Sorensen
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=wrfjy4jn1dri.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=br@ahlamon.org \
--cc=daniele.alessandrelli@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hofrat@osadl.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=roberta.dobrescu@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 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.