linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>,
	Anjana Sasindran <anjanasasindran123@gmail.com>,
	Roberta Dobrescu <roberta.dobrescu@gmail.com>,
	linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: multiple condition with no effect - if identical to else
Date: Tue, 03 Feb 2015 08:21:46 -0500	[thread overview]
Message-ID: <wrfjlhkft9jp.fsf@redhat.com> (raw)
In-Reply-To: <1422968896-26562-1-git-send-email-hofrat@osadl.org> (Nicholas Mc Guire's message of "Tue, 3 Feb 2015 08:08:16 -0500")

Nicholas Mc Guire <hofrat@osadl.org> writes:
> A number if/else if/else branches are identical - so the condition has no
> effect on the effective code and can be significantly simplified - this 
> patch removes the condition and the duplicated code.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
>
> This looks like the output of some broken code-generator - unlikely someone
> wrote this by hand. In any case it needs a review by someone that knows the
> details of the driver. 
>
> Anyway the number of useless code repetition is potentially record breaking !
>
> Patch was compile tested for x86_64_defconfig + CONFIG_STAGING=y
> CONFIG_R8723AU=m, CONFIG_8723AU_BT_COEXIST=y
>
> Patch is against 3.0.19-rc7 (localversoin = -next-20150203)
>
>  .../staging/rtl8723au/hal/rtl8723a_bt-coexist.c    |   60 +++-----------------
>  1 file changed, 8 insertions(+), 52 deletions(-)

Why make it simple if you can make it complicated :)

I presume it's against 3.19-rc7 since a 3.0.19 would be rather obsolete.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>

  reply	other threads:[~2015-02-03 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 13:08 [PATCH] staging: rtl8723au: multiple condition with no effect - if identical to else Nicholas Mc Guire
2015-02-03 13:21 ` Jes Sorensen [this message]
2015-02-03 14:31   ` Nicholas Mc Guire

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=wrfjlhkft9jp.fsf@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=anjanasasindran123@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hofrat@osadl.org \
    --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 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).