[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1404594861.6384.75.camel@joe-AO725>
Date: Sat, 05 Jul 2014 14:14:21 -0700
From: Joe Perches <joe@...ches.com>
To: Francois Romieu <romieu@...zoreil.com>
Cc: Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
David Miller <davem@...emloft.net>,
Jason Cooper <jason@...edaemon.net>,
Marcin Wojtas <mw@...ihalf.com>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Gregory Clement <gregory.clement@...e-electrons.com>,
Tawfik Bayouk <tawfik@...vell.com>,
Lior Amsalem <alior@...vell.com>
Subject: Re: [PATCH 1/3] ethernet: Add new driver for Marvell Armada 375
network unit
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists