From: joe@perches.com (Joe Perches)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ethernet: Add new driver for Marvell Armada 375 network unit
Date: Sat, 05 Jul 2014 14:14:21 -0700 [thread overview]
Message-ID: <1404594861.6384.75.camel@joe-AO725> (raw)
In-Reply-To: <20140705210359.GA19441@electric-eye.fr.zoreil.com>
On Sat, 2014-07-05 at 23:03 +0200, Francois Romieu wrote:
> Partial review below.
trivia:
> > diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
[]
> > +static int mvpp2_prs_tcam_first_free(struct mvpp2 *pp2, int start, int end)
> > +{
> > + int tid;
> > + bool found = false;
> > +
> > + if (start < end)
> > + for (tid = start; tid <= end; tid++) {
> > + if (!pp2->prs_shadow[tid].valid) {
> > + found = true;
> > + break;
> > + }
> > + }
> > + else
> > + for (tid = start; tid >= end; tid--) {
> > + if (!pp2->prs_shadow[tid].valid) {
> > + found = true;
> > + break;
> > + }
> > + }
>
> Missing parenthsesis in "if ... else ..." block.
Perhaps it's better to use swap if start > end
if (start > end)
swap(start, end);
so there's just one loop
next prev parent reply other threads:[~2014-07-05 21:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 18:31 [PATCH net-next 0/3] Network driver for Armada 375 SoC Ezequiel Garcia
2014-07-04 18:31 ` [PATCH 2/3] ARM: mvebu: Add support for the network controller in " Ezequiel Garcia
2014-07-04 18:51 ` Sergei Shtylyov
2014-07-04 19:06 ` Ezequiel Garcia
2014-07-04 18:31 ` [PATCH 3/3] ARM: mvebu: Enable the network controller in Armada 375 DB board Ezequiel Garcia
[not found] ` <1404498697-21978-2-git-send-email-ezequiel.garcia@free-electrons.com>
2014-07-05 21:03 ` [PATCH 1/3] ethernet: Add new driver for Marvell Armada 375 network unit Francois Romieu
2014-07-05 21:14 ` Joe Perches [this message]
2014-07-07 14:26 ` Ezequiel Garcia
2014-07-07 21:22 ` Francois Romieu
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=1404594861.6384.75.camel@joe-AO725 \
--to=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).