WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Muli Ben-Yehuda <mulix@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][3/17] USB virt 2.6 split driver---xenidc buffer references
From: Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Nov 2005 21:34:54 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 21 Nov 2005 21:30:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051121203136.GC22728@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1132579128.31295.114.camel@xxxxxxxxxxxxxxxxxxxxx> <20051121203136.GC22728@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>