[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH][3/17] USB virt 2.6 split driver---xenidc buffer references



On Mon, 2005-11-21 at 22:31 +0200, Muli Ben-Yehuda wrote:
> On Mon, Nov 21, 2005 at 01:18:48PM +0000, harry wrote:
> 
> > +#ifdef MIN
> > +#undef MIN
> > +#endif
> > +
> > +#define MIN( X, Y ) ( ( (X) < (Y) ) ? (X) : (Y) )
> 
> Linux has a much better definition.

So it does. Didn't manage to find it last time.

> 
> > +           memset(buffer, 0, 64);
> 
> s/64/sizeof(buffer)/? (there are arguments either way)
> 
> > +xenidc_buffer_type 
> > xenidc_local_buffer_reference_register_buffer_concrete_class
> > +    (xenidc_buffer_concrete_class * class, void (*copy_in_or_out)
> > +      (xenidc_buffer_concrete_class * class,
> > +       xenidc_local_buffer_reference * lbr,
> > +       void *buffer, xenidc_buffer_byte_count byte_count, int out), void 
> > (*zero)
> > +      (xenidc_buffer_concrete_class * class,
> > +       xenidc_local_buffer_reference * lbr), int (*calculate_rbr_resources)
> > +      (xenidc_buffer_concrete_class * class,
> > +       xenidc_local_buffer_reference * lbr,
> > +       xenidc_address * address,
> > +       xenidc_buffer_resource_list * list),
> > +     xenidc_buffer_concrete_class ** (*create_rbr)
> > +      (xenidc_buffer_concrete_class * class,
> > +       xenidc_local_buffer_reference * lbr,
> > +       xenidc_address * address,
> > +       xenidc_buffer_resource_provider * provider,
> > +       xenidc_remote_buffer_reference * rbr,
> > +       int access_flags), void (*revoke_rbr)
> > +      (xenidc_buffer_concrete_class ** context, xenidc_callback * callback)
> > +    ) {
> 
> I guess this is one case where typedefs would improve the code ;-)

This looked much neater before Lindent got hold of it.

> 
> > +   if (zero == NULL) {
> > +           zero = xenidc_local_buffer_reference_default_zero;
> > +   }
> 
> no braces please
OK
> 
> Cheers,
> Muli
-- 
Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.