From: Greg KH <gregkh@linuxfoundation.org>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
devel@linuxdriverproject.org, olaf@aepfle.de,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] net/hyperv: Add flow control based on hi/low watermark
Date: Tue, 27 Mar 2012 15:20:45 -0700 [thread overview]
Message-ID: <20120327222045.GA469@kroah.com> (raw)
In-Reply-To: <1332886987-11613-2-git-send-email-haiyangz@microsoft.com>
On Tue, Mar 27, 2012 at 03:23:07PM -0700, Haiyang Zhang wrote:
> --- a/include/linux/hyperv.h
> +++ b/include/linux/hyperv.h
> @@ -274,6 +274,35 @@ struct hv_ring_buffer_debug_info {
> u32 bytes_avail_towrite;
> };
>
> +/* Amount of space to write to */
> +#define BYTES_AVAIL_TO_WRITE(r, w, z) \
> + (((w) >= (r)) ? ((z) - ((w) - (r))) : ((r) - (w)))
> +
That's a very bad #define to use in a .h file, please do not do that.
> +
> +/*
> + *
> + * hv_get_ringbuffer_availbytes()
> + *
> + * Get number of bytes available to read and to write to
> + * for the specified ring buffer
> + */
> +extern inline void
> +hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi,
> + u32 *read, u32 *write)
What does "extern inline" mean?
Please fix.
greg k-h
next prev parent reply other threads:[~2012-03-27 22:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 22:23 [PATCH 0/1] net/hyperv: Add flow control based on hi/low watermark Haiyang Zhang
2012-03-27 22:23 ` [PATCH 1/1] " Haiyang Zhang
2012-03-27 22:20 ` Greg KH [this message]
2012-03-27 22:25 ` Haiyang Zhang
-- strict thread matches above, loose matches on Subject: below --
2012-03-26 22:18 [PATCH 0/1] " Haiyang Zhang
2012-03-26 22:18 ` [PATCH 1/1] " Haiyang Zhang
2012-03-26 23:10 ` Greg KH
2012-03-26 23:12 ` David Miller
2012-03-28 18:05 ` Ben Hutchings
2012-03-28 20:54 ` David Miller
2012-03-27 1:17 ` Haiyang Zhang
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=20120327222045.GA469@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).