> -----Original Message----- > From: Greg KH [mailto:gregkh@xxxxxxxxxxxxxxxxxxx] > Sent: Tuesday, March 27, 2012 6:21 PM > To: Haiyang Zhang > Cc: davem@xxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; > devel@xxxxxxxxxxxxxxxxxxxxxx; olaf@xxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 1/1] net/hyperv: Add flow control based on hi/low > watermark > > 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. Will do. Thanks, - Haiyang _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel