mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Hans de Goede <hdegoede@redhat.com>,
	Michael Straube <straube.linux@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: staging: rtl8723bs: bug or pointless if else ?
Date: Thu, 28 Jun 2018 11:34:37 +0200	[thread overview]
Message-ID: <b5f394c5f8395cd72ecdd5b6f9b2ff2d24253cf7.camel@hadess.net> (raw)
In-Reply-To: <9b1993c2-0b81-35cd-fe27-293f9e8f45c6@redhat.com>

On Thu, 2018-06-28 at 10:22 +0200, Hans de Goede wrote:
> Hi,
> 
> On 28-06-18 09:43, Michael Straube wrote:
> > Hi,
> > 
> > I stumbled upon the following if else construct in
> > drivers/staging/rtl8723bs/os_dep/sdio_intf.c:618
> > 
> >          if (pwrpriv->bInternalAutoSuspend)
> >          {
> >                  ret = rtw_resume_process(padapter);
> >          }
> >          else
> >          {
> >                  if (pwrpriv->wowlan_mode || pwrpriv-
> > >wowlan_ap_mode)
> >                  {
> >                          ret = rtw_resume_process(padapter);
> >                  }
> >                  else
> >                  {
> >                          ret = rtw_resume_process(padapter);
> >                  }
> >          }
> > 
> > It does not matter if the conditions are true or not,
> > ret is always set to:
> > 
> > ret = rtw_resume_process(padapter)
> > 
> > Is this a bug or is the if else construct just pointless?
> 
> It probably is just pointless, my guess would be that once
> upon a time there was a difference in the paths and at some
> point that difference went away.

Quite:
https://github.com/hadess/rtl8723bs/blob/7d36e26f78bbc709844c12ad0c62e3e8503fdbc5/os_dep/linux/sdio_intf.c#L1757

  reply	other threads:[~2018-06-28 10:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28  7:43 Michael Straube
2018-06-28  8:22 ` Hans de Goede
2018-06-28  9:34   ` Bastien Nocera [this message]
2018-06-28 15:00     ` Michael Straube
2018-06-28 15:01       ` Hans de Goede
2018-06-28 20:36     ` Joe Perches
2018-06-28 10:24 ` Greg Kroah-Hartman

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=b5f394c5f8395cd72ecdd5b6f9b2ff2d24253cf7.camel@hadess.net \
    --to=hadess@hadess.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=straube.linux@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®