[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090331.145013.206671022.davem@davemloft.net>
Date: Tue, 31 Mar 2009 14:50:13 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: andy.grover@...il.com
Cc: rdreier@...co.com, andy.grover@...cle.com, netdev@...r.kernel.org,
rds-devel@....oracle.com
Subject: Re: [PATCH 6/9] RDS: Fix ordering in a conditional
From: Andrew Grover <andy.grover@...il.com>
Date: Mon, 30 Mar 2009 23:56:14 -0700
> On Mon, Mar 30, 2009 at 9:27 PM, Roland Dreier <rdreier@...co.com> wrote:
> > > - if (0 <= ret && (unsigned) ret < nr_pages) {
> > > + if (ret > 0 && (unsigned) ret < nr_pages) {
> >
> > This is not an equivalent transformation -- the original code is true if
> > ret == 0, while the new code is false.
>
> Ah! Good point.
>
> > Also it seems you don't need the unsigned cast here, since the clause
> > before just checked that ret is positive?
>
> True, but I'd bet the compiler will warn if we remove it. I'll try it
> tomorrow and see.
Andy, also please resubmit only the real honest-to-goodness bug fixes
in this patch series.
I don't want to see cleanups, or optimizations like the transformation
over to using get_user_pages_fast().
You could have sent that kind of stuff to me weeks ago.
Thanks.
--
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