From: Roland Dreier <rdreier@cisco.com>
To: Andy Grover <andy.grover@oracle.com>
Cc: netdev@vger.kernel.org, rds-devel@oss.oracle.com
Subject: Re: [PATCH 6/9] RDS: Fix ordering in a conditional
Date: Mon, 30 Mar 2009 21:27:53 -0700 [thread overview]
Message-ID: <adak566e2pi.fsf@cisco.com> (raw)
In-Reply-To: <1238438693-29540-7-git-send-email-andy.grover@oracle.com> (Andy Grover's message of "Mon, 30 Mar 2009 11:44:50 -0700")
> - 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.
Also it seems you don't need the unsigned cast here, since the clause
before just checked that ret is positive?
- R.
next prev parent reply other threads:[~2009-03-31 4:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 18:44 [PATCH 0/9] RDS updates Andy Grover
2009-03-30 18:44 ` [PATCH 1/9] RDS: Fix m_rs_lock deadlock Andy Grover
2009-03-30 18:44 ` [PATCH 2/9] RDS/IW+IB: Set recv ring low water mark to 1/2 full Andy Grover
2009-03-30 18:44 ` [PATCH 3/9] RDS: Correct some iw references in rdma_transport.c Andy Grover
2009-03-30 18:44 ` [PATCH 4/9] RDS/IW+IB: Set the RDS_LL_SEND_FULL bit when we're throttled Andy Grover
2009-03-30 18:44 ` [PATCH 5/9] RDS/IW+IB: Allow max credit advertise window Andy Grover
2009-03-30 18:44 ` [PATCH 6/9] RDS: Fix ordering in a conditional Andy Grover
2009-03-31 4:27 ` Roland Dreier [this message]
2009-03-31 6:56 ` Andrew Grover
2009-03-31 21:50 ` David Miller
2009-03-30 18:44 ` [PATCH 7/9] RDS: Establish connection before parsing CMSGs Andy Grover
2009-03-30 18:44 ` [PATCH 8/9] RDS: Rewrite connection cleanup Andy Grover
2009-03-30 18:44 ` [PATCH 9/9] RDS: use get_user_pages_fast() Andy Grover
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=adak566e2pi.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=andy.grover@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.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).