netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	David Miller <davem@davemloft.net>,
	Jason Cooper <jason@lakedaemon.net>,
	Marcin Wojtas <mw@semihalf.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Tawfik Bayouk <tawfik@marvell.com>,
	Lior Amsalem <alior@marvell.com>
Subject: Re: [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

  reply	other threads:[~2014-07-05 21:14 UTC|newest]

Thread overview: 10+ 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 1/3] ethernet: Add new driver for Marvell Armada 375 network unit Ezequiel Garcia
2014-07-05 21:03   ` 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
2014-07-04 18:31 ` [PATCH 2/3] ARM: mvebu: Add support for the network controller in Armada 375 SoC 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

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=alior@marvell.com \
    --cc=davem@davemloft.net \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    --cc=tawfik@marvell.com \
    --cc=thomas.petazzoni@free-electrons.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).