From: Jeremiah Mahler <jmmahler@gmail.com>
To: Andy Whitcroft <apw@canonical.com>
Cc: KY Srinivasan <kys@microsoft.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"olaf@aepfle.de" <olaf@aepfle.de>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"mcb30@ipxe.org" <mcb30@ipxe.org>
Subject: Re: [PATCH V3 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()
Date: Mon, 15 Dec 2014 10:51:04 -0800 [thread overview]
Message-ID: <20141215185104.GA25345@hudson.localdomain> (raw)
In-Reply-To: <20141215154704.GA5259@bark>
Andy,
On Mon, Dec 15, 2014 at 03:47:04PM +0000, Andy Whitcroft wrote:
> On Sun, Dec 14, 2014 at 11:59:19PM -0800, Jeremiah Mahler wrote:
[...]
>
> The calculation appears identical to my reading, the original form was:
>
> next_gpadl_handle = atomic_read(&vmbus_connection.next_gpadl_handle);
> atomic_inc(&vmbus_connection.next_gpadl_handle);
>
> or:
>
> y = x;
> x++;
>
> so y == x' (x before incrementing)
>
> the new code is:
>
> next_gpadl_handle = (atomic_inc_return(&vmbus_connection.next_gpadl_handle) - 1);
>
> or:
>
> y = ++x - 1;
>
> Also making y = x' (x before incrementing)
>
> -apw
Ah, you are right. The increment before/after messed me up.
Thanks for clearing that up for me :-)
--
- Jeremiah Mahler
prev parent reply other threads:[~2014-12-15 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 1:13 [PATCH V3 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl() K. Y. Srinivasan
2014-12-11 2:10 ` Jeremiah Mahler
2014-12-15 7:00 ` KY Srinivasan
2014-12-15 7:59 ` Jeremiah Mahler
2014-12-15 15:47 ` Andy Whitcroft
2014-12-15 18:51 ` Jeremiah Mahler [this message]
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=20141215185104.GA25345@hudson.localdomain \
--to=jmmahler@gmail.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcb30@ipxe.org \
--cc=olaf@aepfle.de \
/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