From: Kalle Valo <kvalo@codeaurora.org>
To: Ganapathi Bhat <gbhat@marvell.com>
Cc: <linux-wireless@vger.kernel.org>,
Brian Norris <briannorris@chromium.org>,
Cathy Luo <cluo@marvell.com>, Xinming Hu <huxm@marvell.com>,
Zhiyuan Yang <yangzy@marvell.com>, James Cao <jcao@marvell.com>,
Mangesh Malusare <mmangesh@marvell.com>,
Douglas Anderson <dianders@chromium.org>,
Ganapathi Bhat <gbhat@marvell.com>
Subject: Re: [1/2] mwifiex: kill useless list_empty checks
Date: Fri, 13 Oct 2017 09:38:20 +0000 (UTC) [thread overview]
Message-ID: <20171013093820.8458D61473@smtp.codeaurora.org> (raw)
In-Reply-To: <1507043984-9832-1-git-send-email-gbhat@marvell.com>
Ganapathi Bhat <gbhat@marvell.com> wrote:
> From: Douglas Anderson <dianders@chromium.org>
>
> There's absolutely no reason to check to see if a list is empty
> before iterating through it. It's just like writing code like
> this:
>
> if (count != 0) {
> for (i = 0; i < count; i++) {
> ...
> }
> }
>
> The loop will already be avoided if "count == 0" so there was no
> reason to check.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
2 patches applied to wireless-drivers-next.git, thanks.
40351051d022 mwifiex: kill useless list_empty checks
f0f7c2275fb9 mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c
--
https://patchwork.kernel.org/patch/9983061/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2017-10-13 9:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 15:19 [PATCH 1/2] mwifiex: kill useless list_empty checks Ganapathi Bhat
2017-10-03 15:19 ` [PATCH 2/2] mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c Ganapathi Bhat
2017-10-13 9:38 ` Kalle Valo [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=20171013093820.8458D61473@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=briannorris@chromium.org \
--cc=cluo@marvell.com \
--cc=dianders@chromium.org \
--cc=gbhat@marvell.com \
--cc=huxm@marvell.com \
--cc=jcao@marvell.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mmangesh@marvell.com \
--cc=yangzy@marvell.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.